json-model-compiler 2.0.49__tar.gz → 2.0.50__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. json_model_compiler-2.0.50/.github/workflows/sanity.yml +18 -0
  2. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/.gitignore +1 -0
  3. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/BACKLOG.md +13 -12
  4. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/BENCH.md +16 -14
  5. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/DEV.md +30 -0
  6. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/Makefile +37 -3
  7. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/PKG-INFO +4 -3
  8. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/VERSION.md +52 -0
  9. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/about.sh +10 -4
  10. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/clang.py +17 -21
  11. json_model_compiler-2.0.50/json_model/data/VERSION +1 -0
  12. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/data/jmc.pod +110 -58
  13. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/java.py +2 -0
  14. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/javascript.py +1 -1
  15. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/language.py +2 -2
  16. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/optim.py +26 -14
  17. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/perl.py +20 -2
  18. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/plpgsql.py +13 -2
  19. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/Makefile +0 -3
  20. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/c/Makefile +1 -1
  21. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/c/json-model.c +29 -15
  22. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/c/json-model.h +12 -0
  23. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/c/main.c +97 -0
  24. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/java/json_model/GSON.java +18 -5
  25. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/java/json_model/Jackson.java +10 -13
  26. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/java/json_model/Main.java +35 -1
  27. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/java/pom.xml +11 -10
  28. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/js/index.js +9 -1
  29. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/js/main.js +26 -3
  30. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/js/package.json +1 -1
  31. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/pl/Changes +2 -0
  32. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/pl/lib/JSON/JsonModel.pm +25 -5
  33. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/support.py +19 -1
  34. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/script.py +111 -62
  35. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/utils.py +15 -0
  36. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/xstatic.py +107 -60
  37. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model_compiler.egg-info/PKG-INFO +4 -3
  38. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model_compiler.egg-info/SOURCES.txt +1 -0
  39. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model_compiler.egg-info/requires.txt +3 -2
  40. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/pyproject.toml +4 -1
  41. json_model_compiler-2.0.49/json_model/data/VERSION +0 -1
  42. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/.gitmodules +0 -0
  43. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/API.md +0 -0
  44. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/DESIGN.md +0 -0
  45. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/DOC.md +0 -0
  46. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/HOWTO.md +0 -0
  47. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/INTEGRATION.md +0 -0
  48. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/MANIFEST.in +0 -0
  49. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/PUBS.md +0 -0
  50. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/README.md +0 -0
  51. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/SPEC.md +0 -0
  52. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/TUTO.md +0 -0
  53. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/README.md +0 -0
  54. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/__init__.py +0 -0
  55. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/analyze.py +0 -0
  56. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/convert.py +0 -0
  57. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/data/clang_entry.c +0 -0
  58. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/data/clang_free.c +0 -0
  59. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/data/clang_init.c +0 -0
  60. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/data/clang_pcre2_fun.c +0 -0
  61. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/data/clang_re2_fun.c +0 -0
  62. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/data/java_free.java +0 -0
  63. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/data/java_init.java +0 -0
  64. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/data/javascript_exe.js +0 -0
  65. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/data/javascript_foot.js +0 -0
  66. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/data/javascript_free.js +0 -0
  67. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/data/javascript_head.js +0 -0
  68. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/data/javascript_init.js +0 -0
  69. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/data/javascript_main.js +0 -0
  70. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/data/perl_entry.pl +0 -0
  71. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/data/perl_exe.pl +0 -0
  72. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/data/perl_free.pl +0 -0
  73. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/data/perl_init.pl +0 -0
  74. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/data/perl_main.pl +0 -0
  75. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/data/perl_pkg.pl +0 -0
  76. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/data/plpgsql_entry.sql +0 -0
  77. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/data/python_entry.py +0 -0
  78. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/data/python_exe.py +0 -0
  79. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/data/python_free.py +0 -0
  80. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/data/python_init.py +0 -0
  81. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/data/python_main.py +0 -0
  82. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/export.py +0 -0
  83. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/irep.py +0 -0
  84. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/model.py +0 -0
  85. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/mtypes.py +0 -0
  86. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/objops.py +0 -0
  87. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/predefs.py +0 -0
  88. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/python.py +0 -0
  89. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/recurse.py +0 -0
  90. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/resolver.py +0 -0
  91. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/__init__.py +0 -0
  92. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/java/.gitignore +0 -0
  93. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/java/Makefile +0 -0
  94. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/java/README.md +0 -0
  95. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/java/env.sh +0 -0
  96. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/java/json_model/Checker.java +0 -0
  97. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/java/json_model/JSON.java +0 -0
  98. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/java/json_model/JSONP.java +0 -0
  99. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/java/json_model/ModelChecker.java +0 -0
  100. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/java/json_model/Path.java +0 -0
  101. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/java/json_model/Report.java +0 -0
  102. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/java/json_model/Runtime.java +0 -0
  103. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/js/README.md +0 -0
  104. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/pl/.gitignore +0 -0
  105. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/pl/LICENSE +0 -0
  106. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/pl/MANIFEST +0 -0
  107. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/pl/Makefile.PL +0 -0
  108. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/pl/README +0 -0
  109. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/pl/env.sh +0 -0
  110. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/pl/ignore.txt +0 -0
  111. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/pl/t/00-load.t +0 -0
  112. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/pl/t/manifest.t +0 -0
  113. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/pl/t/pod-coverage.t +0 -0
  114. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/pl/t/pod.t +0 -0
  115. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/pl/xt/boilerplate.t +0 -0
  116. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/sql/META.json +0 -0
  117. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/sql/Makefile +0 -0
  118. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/sql/json_model--2.0.sql +0 -0
  119. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/sql/json_model.control +0 -0
  120. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/runtime/types.py +0 -0
  121. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/submodel.py +0 -0
  122. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model/url_cache.py +0 -0
  123. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model_compiler.egg-info/dependency_links.txt +0 -0
  124. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model_compiler.egg-info/entry_points.txt +0 -0
  125. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model_compiler.egg-info/not-zip-safe +0 -0
  126. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/json_model_compiler.egg-info/top_level.txt +0 -0
  127. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/package.json +0 -0
  128. {json_model_compiler-2.0.49 → json_model_compiler-2.0.50}/setup.cfg +0 -0
