json-model-compiler 2.0.49__tar.gz → 2.0.51__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 (130) hide show
  1. json_model_compiler-2.0.51/.github/workflows/sanity.yml +18 -0
  2. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/.gitignore +1 -0
  3. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/BACKLOG.md +52 -12
  4. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/BENCH.md +32 -31
  5. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/DEV.md +30 -0
  6. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/Makefile +37 -3
  7. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/PKG-INFO +4 -3
  8. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/SPEC.md +1 -0
  9. json_model_compiler-2.0.51/VERSION.md +820 -0
  10. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/about.sh +30 -10
  11. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/clang.py +48 -357
  12. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/convert.py +2 -0
  13. json_model_compiler-2.0.51/json_model/data/VERSION +1 -0
  14. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/data/jmc.pod +115 -59
  15. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/export.py +1 -1
  16. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/irep.py +12 -10
  17. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/java.py +16 -6
  18. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/javascript.py +7 -8
  19. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/language.py +24 -15
  20. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/objops.py +6 -0
  21. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/optim.py +81 -42
  22. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/perl.py +29 -11
  23. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/plpgsql.py +27 -8
  24. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/predefs.py +13 -1
  25. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/python.py +9 -4
  26. json_model_compiler-2.0.51/json_model/regex.py +320 -0
  27. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/Makefile +0 -3
  28. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/c/Makefile +1 -1
  29. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/c/json-model.c +33 -16
  30. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/c/json-model.h +12 -0
  31. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/c/main.c +97 -0
  32. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/java/json_model/GSON.java +18 -5
  33. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/java/json_model/Jackson.java +10 -13
  34. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/java/json_model/Main.java +35 -1
  35. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/java/pom.xml +11 -10
  36. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/js/index.js +9 -1
  37. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/js/main.js +26 -3
  38. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/js/package.json +1 -1
  39. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/pl/Changes +2 -0
  40. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/pl/lib/JSON/JsonModel.pm +25 -5
  41. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/support.py +24 -2
  42. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/script.py +122 -69
  43. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/utils.py +15 -0
  44. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/xstatic.py +129 -76
  45. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model_compiler.egg-info/PKG-INFO +4 -3
  46. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model_compiler.egg-info/SOURCES.txt +2 -0
  47. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model_compiler.egg-info/requires.txt +3 -2
  48. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/pyproject.toml +4 -1
  49. json_model_compiler-2.0.49/VERSION.md +0 -744
  50. json_model_compiler-2.0.49/json_model/data/VERSION +0 -1
  51. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/.gitmodules +0 -0
  52. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/API.md +0 -0
  53. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/DESIGN.md +0 -0
  54. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/DOC.md +0 -0
  55. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/HOWTO.md +0 -0
  56. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/INTEGRATION.md +0 -0
  57. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/MANIFEST.in +0 -0
  58. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/PUBS.md +0 -0
  59. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/README.md +0 -0
  60. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/TUTO.md +0 -0
  61. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/README.md +0 -0
  62. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/__init__.py +0 -0
  63. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/analyze.py +0 -0
  64. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/data/clang_entry.c +0 -0
  65. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/data/clang_free.c +0 -0
  66. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/data/clang_init.c +0 -0
  67. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/data/clang_pcre2_fun.c +0 -0
  68. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/data/clang_re2_fun.c +0 -0
  69. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/data/java_free.java +0 -0
  70. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/data/java_init.java +0 -0
  71. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/data/javascript_exe.js +0 -0
  72. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/data/javascript_foot.js +0 -0
  73. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/data/javascript_free.js +0 -0
  74. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/data/javascript_head.js +0 -0
  75. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/data/javascript_init.js +0 -0
  76. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/data/javascript_main.js +0 -0
  77. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/data/perl_entry.pl +0 -0
  78. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/data/perl_exe.pl +0 -0
  79. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/data/perl_free.pl +0 -0
  80. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/data/perl_init.pl +0 -0
  81. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/data/perl_main.pl +0 -0
  82. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/data/perl_pkg.pl +0 -0
  83. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/data/plpgsql_entry.sql +0 -0
  84. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/data/python_entry.py +0 -0
  85. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/data/python_exe.py +0 -0
  86. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/data/python_free.py +0 -0
  87. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/data/python_init.py +0 -0
  88. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/data/python_main.py +0 -0
  89. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/model.py +0 -0
  90. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/mtypes.py +0 -0
  91. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/recurse.py +0 -0
  92. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/resolver.py +0 -0
  93. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/__init__.py +0 -0
  94. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/java/.gitignore +0 -0
  95. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/java/Makefile +0 -0
  96. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/java/README.md +0 -0
  97. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/java/env.sh +0 -0
  98. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/java/json_model/Checker.java +0 -0
  99. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/java/json_model/JSON.java +0 -0
  100. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/java/json_model/JSONP.java +0 -0
  101. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/java/json_model/ModelChecker.java +0 -0
  102. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/java/json_model/Path.java +0 -0
  103. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/java/json_model/Report.java +0 -0
  104. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/java/json_model/Runtime.java +0 -0
  105. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/js/README.md +0 -0
  106. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/pl/.gitignore +0 -0
  107. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/pl/LICENSE +0 -0
  108. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/pl/MANIFEST +0 -0
  109. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/pl/Makefile.PL +0 -0
  110. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/pl/README +0 -0
  111. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/pl/env.sh +0 -0
  112. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/pl/ignore.txt +0 -0
  113. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/pl/t/00-load.t +0 -0
  114. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/pl/t/manifest.t +0 -0
  115. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/pl/t/pod-coverage.t +0 -0
  116. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/pl/t/pod.t +0 -0
  117. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/pl/xt/boilerplate.t +0 -0
  118. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/sql/META.json +0 -0
  119. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/sql/Makefile +0 -0
  120. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/sql/json_model--2.0.sql +0 -0
  121. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/sql/json_model.control +0 -0
  122. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/runtime/types.py +0 -0
  123. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/submodel.py +0 -0
  124. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model/url_cache.py +0 -0
  125. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model_compiler.egg-info/dependency_links.txt +0 -0
  126. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model_compiler.egg-info/entry_points.txt +0 -0
  127. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model_compiler.egg-info/not-zip-safe +0 -0
  128. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/json_model_compiler.egg-info/top_level.txt +0 -0
  129. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/package.json +0 -0
  130. {json_model_compiler-2.0.49 → json_model_compiler-2.0.51}/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,38 @@
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
+ - [ ] c-backend: factor out str extraction in or-list in more cases
6
+ - [ ] pl-backend: use short post-if where possible (filtering)
7
+ - [ ] pl-backend: use `unless` where appropriate (filtering?)
8
+ - [ ] js-backend: remove useless braces and semi-colons
9
+ - [ ] java-backend: remove useless braces
10
+ - [ ] export: generate a [katydid](https://katydid.github.io/) expression, for a compatible subset
11
+ - [ ] front: generate valid minimal, maximal and random values from a model
12
+ - [ ] front: generate invalid minimal values from a model
13
+ - [ ] optim: simplify some '!=' cases
14
+ - [ ] perf: run benchmark for formats/predefs enabled
15
+ - [ ] spec: allow to _remove_ definitions, eg `{ "$stuff": {"/": "$foo"}}`
16
+ - [ ] static: check for common object part
17
+ - [ ] perf: add another loop over performance collection?
18
+ - [ ] models: update ir model wrt recent changes
19
+ - [ ] tests: add test with ir model? on the fly?
20
+ - [ ] front: handle yaml values as well as json
21
+ - [ ] perf: drop and/or merge identical results when comparing
22
+ - [ ] backend: check `mv-34/mu` test case which may require some normalization
23
+ - [ ] runtime: count graphemes instead of characters? for Java, see `java.text.BreakIterator`
24
+ - [ ] pr: improve JSTS test results alignment between all backends (wip)
25
+ - [ ] front: add argument groups
26
+ - [ ] front: merge many internal options to trigrams
27
+ - [ ] perf: add stddev performance computation
11
28
  - [ ] perf: improve resilience to bad overhead estimation
12
- - [ ] pr: switch to semver on version _2.1.0_?
29
+ - [ ] perf: collect JSON parse times for comparison with validation times
13
30
  - [ ] perf: keep only one java run?
31
+ - [ ] perf: check median hack for run times
14
32
  - [ ] perf: show schema to model conversion times
33
+ - [ ] pr: better document optimizations, eg add compilier optimization page
15
34
  - [ ] optim: collect and display stats about what works
16
35
  - [ ] c-backend: improve unique with hash using int set?
17
36
  - [ ] c-backend: improve str hash?
18
- - [ ] js-backend: remove useless braces and semi-colons
19
37
  - [ ] c-backend: use str cmp for ends with optimization as well
20
38
  - [ ] c-backend: improve partitioned cset prettyprinting
21
39
  - [ ] c-backend: use str set partitioning
@@ -53,6 +71,7 @@
53
71
  - [ ] static: take into account str _byte_ len when partitioning
54
72
  - [ ] static: possibly use up to 8 bytes when hashing?
55
73
  - [ ] static: fix hash size to depends on byte encoding, not str len
74
+ - [ ] static: check discriminator first? it help only if it appears first in the values
56
75
  - [ ] perf: test partitioning for js, java, perl, python…
57
76
  - [ ] perf: investigate best settings for js, java and python
58
77
  - [ ] perf: allow to run with any docker image
@@ -116,6 +135,30 @@
116
135
  - [ ] predefs: add country codes, eg `$COUNTRY $COUNTRY2 $COUNTRY3 $COUNTRYN`
117
136
  - [ ] spec: be precise about predefs standard references, eg `$DATE` and co.
118
137
 
138
+ ## Internship
139
+
140
+ - [ ] pr: read www, papers, spec… setup dev env, report issues
141
+ - [ ] pr: try tutorial, report issues and suggest improvements
142
+ - [ ] tests: add a few tests for jsonrpc model
143
+ - [ ] model: write a model for MCP
144
+ - [ ] tests: add a few tests for MCP model
145
+ - [ ] model: update and test `ri.model.json`
146
+ - [ ] export: generate ts interfaces
147
+ - [ ] export: katydid?
148
+ - [ ] backend: improve generated code with filters for js, java, pl
149
+ - [ ] tests: improve predef validators cross-language consistency
150
+ - [ ] tests: generate invalid minimal, maximal, random values
151
+ - [ ] tests: generate invalid values on each constraint
152
+ - [ ] backend: C and runtime with other json lib
153
+ - [ ] backend: C++
154
+ - [ ] backend: go
155
+ - [ ] backend: php
156
+ - [ ] backend: ruby
157
+ - [ ] backend: rust
158
+ - [ ] export: generate annotated java interfaces/classes?
159
+ - [ ] tool: jmc api in flask
160
+ - [ ] front: allow IR re-entrance?
161
+
119
162
  ## Re Do
120
163
 
121
164
  - [ ] pr: publish web page
@@ -175,7 +218,6 @@
175
218
  - [ ] design: add `$URI-REF` or similar? `$PATH`?
176
219
  - [ ] c-backend: add reporting to predef failures?
177
220
  - [ ] 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
221
  - [ ] tests: put generated exe in `/dev/shm` instead of locally from `Makefile`?
180
222
  - [ ] static: improve constraint failing message (length, unique…)
181
223
  - [ ] schema: inline external references to generate working schemas in more cases? (openapi-311)
@@ -210,7 +252,6 @@
210
252
  - [ ] backend: rethink `with_report` and `with_path`, keep the former only?
211
253
  - [ ] c-backend: add support for `re2` wrapper?
212
254
  - [ ] backend: name-based selector optimized for root.
213
- - [ ] perfs: measure performance against blaze benchmark for openapi at least
214
255
  - [ ] python: refactor in preproc tools…
215
256
  - [ ] optim: remove unused introduced names `__external_...`
216
257
  - [ ] optim: remove unused names at depth 1 and more?
@@ -264,7 +305,6 @@
264
305
  - [ ] perf: schema validation on yac data
265
306
  - [ ] perf: open data, eg RNCP and FRESQ
266
307
  - [ ] frontend: loop load/valid for perf
267
- - [ ] perf: reuse blaze data set where possible (implies schema to model)
268
308
  - [ ] design: conditionals or not conditionals… eg for interfaces?
269
309
  if not in the description language, it should be easy to express outside.
270
310
  - [ ] doc: create a clean documentation, following Diátaxis (tuto | howto / explain | reference).
@@ -283,7 +323,7 @@
283
323
  - [ ] rust-backend: see [json crate](https://docs.rs/json/latest/json/).
284
324
  - [ ] cpp-backend: see [json](https://github.com/nlohmann/json) and `re2`. json lib popularity?
285
325
  - [ ] cpp-backend: also see [simdjson](https://github.com/simdjson/simdjson)?
286
- - [ ] backend: direct code for blaze? vs c++?
326
+ - [ ] blaze-backend: use schema export plus simple cpp front or `jsonschema` cli?
287
327
  - [ ] kotlin-backend: see [serialization](https://kotlinlang.org/docs/serialization.html).
288
328
  - [ ] mongodb-backend: generate bson stuff, as an option to schema generation?
289
329
  - [ ] ts-backend: js sharing ?
@@ -9,21 +9,21 @@ schema to model converter in C, JS, Java (GSON, Jackson and JSONP using Johnzon)
9
9
 
10
10
  ## Recent Artifacts
11
11
 
12
- - [2026050900](benchmarks/2026050900.md) clang, no predefs, jsu 0.9.8/jmc 2.0b48 vs sbc 15.6.0, 11 runs, 1000 iterations.
13
- - [2026050800](benchmarks/2026050800.md) clang, no predefs, jsu 0.9.8/jmc 2.0b48 vs sbc 15.5.0, 11 runs, 1000 iterations.
14
- - [2026050703](benchmarks/2026050703.md) clang, no predefs, jsu 0.9.8/jmc 2.0b48 vs sbc 15.4.0, 11 runs, 1000 iterations.
15
- - [2026050700](benchmarks/2026050700.md) clang, no predefs, jsu 0.9.6/jmc 2.0b46 vs sbc 15.4.0, 11 runs, 1000 iterations.
16
- - [2026050304](benchmarks/2026050304.md) clang, no predefs, jsu 0.9.6/jmc 2.0b46 vs sbc 15.2.0, 11 runs, 1000 iterations.
17
- - [2026042800](benchmarks/2026042800.md) clang, no predefs, jsu 0.9.6/jmc 2.0b45 vs sbc 15.2.0, 11 runs, 1000 iterations.
18
- - [2026042700](benchmarks/2026042700.md) clang, no predefs, jsu 0.9.6/jmc 2.0b45 vs sbc 15.1.0, 11 runs, 1000 iterations.
19
- - [2026042503](benchmarks/2026042503.md) clang, no predefs, jsu 0.9.6/jmc 2.0b45 vs sbc 15.0.0, 11 runs, 1000 iterations.
20
- - [2026042500](benchmarks/2026042500.md) clang, no predefs, jsu 0.9.5/jmc 2.0b44 vs sbc 15.0.0, 11 runs, 1000 iterations.
21
- - [2026042400](benchmarks/2026042400.md) clang, no predefs, jsu 0.9.4/jmc 2.0b43 vs sbc 15.0.0, 11 runs, 1000 iterations.
22
- - [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.
12
+ Overall, depending on the chosen metrics, the JSU converter and JMC C backend are 50 to 90%
13
+ faster than Blaze in these artifacts.
14
+
15
+ - [2026062102](benchmarks/2026062102.md) clang, no predefs, jsu 0.9.10/jmc 2.0.50 vs sbc 16.0.0, 11 runs, 1000 iterations.
16
+ - [2026061700](benchmarks/2026061700.md) clang, no predefs, jsu 0.9.9/jmc 2.0.50 vs sbc 16.0.0, 11 runs, 1000 iterations.
17
+ - [2026061300](benchmarks/2026061300.md) clang, no predefs, jsu 0.9.9/jmc 2.0.50 vs sbc 15.11.0, 11 runs, 1000 iterations.
18
+ - [2026061000](benchmarks/2026061000.md) clang, no predefs, jsu 0.9.9/jmc 2.0.50 vs sbc 15.10.1, 11 runs, 1000 iterations.
19
+ - [2026061001](benchmarks/2026061001.md) clang, no predefs, jsu 0.9.9/jmc 2.0.50 vs sbc 15.10.0, 11 runs, 1000 iterations.
20
+ - [2026060900](benchmarks/2026060900.md) clang, no predefs, jsu 0.9.9/jmc 2.0.50 vs sbc 15.9.0, 11 runs, 1000 iterations.
21
+ - [2026060300](benchmarks/2026060300.md) clang, no predefs, jsu 0.9.9/jmc 2.0.50 vs sbc 15.8.0, 11 runs, 1000 iterations.
22
+ - [2026060200](benchmarks/2026060200.md) clang, no predefs, jsu 0.9.9/jmc 2.0.50 vs sbc 15.7.0, 11 runs, 1000 iterations.
23
+ - [2026052105](benchmarks/2026052105.md) clang, no predefs, jsu 0.9.9/jmc 2.0.50 vs sbc 15.6.3, 11 runs, 1000 iterations.
24
+ - [2026051900](benchmarks/2026051900.md) clang, no predefs, jsu 0.9.9/jmc 2.0.49 vs sbc 15.6.3, 11 runs, 1000 iterations.
25
+ - [2026051701](benchmarks/2026051701.md) clang, no predefs, jsu 0.9.9/jmc 2.0.49 vs sbc 15.6.2, 11 runs, 1000 iterations.
26
+ - [2026051200](benchmarks/2026051200.md) clang, no predefs, jsu 0.9.9/jmc 2.0.49 vs sbc 15.6.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,9 +73,13 @@ 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.
78
- - the measure overhead is estimated and deduced from the performance figures,
79
- which leads to potentially fuzzy results on very small data and schemas.
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, thus the frequency may be set
78
+ explicitely, and effort are made to cap the load to limit its impact on measures.
79
+ - Relying on hyper-threading can reduce performance for simple one thread tasks,
80
+ so it is often disabled.
81
+ - the measure overhead is estimated and deduced from the performance figures by default,
82
+ which leads to potentially fuzzy results when testing very small values.
80
83
  - compilers, libraries and other design and updates can have dramatic effects:
81
84
  for faster parsing, a library may use linked-list for properties, which means
82
85
  that retrieving a given property value will cost more than a library which uses
@@ -85,7 +88,8 @@ the following caveats, and others:
85
88
  so these checks may be disactivated (see `JMC_OPTS`) for fairness,
86
89
  reducing the results significance.
87
90
  - blaze uses its own special-purpose JSON representation which include a precomputed
88
- custom hash for string comparisons.
91
+ custom hash for string comparisons, aleviating the need to actually compare strings
92
+ in most cases.
89
93
  - blaze is a C++ library, if interfaced from another language, the cost of translating
90
94
  the JSON representation to this library should be taken into account;
91
95
  in contrast, jmc uses native JSON representations in the target ecosystem and generate
@@ -95,10 +99,10 @@ the following caveats, and others:
95
99
  model definitions compared to lax schemas…
96
100
  - it is unclear whether JIT optimizations (eg Java and JS) may work around the
97
101
  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.
102
+ - some execution environment (eg Java) take advantage of parallelism with threads (possibly
103
+ for the garbage collector and JIT), which may or may not be a blessing: it can reduce
104
+ the apparent latency (eg the gc runs in another thread) but have a detrimental overall
105
+ effect on throughput and costs as more cpu ressources are spent on the same task.
102
106
 
103
107
  ## Other Artifacts
104
108
 
@@ -112,8 +116,8 @@ C, JS and Python backends, using the `jsu-compile` command.
112
116
  It should be noted that benchmarking conditions are quite different compared to our own:
113
117
 
114
118
  1. There is no loop to compute an average performance, but an initial _cold_ one-shot measure,
115
- a warming phase loop and a _hot_ one-shot measure: This may tend to mask effects from
116
- occasional GC runs.
119
+ a warming phase loop (up to 1000 rounds, kept under 10 seconds) and a _hot_ one-shot measure:
120
+ This may tend to mask effects from occasional GC runs.
117
121
  2. The benchmark focuses on schema conformance, including (buggy) schemas which
118
122
  are mostly dead code: It rejects tools which do not validate all strictly conformant
119
123
  values, even if these values would be rejected by the target application.
@@ -121,9 +125,6 @@ It should be noted that benchmarking conditions are quite different compared to
121
125
  [edited](https://github.com/sourcemeta-research/jsonschema-benchmark/commit/ad109eb210c0939bd8393da28d8212f75c1c2d92),
122
126
  especially to deal corner cases issues with `$ref` under version 7 and prior,
123
127
  thus do not conform to the initial official schemas.
124
- 4. The benchmark _removes_ format assertions before testing the schemas.
128
+ 4. The benchmark _removes_ format assertions before testing schemas.
125
129
  5. The model used are strictly converted from schemas, native models are not used
126
130
  even if available and schemas are not fixed for typical errors (eg misplaced keywords).
127
-
128
- As of May 2026, the JSU C implementation is faster than Blaze on about 55% of benchmark cases
129
- 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.51
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"
@@ -147,6 +147,7 @@ for all possible values for that type.
147
147
  - `"$CARD"`: a credit card number with a Luhn checksum, eg _1234567890123452_
148
148
  - `"$JSONPT"`: an RFC6901 json pointer, eg _/http:~1~1json-model.org_
149
149
  - `"$TIMETZ"`: time with timezone
150
+ - `"$SEMVER"`: semantic versioning 2.0
150
151
 
151
152
  Any other all-capital ASCII character and digit names must be rejected as they
152
153
  are reserved for possible future predefs (eg URN, Luhn, ISBN, ISSN, EAN, DOI…).