@@ -0,0 +1,18 @@
1
+ name: JMC Sanity Check
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, dev, post ]
6
+
7
+ jobs:
8
+ test:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - name: Checkout project
12
+ uses: actions/checkout@v6
13
+ - name: Set up Python
14
+ uses: actions/setup-python@v6
15
+ - name: Install Package Stuff
16
+ run: make dev.py
17
+ - name: Sanity Check
18
+ run: make check.sanity
@@ -17,3 +17,4 @@ site/ABOUT.md
17
17
  .about.md
18
18
  local.mk
19
19
  env.sh
20
+ tmp/
@@ -2,20 +2,23 @@
2
2
 
3
3
  ## Current Tasks
4
4
 
5
- - [x] front: cleanup obsolete versioning stuff
6
- - [x] front: show dynamic version when under dev
7
- - [x] pr: show static version when generating ABOUT page
8
- - [x] pr: add documentation section in ABOUT page
9
- - [x] front: workaround, allow to skip dynamic version recomputation
10
- - [x] front: use semver
5
+ - [ ] backend: check `mv-34/mu` test case which may require some normalization
6
+ - [ ] runtime: count graphemes instead of characters? for Java, see `java.text.BreakIterator`
7
+ - [ ] pr: improve JSTS test results alignment between all backends (wip)
8
+ - [ ] js-runtime: check stability of `.mo` extension (wip: issue reported)
9
+ - [ ] js-backend: remove useless braces and semi-colons
10
+ - [ ] front: add argument groups
11
+ - [ ] front: merge many internal options to trigrams
12
+ - [ ] perf: add stddev performance computation
11
13
  - [ ] perf: improve resilience to bad overhead estimation
12
- - [ ] pr: switch to semver on version _2.1.0_?
14
+ - [ ] perf: collect JSON parse times for comparison with validation times
13
15
  - [ ] perf: keep only one java run?
16
+ - [ ] perf: check median hack for run times
14
17
  - [ ] perf: show schema to model conversion times
18
+ - [ ] pr: better document optimizations, eg add compilier optimization page
15
19
  - [ ] optim: collect and display stats about what works
16
20
  - [ ] c-backend: improve unique with hash using int set?
17
21
  - [ ] c-backend: improve str hash?
18
- - [ ] js-backend: remove useless braces and semi-colons
19
22
  - [ ] c-backend: use str cmp for ends with optimization as well
20
23
  - [ ] c-backend: improve partitioned cset prettyprinting
21
24
  - [ ] c-backend: use str set partitioning
@@ -53,6 +56,7 @@
53
56
  - [ ] static: take into account str _byte_ len when partitioning
54
57
  - [ ] static: possibly use up to 8 bytes when hashing?
55
58
  - [ ] static: fix hash size to depends on byte encoding, not str len
59
+ - [ ] static: check discriminator first? it help only if it appears first in the values
56
60
  - [ ] perf: test partitioning for js, java, perl, python…
57
61
  - [ ] perf: investigate best settings for js, java and python
58
62
  - [ ] perf: allow to run with any docker image
@@ -175,7 +179,6 @@
175
179
  - [ ] design: add `$URI-REF` or similar? `$PATH`?
176
180
  - [ ] c-backend: add reporting to predef failures?
177
181
  - [ ] c-backend: generate thread-safe code? option? this currently would require malloc'ed stuff
178
- - [ ] backend: what about a specialize IR [Blaze](https://arxiv.org/abs/2503.02770)?
179
182
  - [ ] tests: put generated exe in `/dev/shm` instead of locally from `Makefile`?
180
183
  - [ ] static: improve constraint failing message (length, unique…)
181
184
  - [ ] schema: inline external references to generate working schemas in more cases? (openapi-311)
@@ -210,7 +213,6 @@
210
213
  - [ ] backend: rethink `with_report` and `with_path`, keep the former only?
211
214
  - [ ] c-backend: add support for `re2` wrapper?
212
215
  - [ ] backend: name-based selector optimized for root.
213
- - [ ] perfs: measure performance against blaze benchmark for openapi at least
214
216
  - [ ] python: refactor in preproc tools…
215
217
  - [ ] optim: remove unused introduced names `__external_...`
216
218
  - [ ] optim: remove unused names at depth 1 and more?
@@ -264,7 +266,6 @@
264
266
  - [ ] perf: schema validation on yac data
265
267
  - [ ] perf: open data, eg RNCP and FRESQ
266
268
  - [ ] frontend: loop load/valid for perf
267
- - [ ] perf: reuse blaze data set where possible (implies schema to model)
268
269
  - [ ] design: conditionals or not conditionals… eg for interfaces?
269
270
  if not in the description language, it should be easy to express outside.
270
271
  - [ ] doc: create a clean documentation, following Diátaxis (tuto | howto / explain | reference).
@@ -283,7 +284,7 @@
283
284
  - [ ] rust-backend: see [json crate](https://docs.rs/json/latest/json/).
284
285
  - [ ] cpp-backend: see [json](https://github.com/nlohmann/json) and `re2`. json lib popularity?
285
286
  - [ ] cpp-backend: also see [simdjson](https://github.com/simdjson/simdjson)?
286
- - [ ] backend: direct code for blaze? vs c++?
287
+ - [ ] blaze-backend: use schema export plus simple cpp front or `jsonschema` cli?
287
288
  - [ ] kotlin-backend: see [serialization](https://kotlinlang.org/docs/serialization.html).
288
289
  - [ ] mongodb-backend: generate bson stuff, as an option to schema generation?
289
290
  - [ ] ts-backend: js sharing ?
@@ -9,6 +9,10 @@ schema to model converter in C, JS, Java (GSON, Jackson and JSONP using Johnzon)
9
9
 
10
10
  ## Recent Artifacts
11
11
 
12
+ - [2026051900](benchmarks/2026051900.md) clang, no predefs, jsu 0.9.9/jmc 2.0.49 vs sbc 15.6.3, 11 runs, 1000 iterations.
13
+ - [2026051701](benchmarks/2026051701.md) clang, no predefs, jsu 0.9.9/jmc 2.0.49 vs sbc 15.6.2, 11 runs, 1000 iterations.
14
+ - [2026051200](benchmarks/2026051200.md) clang, no predefs, jsu 0.9.9/jmc 2.0.49 vs sbc 15.6.1, 11 runs, 1000 iterations.
15
+ - [2026050902](benchmarks/2026050902.md) clang, no predefs, jsu 0.9.9/jmc 2.0.49 vs sbc 15.6.0, 11 runs, 1000 iterations.
12
16
  - [2026050900](benchmarks/2026050900.md) clang, no predefs, jsu 0.9.8/jmc 2.0b48 vs sbc 15.6.0, 11 runs, 1000 iterations.
13
17
  - [2026050800](benchmarks/2026050800.md) clang, no predefs, jsu 0.9.8/jmc 2.0b48 vs sbc 15.5.0, 11 runs, 1000 iterations.
14
18
  - [2026050703](benchmarks/2026050703.md) clang, no predefs, jsu 0.9.8/jmc 2.0b48 vs sbc 15.4.0, 11 runs, 1000 iterations.
@@ -20,10 +24,6 @@ schema to model converter in C, JS, Java (GSON, Jackson and JSONP using Johnzon)
20
24
  - [2026042500](benchmarks/2026042500.md) clang, no predefs, jsu 0.9.5/jmc 2.0b44 vs sbc 15.0.0, 11 runs, 1000 iterations.
21
25
  - [2026042400](benchmarks/2026042400.md) clang, no predefs, jsu 0.9.4/jmc 2.0b43 vs sbc 15.0.0, 11 runs, 1000 iterations.
22
26
  - [2026042001](benchmarks/2026042001.md) clang, no predefs, jsu 0.9.3/jmc 2.0b42 vs sbc 14.20.2, 11 runs, 1000 iterations.
23
- - [2026040700](benchmarks/2026040700.md) clang, no predefs, jsu 0.9.2/jmc 2.0b41 vs sbc 14.20.2, 11 runs, 1000 iterations.
24
- - [2026040400](benchmarks/2026040400.md) clang, no predefs, jsu 0.9.2/jmc 2.0b41 vs sbc 14.19.0, 11 runs, 1000 iterations.
25
- - [2026040300](benchmarks/2026040300.md) clang, no predefs, jsu 0.9.2/jmc 2.0b41 vs sbc 14.18.0, 11 runs, 1000 iterations.
26
- - [2026040200](benchmarks/2026040200.md) clang, no predefs, jsu 0.9.2/jmc 2.0b41 vs sbc 14.17.1, 11 runs, 1000 iterations.
27
27
 
28
28
  ## Benchmarking Script
29
29
 
@@ -63,8 +63,7 @@ the run stops as soon as possible.
63
63
 
64
64
  - To smooth out the wide range of collected performances (from 10 ns to
65
65
  over 300 µs for validating one value), a relative comparison ratio is shown.
66
- - Compilation times are the _minimum_ encountered over the runs.
67
- whereas performance times are the _median_ over the runs.
66
+ - Compilation times and performance times are the _median_ encountered over the runs.
68
67
 
69
68
  Note that performance figures **must** be taken with a pinch of salt, please consider
70
69
  the following caveats, and others:
@@ -74,7 +73,10 @@ the following caveats, and others:
74
73
  benchmark actually measure raw latency.
75
74
  - test cases may or may not be representative of specific use cases,
76
75
  especially wrt schema/model and value sizes.
77
- - the overall load on the test host can impact measures.
76
+ - the overall load on the test host can impact measures, as well as power control
77
+ features which adjust the cpu frequency in real time.
78
+ - Relying on hyper-threading can reduce performance for simple one thread tasks,
79
+ so it is often disabled.
78
80
  - the measure overhead is estimated and deduced from the performance figures,
79
81
  which leads to potentially fuzzy results on very small data and schemas.
80
82
  - compilers, libraries and other design and updates can have dramatic effects:
@@ -85,7 +87,7 @@ the following caveats, and others:
85
87
  so these checks may be disactivated (see `JMC_OPTS`) for fairness,
86
88
  reducing the results significance.
87
89
  - blaze uses its own special-purpose JSON representation which include a precomputed
88
- custom hash for string comparisons.
90
+ custom hash for string comparisons, aleviating the need to compare strings in most cases.
89
91
  - blaze is a C++ library, if interfaced from another language, the cost of translating
90
92
  the JSON representation to this library should be taken into account;
91
93
  in contrast, jmc uses native JSON representations in the target ecosystem and generate
@@ -95,10 +97,10 @@ the following caveats, and others:
95
97
  model definitions compared to lax schemas…
96
98
  - it is unclear whether JIT optimizations (eg Java and JS) may work around the
97
99
  benchmarking loops and report undue very fast performances, eg on the GeoJSON case.
98
- - some execution environment (eg Java) may take advantage of parallelism with threads,
99
- which may or may not be a blessing: it can reduce the apparent latency (eg the gc runs
100
- in another thread) but have a detrimental overall effect on throughput and costs as
101
- more cpu ressources are spent on the same task.
100
+ - some execution environment (eg Java) takes advantage of parallelism with threads (possibly
101
+ for the garbage collector and JIT), which may or may not be a blessing: it can reduce
102
+ the apparent latency (eg the gc runs in another thread) but have a detrimental overall
103
+ effect on throughput and costs as more cpu ressources are spent on the same task.
102
104
 
103
105
  ## Other Artifacts
104
106
 
@@ -121,9 +123,9 @@ It should be noted that benchmarking conditions are quite different compared to
121
123
  [edited](https://github.com/sourcemeta-research/jsonschema-benchmark/commit/ad109eb210c0939bd8393da28d8212f75c1c2d92),
122
124
  especially to deal corner cases issues with `$ref` under version 7 and prior,
123
125
  thus do not conform to the initial official schemas.
124
- 4. The benchmark _removes_ format assertions before testing the schemas.
126
+ 4. The benchmark _removes_ format assertions before testing schemas.
125
127
  5. The model used are strictly converted from schemas, native models are not used
126
128
  even if available and schemas are not fixed for typical errors (eg misplaced keywords).
127
129
 
128
- As of May 2026, the JSU C implementation is faster than Blaze on about 55% of benchmark cases
130
+ As of May 2026, the JSU C implementation is faster than Blaze on about 60% of benchmark cases
129
131
  on these artifacts.
@@ -68,3 +68,33 @@ source $PWD/json_model/runtime/java/env.bash
68
68
  Read sources…
69
69
  The magically-generated [deepwiki](https://deepwiki.com/clairey-zx81/json-model)
70
70
  Section _The jmc Compiler_ is not too bad for an initial understanding.
71
+
72
+ ## Release Procedure
73
+
74
+ Procedure for releasing a new python package version:
75
+
76
+ - consider releasing both JSU and JMC at the same time!
77
+ - merge `dev` changes into the `main` branch
78
+ - update `json_model/data/VERSION`, `BACKLOG.md` and `VERSION.md`
79
+ - `git commit` and `git tag` as new version
80
+ - run non-regression tests: `make -C tests check`, fix and squash if necessary
81
+ - `make clean.dev && make publish.py`
82
+ - test generated package(s) manually:
83
+
84
+ ```bash
85
+ cd /tmp
86
+ python -m venv venv
87
+ source venv/bin/activate
88
+ pip install path-to-generated-package.tar.gz
89
+ jmc --version # should display the new version
90
+ ```
91
+
92
+ - if okay:
93
+ - push sources and tags: `git push && git push --tags`
94
+ - publish package(s): `twine upload dist/*`
95
+ - check `jsonschema-benchmark` container build
96
+ - check `bowtie` container build
97
+
98
+ Note: do not push non released stuff on branch `main`, only use `post` and `dev`
99
+ as only these name are supported by Python `packaging.version`.
100
+ Not following this rule breaks branch installation from git sources.
@@ -6,6 +6,7 @@ SHELL = /bin/bash
6
6
  #
7
7
 
8
8
  MODULE = json_model
9
+ TMP = /dev/shm
9
10
 
10
11
  ifndef PYTHON
11
12
  PYTHON = python
@@ -29,7 +30,14 @@ venv/.dist: venv/.dev
29
30
  touch $@
30
31
 
31
32
  .PHONY: dev
32
- dev: venv/.dev dev.js dev.java
33
+ dev: dev.py dev.js dev.java dev.c
34
+
35
+ .PHONY: dev.py
36
+ dev.py: venv/.dev
37
+
38
+ .PHONY: dev.c
39
+ dev.c:
40
+ $(MAKE) -C json_model/runtime/c compile
33
41
 
34
42
  .PHONY: dev.js
35
43
  dev.js: node_modules
@@ -50,7 +58,6 @@ dev.java:
50
58
  clean: clean.site
51
59
  $(RM) *~ jmc.1
52
60
  $(MAKE) -C tests clean
53
- $(MAKE) -C json_model/runtime clean
54
61
 
55
62
  .PHONY: clean.js
56
63
  clean.js:
@@ -66,8 +73,13 @@ clean.py:
66
73
  $(RM) -r .pytest_cache .ruff_cache dist venv *.egg-info *.dist-info build
67
74
  find . -type d -name __pycache__ | xargs $(RM) -r
68
75
 
76
+ .PHONY: clean.c
77
+ clean.c:
78
+ $(MAKE) -C json_model/runtime/c clean
79
+
69
80
  .PHONY: clean.dev
70
- clean.dev: clean clean.js clean.site clean.py
81
+ clean.dev: clean clean.js clean.site clean.py clean.c
82
+ $(MAKE) -C json_model/runtime clean
71
83
 
72
84
  #
73
85
  # CHECK
@@ -101,6 +113,28 @@ check.tests: dev
101
113
  source venv/bin/activate
102
114
  $(MAKE) -C tests check
103
115
 
116
+ .PHONY: check.sanity
117
+ check.sanity: venv/.dev
118
+ source venv/bin/activate
119
+ # test directory, model and value
120
+ tmp="$(TMP)/$${USER}/sanity"
121
+ mkdir -p $${tmp} || exit 1
122
+ echo "null" > $${tmp}/null.model.json
123
+ echo '"=42"' > $${tmp}/42.model.json
124
+ echo '""' > $${tmp}/str.model.json
125
+ echo -en "null\n42\n\"hello world!\"" > $${tmp}/values.jsonl
126
+ # compilation
127
+ jmc --version || exit 2
128
+ jmc -o $${tmp}/null.py $${tmp}/null.model.json || exit 2
129
+ jmc -o $${tmp}/42.py $${tmp}/42.model.json || exit 2
130
+ jmc -o $${tmp}/str.py $${tmp}/str.model.json || exit 2
131
+ # validation
132
+ $${tmp}/null.py --version || exit 3
133
+ $${tmp}/null.py --jsonl -T 10 --parse $${tmp}/values.jsonl || exit 3
134
+ $${tmp}/42.py --jsonl -T 10 --parse $${tmp}/values.jsonl || exit 3
135
+ $${tmp}/str.py --jsonl -T 10 --parse $${tmp}/values.jsonl || exit 3
136
+ # keep temporary directory…
137
+
104
138
  #
105
139
  # Docsify Web Site: https://json-model.org/
106
140
  #
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: json_model_compiler
3
- Version: 2.0.49
3
+ Version: 2.0.50
4
4
  Summary: JSON Model Tools
5
5
  Author: Fabien Coelho, Claire Yannou-Medrala
6
6
  License-Expression: CC0-1.0
@@ -18,13 +18,14 @@ Requires-Dist: validators
18
18
  Requires-Dist: fqdn
19
19
  Requires-Dist: json-schema-utils>=0.9.0
20
20
  Provides-Extra: dev
21
+ Requires-Dist: filelock; extra == "dev"
22
+ Requires-Dist: ipython; extra == "dev"
21
23
  Requires-Dist: flake8; extra == "dev"
22
24
  Requires-Dist: ruff; extra == "dev"
23
25
  Requires-Dist: pyright; extra == "dev"
24
26
  Requires-Dist: pytest; extra == "dev"
25
27
  Requires-Dist: pytest-xdist[psutils]; extra == "dev"
26
- Requires-Dist: filelock; extra == "dev"
27
- Requires-Dist: ipython; extra == "dev"
28
+ Requires-Dist: setuptools-git-versioning; extra == "dev"
28
29
  Provides-Extra: dist
29
30
  Requires-Dist: build; extra == "dist"
30
31
  Requires-Dist: wheel; extra == "dist"
@@ -1,5 +1,57 @@
1
1
  # JSON Model Compiler Versions
2
2
 
3
+ ## 2.0.50 2026-05-21
4
+
5
+ - [x] c-runtime: remove some warnings on build
6
+ - [x] front: reduce version display verbosity
7
+ - [x] doc: add release procedure section
8
+ - [x] doc: fix type in jmc pod file
9
+ - [x] test: and minimal working sanity test
10
+ - [x] dev: improve dev setup and cleanup
11
+ - [x] ci: add minimal CI configuration on GitHub
12
+ - [x] main: add parse time measure for Python, JS, C, Java, Perl
13
+ - [x] java-runtime: update to latest JSON libraries
14
+ - [x] js-runtime: bump version
15
+ - [x] pl-runtime: bump version
16
+ - [x] static: fix generated code order determinism (again)
17
+ - [x] utils: ~improve model recurse with optional context~ not needed
18
+ - [x] front: add options to control more optimization phases
19
+ - [x] perf: improve benchmark script to help with next task (`compare.py`)
20
+ - [x] perf: separate perf and show business
21
+ - [x] perf: rewrite perf as a shell load script + sql
22
+ - [x] perf: rewrite show as a python script
23
+ - [x] perf: improve and generalize performance comparison script
24
+ - [x] perf: update benchmark stuff to use new comparison script
25
+ - [x] front: add `--no-precompiled` option
26
+ - [x] front: add `--no-unique-optimize` option
27
+ - [x] perf: compare can use χ² test
28
+ - [x] perf: test with each optimizations disabled to mesure impact
29
+ - [x] perf: analyze identical generated files when comparing same language
30
+ - [x] backend: use current version instead of installed version in generated code
31
+ - [x] js-runtime: fix string length as a number of chars
32
+ - [x] static: allow do disable regex pattern matching
33
+ - [x] static: allow to disable function call shortcuts
34
+ - [x] c-runtime: accept time `24:00:00` (8601-1:2019/Amd 1:2022)
35
+ - [x] test: do not test `24:00:00` as time validators are unlikely to agree
36
+ - [x] container: remove `cstring` add, `cre2` master is now fixed
37
+ - [x] perf: allow to restrict reporting to a subset of tools
38
+ - [x] static: allow disabling more xstatic optimization
39
+ - [x] perf: add note about random frequency governor changes because of cpu temperature
40
+ - [x] perf: show median compilation time instead of min
41
+ - [x] perf: possibly mount jsb as a volume when benchmarking
42
+ - [x] c-runtime: move re header inclusion to `json-model.h`
43
+ - [x] pl-backend: better escape some characters
44
+ - [x] sql-backend: use string escape syntax
45
+ - [x] static: fix int constant comparison typing under loose ints
46
+ - [x] c-backend: fix handling of small chars when building integers
47
+ - [x] static: fix some prop name escaping on reporting
48
+ - [x] java-backend: large int constants need a "L" suffix
49
+ - [x] java-backend: fix long conversion with GSON
50
+ - [x] java-backend: fix GSON issue where null property values are considered missing
51
+ - [x] pl-backend: load "utf8" package to better deal with utf8 constants
52
+ - [x] perf: also add jsb sharing when using js-cli
53
+ - [x] java-runtime: fix GSON null when used in value sets
54
+
3
55
  ## 2.0.49 2026-05-09
4
56
 
5
57
  - [x] front: cleanup obsolete versioning stuff
@@ -3,17 +3,22 @@
3
3
  # Generate a markdown report about the compiler sources
4
4
  #
5
5
 
6
- # version=$(jmc --version)
7
- read version < json_model/data/VERSION
8
- branch=$(git rev-parse --abbrev-ref HEAD)
9
6
  githash=$(git show --pretty=format:"%h on %cs" --no-patch)
10
7
 
8
+ if type jmc > /dev/null ; then
9
+ version=$(jmc --version)
10
+ git_version=$githash
11
+ else
12
+ read version < json_model/data/VERSION
13
+ git_version="$(git rev-parse --abbrev-ref HEAD) $githash"
14
+ fi
15
+
11
16
  cat <<EOF
12
17
  # About JSON Model
13
18
 
14
19
  JSON Model is an on-going [research project](PUBS.md).
15
20
 
16
- The following statistics for version **$version** (\`$branch\` \`$githash\`) show that the compiler,
21
+ The following data about version **$version** (\`$git_version\`) show that the compiler,
17
22
  code generator and runtimes are quite small, but still heavily tested.
18
23
 
19
24
  ## Compiler Source Code
@@ -24,6 +29,7 @@ but excludes language-specific code generators.
24
29
  EOF
25
30
 
26
31
  cloc --md \
32
+ json_model/__init__.py \
27
33
  json_model/analyze.py \
28
34
  json_model/convert.py \
29
35
  json_model/export.py \
@@ -48,10 +48,13 @@ def _str_cmp_chunk(s: str, chunk: bytes, size: int,
48
48
  else:
49
49
  x: str = ""
50
50
  for b in chunk:
51
+ hexa = hex(b)[2:]
52
+ if len(hexa) == 1:
53
+ hexa = "0" + hexa
51
54
  if little:
52
- x = hex(b)[2:] + x
55
+ x = hexa + x
53
56
  else:
54
- x += hex(b)[2:]
57
+ x += hexa
55
58
  # adjust to 4/8 byte boundary
56
59
  zeros = "00" * ((8 if size > 4 else 4) - len(x) // 2)
57
60
  x = "0x" + ((zeros + x) if little else (x + zeros)) + ("LL" if size > 4 else "")
@@ -576,7 +579,7 @@ class CLangJansson(Language):
576
579
  debug: bool = False,
577
580
  with_path: bool = True, with_report: bool = True, with_comment: bool = True,
578
581
  with_predef: bool = True, strcmp_opt: bool = True, regex_opt: bool = True,
579
- inline: bool = True, with_hints: bool = True,
582
+ unique_opt: bool = True, inline: bool = True, with_hints: bool = True,
580
583
  byte_order: str = "le", max_strcmp_cset: int = 64,
581
584
  partition_threshold: int = 32, relib: str = "pcre2", int_t: str = "int64_t"
582
585
  ):
@@ -606,6 +609,7 @@ class CLangJansson(Language):
606
609
  self._inline = "INLINE " if inline else ""
607
610
  self._strcmp_opt = strcmp_opt
608
611
  self._regex_opt = regex_opt
612
+ self._unique_opt = unique_opt
609
613
  self._max_strcmp_cset = max_strcmp_cset
610
614
  # NOTE not necessary equal to the one in CodeGenerator
611
615
  self._partition_threshold = partition_threshold
@@ -619,17 +623,6 @@ class CLangJansson(Language):
619
623
  #
620
624
  def file_header(self, exe: bool = True) -> Block:
621
625
  code: Block = super().file_header(exe)
622
- code += [ "", "// regular expression engine" ]
623
- if self._relib == "pcre2":
624
- code += [
625
- "#define PCRE2_CODE_UNIT_WIDTH 8",
626
- "#include <pcre2.h>",
627
- ]
628
- else:
629
- code += [
630
- "#include <stddef.h>",
631
- "#include <cre2.h>",
632
- ]
633
626
  code += [
634
627
  r"",
635
628
  r"#include <json-model.h>",
@@ -799,13 +792,16 @@ class CLangJansson(Language):
799
792
  return super().check_call(name, val, path, is_ptr=is_ptr, is_raw=is_raw) # type: ignore
800
793
 
801
794
  def check_unique(self, val: JsonExpr, titem: type|None, path: Var) -> BoolExpr:
802
- # checking uniqueness is expensive, use specialized versions to help performance
803
- fun = (
804
- "jm_str_array_is_unique" if titem is str else
805
- "jm_int_array_is_unique" if titem is int else
806
- "jm_obj_array_is_unique" if titem is dict else
807
- "jm_json_array_is_unique"
808
- )
795
+ if self._unique_opt:
796
+ # checking uniqueness is expensive, use specialized versions to help performance
797
+ fun = (
798
+ "jm_str_array_is_unique" if titem is str else
799
+ "jm_int_array_is_unique" if titem is int else
800
+ "jm_obj_array_is_unique" if titem is dict else
801
+ "jm_json_array_is_unique"
802
+ )
803
+ else:
804
+ fun = "jm_json_array_is_unique"
809
805
  return f"{fun}({val}, {self.path(path)}, {self.rep()})"
810
806
 
811
807
  def check_constraint(self, op: str, vop: int|float|str, val: JsonExpr, path: Var) -> BoolExpr:
@@ -0,0 +1 @@
1
+ 2.0.50