json-model-compiler 2.0.58__tar.gz → 2.0.59__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 (132) hide show
  1. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/BACKLOG.md +13 -32
  2. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/BENCH.md +21 -17
  3. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/Makefile +1 -1
  4. {json_model_compiler-2.0.58/json_model_compiler.egg-info → json_model_compiler-2.0.59}/PKG-INFO +1 -1
  5. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/SPEC.md +2 -0
  6. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/VERSION.md +18 -0
  7. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/about.sh +1 -1
  8. json_model_compiler-2.0.59/json_model/data/VERSION +1 -0
  9. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/optim.py +46 -5
  10. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/submodel.py +21 -9
  11. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59/json_model_compiler.egg-info}/PKG-INFO +1 -1
  12. json_model_compiler-2.0.58/json_model/data/VERSION +0 -1
  13. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/.github/workflows/docs.yml +0 -0
  14. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/.github/workflows/sanity.yml +0 -0
  15. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/.gitignore +0 -0
  16. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/.gitmodules +0 -0
  17. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/API.md +0 -0
  18. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/DESIGN.md +0 -0
  19. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/DEV.md +0 -0
  20. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/DOC.md +0 -0
  21. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/HOWTO.md +0 -0
  22. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/INTEGRATION.md +0 -0
  23. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/MANIFEST.in +0 -0
  24. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/PUBS.md +0 -0
  25. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/README.md +0 -0
  26. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/TUTO.md +0 -0
  27. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/bench.sh +0 -0
  28. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/README.md +0 -0
  29. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/__init__.py +0 -0
  30. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/analyze.py +0 -0
  31. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/clang.py +0 -0
  32. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/convert.py +0 -0
  33. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/data/clang_entry.c +0 -0
  34. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/data/clang_free.c +0 -0
  35. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/data/clang_init.c +0 -0
  36. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/data/clang_pcre2_fun.c +0 -0
  37. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/data/clang_re2_fun.c +0 -0
  38. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/data/java_free.java +0 -0
  39. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/data/java_init.java +0 -0
  40. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/data/javascript_exe.js +0 -0
  41. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/data/javascript_foot.js +0 -0
  42. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/data/javascript_free.js +0 -0
  43. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/data/javascript_head.js +0 -0
  44. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/data/javascript_init.js +0 -0
  45. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/data/javascript_main.js +0 -0
  46. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/data/jmc.pod +0 -0
  47. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/data/perl_entry.pl +0 -0
  48. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/data/perl_exe.pl +0 -0
  49. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/data/perl_free.pl +0 -0
  50. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/data/perl_init.pl +0 -0
  51. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/data/perl_main.pl +0 -0
  52. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/data/perl_pkg.pl +0 -0
  53. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/data/plpgsql_entry.sql +0 -0
  54. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/data/python_entry.py +0 -0
  55. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/data/python_exe.py +0 -0
  56. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/data/python_free.py +0 -0
  57. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/data/python_init.py +0 -0
  58. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/data/python_main.py +0 -0
  59. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/export.py +0 -0
  60. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/irep.py +0 -0
  61. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/java.py +0 -0
  62. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/javascript.py +0 -0
  63. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/language.py +0 -0
  64. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/model.py +0 -0
  65. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/mtypes.py +0 -0
  66. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/objops.py +0 -0
  67. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/perl.py +0 -0
  68. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/plpgsql.py +0 -0
  69. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/predefs.py +0 -0
  70. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/python.py +0 -0
  71. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/recurse.py +0 -0
  72. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/regex.py +0 -0
  73. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/resolver.py +0 -0
  74. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/Makefile +0 -0
  75. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/__init__.py +0 -0
  76. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/c/Makefile +0 -0
  77. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/c/json-model.c +0 -0
  78. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/c/json-model.h +0 -0
  79. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/c/main.c +0 -0
  80. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/java/.gitignore +0 -0
  81. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/java/Makefile +0 -0
  82. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/java/README.md +0 -0
  83. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/java/env.sh +0 -0
  84. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/java/json_model/Checker.java +0 -0
  85. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/java/json_model/GSON.java +0 -0
  86. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/java/json_model/JSON.java +0 -0
  87. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/java/json_model/JSONP.java +0 -0
  88. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/java/json_model/Jackson.java +0 -0
  89. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/java/json_model/Main.java +0 -0
  90. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/java/json_model/ModelChecker.java +0 -0
  91. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/java/json_model/Path.java +0 -0
  92. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/java/json_model/Report.java +0 -0
  93. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/java/json_model/Runtime.java +0 -0
  94. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/java/pom.xml +0 -0
  95. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/js/README.md +0 -0
  96. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/js/index.js +0 -0
  97. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/js/main.js +0 -0
  98. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/js/package.json +0 -0
  99. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/pl/.gitignore +0 -0
  100. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/pl/Changes +0 -0
  101. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/pl/LICENSE +0 -0
  102. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/pl/MANIFEST +0 -0
  103. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/pl/Makefile.PL +0 -0
  104. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/pl/README +0 -0
  105. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/pl/env.sh +0 -0
  106. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/pl/ignore.txt +0 -0
  107. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/pl/lib/JSON/JsonModel.pm +0 -0
  108. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/pl/t/00-load.t +0 -0
  109. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/pl/t/manifest.t +0 -0
  110. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/pl/t/pod-coverage.t +0 -0
  111. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/pl/t/pod.t +0 -0
  112. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/pl/xt/boilerplate.t +0 -0
  113. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/sql/META.json +0 -0
  114. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/sql/Makefile +0 -0
  115. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/sql/json_model--2.0.sql +0 -0
  116. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/sql/json_model.control +0 -0
  117. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/support.py +0 -0
  118. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/runtime/types.py +0 -0
  119. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/script.py +0 -0
  120. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/ts_export.py +0 -0
  121. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/url_cache.py +0 -0
  122. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/utils.py +0 -0
  123. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model/xstatic.py +0 -0
  124. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model_compiler.egg-info/SOURCES.txt +0 -0
  125. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model_compiler.egg-info/dependency_links.txt +0 -0
  126. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model_compiler.egg-info/entry_points.txt +0 -0
  127. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model_compiler.egg-info/not-zip-safe +0 -0
  128. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model_compiler.egg-info/requires.txt +0 -0
  129. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/json_model_compiler.egg-info/top_level.txt +0 -0
  130. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/package.json +0 -0
  131. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/pyproject.toml +0 -0
  132. {json_model_compiler-2.0.58 → json_model_compiler-2.0.59}/setup.cfg +0 -0
@@ -2,59 +2,51 @@
2
2
 
3
3
  ## Current Tasks
4
4
 
5
+ - [ ] export: generate a [katydid](https://katydid.github.io/) expression, for a compatible subset
6
+ - [ ] pr: add _known limitations_ stuff
5
7
  - [ ] front: merge many internal options to trigrams
6
8
  - [ ] bench: case failures handling needs some fixing
7
9
  - [ ] tests: check more bad urls (eg bad %-escape)
8
10
  - [ ] tests: check pydantic generated classes
9
- - [ ] tests: run dyn per model instead of per-dir
10
- - [ ] tests: run language per model instead of per-dir
11
11
  - [ ] static: use combined type test and value extraction when available?
12
- - [ ] c-backend: factor out str extraction in or-list in more cases
13
- - [ ] export: generate a [katydid](https://katydid.github.io/) expression, for a compatible subset
14
12
  - [ ] static: recursive multi-discriminator hierarchisation? See UI5.
15
13
  - [ ] static: factor out common checks on `&` with shared constraints?
16
14
  - [ ] static: check for common object part?
17
15
  - [ ] front: generate valid minimal, maximal and random values from a model
18
16
  - [ ] front: generate invalid minimal values from a model
19
17
  - [ ] optim: simplify some '!=' cases
18
+ - [ ] optim: collect and display stats about what works
20
19
  - [ ] spec: allow to _remove_ definitions, eg `{ "$stuff": {"/": "$foo"}}`
20
+ - [ ] spec: restrict regex syntax to a smaller subset
21
21
  - [ ] perf: add another loop over performance collection?
22
22
  - [ ] perf: drop and/or merge identical results when comparing
23
- - [ ] backend: check `mv-34/mu` test case which may require some normalization
23
+ - [ ] backend: check `mv-34/mu` test case which may require some utf normalization
24
24
  - [ ] runtime: count graphemes instead of characters? for Java, see `java.text.BreakIterator`
25
- - [ ] pr: improve JSTS test results alignment between all backends (wip)
26
- - [ ] perf: add stddev performance computation
27
- - [ ] perf: improve resilience to bad overhead estimation
28
- - [ ] perf: collect JSON parse times for comparison with validation times
29
- - [ ] perf: keep only one java run?
30
- - [ ] perf: check median hack for run times
31
- - [ ] perf: show schema to model conversion times
25
+ - [ ] bench: add stddev performance computation
26
+ - [ ] bench: improve resilience to bad overhead estimation
27
+ - [ ] bench: collect JSON parse times for comparison with validation times
32
28
  - [ ] pr: better document optimizations, eg add compiler optimization page
33
- - [ ] optim: collect and display stats about what works
29
+ - [ ] static: improve startswith pattern recognition `/^xyz.*/`
30
+ - [ ] c-backend: factor out str extraction in or-list in more cases
34
31
  - [ ] c-backend: improve unique with hash using int set?
35
32
  - [ ] c-backend: improve str hash?
36
33
  - [ ] c-backend: use str cmp for ends with optimization as well
37
34
  - [ ] c-backend: improve partitioned cset prettyprinting
38
35
  - [ ] c-backend: use str set partitioning
39
36
  - [ ] c-backend: simplify parameters for accelerated functions
40
- - [ ] c-runtime: use own hash instead of qsort/bsearch stuff?
41
- - [ ] static: could sorted property name comparison be used for some scans??
42
37
  - [ ] c-backend: fast str comparison could take advantage of known strlen??
43
38
  - [ ] c-backend: property name length for jansson is stored at `(str_ptr - sizeof(size_t))`
44
39
  - [ ] c-backend: use knowledge of Jansson hash to improve property lookup??
45
40
  - [ ] c-backend: generate custom character class ascii tables?
46
41
  - [ ] c-backend: custom char classes: `[:-] [a-zA-Z0-9_\\.\\-\\|@#] [a-zA-Z_$] [a-zA-Z0-9_\\-] [a-zA-Z0-9_.:-]`
47
42
  - [ ] c-backend: handle small char classes?
48
- - [ ] optim: remove props which match the default, in some cases?
49
- - [ ] optim: regex list of words to enum?
50
- - [ ] static: improve startswith pattern recognition `/^xyz.*/`
43
+ - [ ] c-runtime: use own hash instead of qsort/bsearch stuff?
44
+ - [ ] static: could sorted property name comparison be used for some scans??
45
+ - [ ] backend: check leap-second support on `$DATETIME` and `$TIME`
51
46
  - [ ] tests: fast mode which does not execute if source has not changed
52
47
  - [ ] predefs: extension for _uri reference_, _iri reference_, _uri template_
53
48
  - [ ] predefs: _url_ vs _uri_ vs _iri_
54
49
  - [ ] predefs: improve `$URI` and `$URL`
55
- - [ ] backend: check leap-second support on `$DATETIME` and `$TIME`
56
- - [ ] doc: add _known limitations_ stuff
57
- - [ ] spec: restrict regex syntax to a smaller subset
58
50
  - [ ] predefs: add `$SIMPLE_REGEX` for regex syntax subset?
59
51
  - [ ] docker: enable user remap
60
52
  - [ ] export: java classes
@@ -90,15 +82,9 @@
90
82
  - [ ] c-backend: more typed cset optimizations?
91
83
  - [ ] static: partial discriminator with else?
92
84
  - [ ] static: optimize not string cst test?
93
- - [ ] tests: add ir optimized output (too large?)
94
- - [ ] tests: drop language outputs for IR only?!
95
- - [ ] tests: add pytest ir tests
96
- - [ ] tests: add generated ir model check
97
- - [ ] tests: check generated IR with IR model
98
85
  - [ ] static: close may/must? merge with open?
99
86
  - [ ] static: add a dynamic test for different strategies in object checking
100
87
  - [ ] backend: refactor ir optimizations
101
- - [ ] command: add direct ir to lang conversion
102
88
  - [ ] artifact: make work with dind (docker compose?)
103
89
  - [ ] static: recognize already compile objects and reuse function esp under no-reporting?
104
90
  - [ ] tests: add non regression tests to docker build
@@ -111,21 +97,16 @@
111
97
  - [ ] pr: write `optimizations.model.json` for illustration
112
98
  - [ ] pr: write `transformation.model.json` for illustration
113
99
  - [ ] pr: sync version number for **all** published parts for _2.0_ release
114
- - [ ] design: review `$URI` and other predefs
115
100
  - [ ] design: transformation rename, `~` with a map? move path to path? eg mandatory to optional?
116
101
  - [ ] design: add predefs for `$UUIDx`…
117
102
  - [ ] predefs: implement `$I32 $I64 $U32 $U64`
118
- - [ ] pr: tuto add perl and java environment directives? dependencies?
119
103
  - [ ] export: improve pydantic, do not generate bad fields (dash and other chars)
120
104
  - [ ] tests: some pydantic exports? imports?
121
- - [ ] pr: submit jsonschema-benchmark java PR
122
105
  - [ ] frontends: reject json with duplicated props
123
106
  - [ ] c-backend: header file for generated code?
124
107
  - [ ] backend: implement str comparison using some fast hash in some cases?
125
108
  - [ ] command: allow to pass some options from rc file?
126
- - [ ] tests: parallelize per-case instead of per-dir?
127
109
  - [ ] static: shorten xor exit?
128
- - [ ] c-backend: use vector instructions for larger strcmp?
129
110
  - [ ] export: sqlalchemy?
130
111
  - [ ] predefs: add country codes, eg `$COUNTRY $COUNTRY2 $COUNTRY3 $COUNTRYN`
131
112
  - [ ] spec: be precise about predefs standard references, eg `$DATE` and co.
@@ -113,24 +113,28 @@ the following caveats, and others:
113
113
  [JSON Schema Benchmark](https://github.com/sourcemeta-research/jsonschema-benchmark)
114
114
  also provides
115
115
  [benchmark artifacts](https://github.com/sourcemeta-research/jsonschema-benchmark/actions)
116
- which includes 16 JSON Schema validation tools including our compiler with
116
+ which includes 15 JSON Schema validation tools including our compiler with
117
117
  C, JS and Python backends, using the `jsu-compile` command only.
118
118
 
119
119
  It should be noted that benchmarking conditions are quite different compared to our own:
120
120
 
121
- 1. There is no loop to compute an average performance, but an initial _cold_ one-shot measure,
122
- a warming phase loop (up to 1000 rounds, kept under 10 seconds) and a _hot_ one-shot measure:
123
- This may tend to mask effects from occasional GC runs.
124
- 2. Performance data are collected on all tests taken together: this is less favorable to cache
125
- effects, and makes it impossible to investigate individual test figures.
126
- 3. The benchmark focuses on schema conformance, including (buggy) schemas which
127
- are mostly dead code: It rejects tools which do not validate all strictly conformant
128
- values, even if these values would be rejected by the target application.
129
- The model used are strictly converted from schemas, native models are not used
130
- even if available and schemas are not fixed for typical errors (eg misplaced keywords).
131
- 4. The benchmark _removes_ format assertions before testing schemas.
132
-
133
- Notably, three schemas (`krakend`, `stale` and `yamllint`) in the test suites have been
134
- [edited](https://github.com/sourcemeta-research/jsonschema-benchmark/commit/ad109eb210c0939bd8393da28d8212f75c1c2d92),
135
- as a work around corner cases issues with `$ref` under version 7 and prior,
136
- thus do not conform to the initial official schemas.
121
+ 1. The benchmark focusses on comparing JSON Schema implementations,
122
+ whereas we focus on comparing JSON validators:
123
+ For JSU/JMC, native models are ignored and only models converted from schemas are used.
124
+ 2. Format assertions are removed before testing schemas, whereas we include them.
125
+ 3. Three schemas (`krakend`, `stale` and `yamllint`) have been
126
+ [edited](https://github.com/sourcemeta-research/jsonschema-benchmark/commit/ad109eb210c0939bd8393da28d8212f75c1c2d92),
127
+ as a work around corner cases issues with `$ref` under version 7 and prior,
128
+ thus do not conform to the initial official schemas:
129
+ These schemas perform very few checks on the JSON test values, making it less significant.
130
+ 4. Data collection is quite different:
131
+ - There is no loop to compute an average performance, but an initial _cold_ one-shot measure,
132
+ a warming phase loop (up to 1000 rounds, kept under 10 seconds) and a _hot_ one-shot measure:
133
+ This may tend to mask effects from occasional GC runs.
134
+ - All tests for one schema are measured together: this reduces measure overheads,
135
+ is less favorable to cache effects, and makes it impossible to investigate
136
+ individual test figures.
137
+ 5. Performance runs uses multiple dockers through github actions:
138
+ Runners assigned to the job are not always homogeneous, resulting in significant variations
139
+ from one run to the next.
140
+
@@ -23,7 +23,7 @@ venv/.init:
23
23
 
24
24
  venv/.dev: venv/.init
25
25
  pip install -e .[dev]
26
- [ -d ../json-schema-utils ] && pip intall -e ../json-schema-utils
26
+ [ -d ../json-schema-utils ] && pip install -e ../json-schema-utils
27
27
  touch $@
28
28
 
29
29
  venv/.dist: venv/.dev
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: json_model_compiler
3
- Version: 2.0.58
3
+ Version: 2.0.59
4
4
  Summary: JSON Model Tools
5
5
  Author: Fabien Coelho, Claire Yannou-Medrala
6
6
  License-Expression: CC0-1.0
@@ -665,6 +665,8 @@ JSON Model meta-model is available [here](https://json-model.org/models/json-mod
665
665
  - import override operator for objects? `<`
666
666
  - expand constrained models?
667
667
  - what predefs should be relevant to typical use cases?
668
+ - drop redundant "!" sentinel char for properties?
669
+ - property and string sentinels could be mandatory to avoid considering values as models
668
670
 
669
671
  - **From JSON Model v1 to v2**
670
672
 
@@ -1,5 +1,23 @@
1
1
  # JSON Model Compiler Versions
2
2
 
3
+ ## 2.0.59 on 2026-08-28
4
+
5
+ - bench: fix standard cron runs
6
+ - bench: minor report styling
7
+ - pr: improve bench artifact discussion
8
+ - tests: ~run dyn per-model instead of per-dir~ not needed, load balancing is ok
9
+ - tests: ~run language per-model instead of per-dir~ idem
10
+ - pr: improve JSTS test results alignment between all backends (minor diffs remain)
11
+ - optim: regex list of words to enum
12
+ - optim: remove props which match the default
13
+ - models: add example model for JTD (JSON Type Definition)
14
+ - tests: fix directory display by using str params
15
+ - pr: update check count in about page
16
+ - optim: simplify subtypes in or-lists
17
+ - optim: fix more model comparison issues related to python `==` operator
18
+ - container: improve build caching by combining ADD + RUN git ...
19
+ - bench: check minimum generated file sizes
20
+
3
21
  ## 2.0.58 on 2026-08-24
4
22
 
5
23
  - pr: improve bench script
@@ -157,7 +157,7 @@ on a set of test vectors.
157
157
  - Number of test vector JSON values: _${n_values}_
158
158
  - All tested JSON values (including models, generated schemas and IR, and test suite schemas): _${all_values}_
159
159
 
160
- Over _150,000_ checks are performed when running non-regression tests:
160
+ Over _170,000_ assertion checks are performed when running non-regression tests:
161
161
  generated files, values validated in various languages…
162
162
 
163
163
  [Example models](https://json-model.org/MODELS) cover typical use cases and demonstrate
@@ -0,0 +1 @@
1
+ 2.0.59
@@ -4,7 +4,7 @@
4
4
  import re
5
5
  from .mtypes import ModelPath, ModelType, OperatorError
6
6
  from .utils import log, is_cst, _structurally_distinct_models, model_type, is_base_model
7
- from .utils import constant_values, same_model, model_eq, simple_object
7
+ from .utils import constant_values, same_model, model_eq, simple_object, is_a_simple_object
8
8
  from .recurse import recModel, allFlt, builtFlt, noRwt
9
9
  from .model import JsonModel
10
10
  from .submodel import normalizeModel, is_submodel
@@ -341,6 +341,22 @@ def partial_eval(jm: JsonModel):
341
341
  changes += 1
342
342
  mdell("$STRING", lor)
343
343
 
344
+ # or subtypes removal
345
+ if len(lor) >= 2:
346
+ deletes = set()
347
+ for i, mi in enumerate(lor):
348
+ for j, mj in enumerate(lor):
349
+ if i == j or i in deletes or j in deletes:
350
+ continue
351
+ if is_submodel(jm, mi, mj):
352
+ # log.warning(f"{mi} is submodel of {mj}")
353
+ deletes.add(i)
354
+ if deletes:
355
+ # log.warning(f"lor={lor} deletes={deletes}")
356
+ for d in reversed(sorted(deletes)):
357
+ changes += 1
358
+ lor.pop(d)
359
+
344
360
  # others
345
361
  if len(lor) == 0:
346
362
  changes += 1
@@ -376,14 +392,14 @@ def partial_eval(jm: JsonModel):
376
392
  if minl(0.0, land) and minl(1.0, land):
377
393
  mdell(0.0, land)
378
394
 
379
- # subtype optimization XXX
380
- deletes = []
395
+ # and super type optimization
396
+ deletes = set()
381
397
  for i, mi in enumerate(land):
382
398
  for j, mj in enumerate(land):
383
399
  if i == j or i in deletes or j in deletes:
384
400
  continue
385
401
  if is_submodel(jm, mi, mj):
386
- deletes.append(j)
402
+ deletes.add(j)
387
403
  if deletes:
388
404
  for d in reversed(sorted(deletes)):
389
405
  changes += 1
@@ -623,11 +639,26 @@ def simplify(jm: JsonModel):
623
639
  def simpRwt(model: ModelType, path: ModelPath) -> ModelType:
624
640
  nonlocal changes
625
641
  if isinstance(model, dict):
642
+ # simpler object props
626
643
  for old, new in [ ("//", ""), ("/^$/", "?")]:
627
644
  # FIXME in some corner case the simplification may be wrong…
628
645
  if old in model and new not in model:
629
646
  model[new] = model[old]
630
647
  del model[old]
648
+ # objects, remove useless optional properties
649
+ if is_a_simple_object(model):
650
+ # { "?a": 1, "": 1 } -> { "": 1 }
651
+ has_regprop = any(p.startswith("/") for p in model)
652
+ has_refprop = any(p.startswith("$") for p in model)
653
+ has_anyprop = "" in model
654
+ has_optprop = any(p.startswith("?") for p in model)
655
+ if has_optprop and not has_regprop and not has_refprop and has_anyprop:
656
+ any_model = model[""]
657
+ for prop, mod in list(model.items()):
658
+ if prop.startswith("?") and same_model(mod, any_model):
659
+ changes += 1
660
+ del model[prop]
661
+ # simpler constraints
631
662
  if "@" in model:
632
663
  # FIXME
633
664
  ultimate = ultimate_type(jm, model)
@@ -886,6 +917,7 @@ _SIMPLER_RE: dict[str, str] = {
886
917
  }
887
918
 
888
919
  def _simpler_regex(regex: str) -> str:
920
+ # TODO under slr we can handle more cases, eg ".*$/"
889
921
  if regex == "" or regex[0] != "/":
890
922
  return regex
891
923
  elif regex in _SIMPLER_RE:
@@ -898,6 +930,8 @@ def _simpler_regex(regex: str) -> str:
898
930
  return regex[:-5] + "/"
899
931
  elif regex.endswith("(.*)/s") and not regex.endswith("\\(.*)/s"):
900
932
  return regex[:-6] + "/s"
933
+ elif regex.endswith("(.*)\\$/s") and not regex.endswith("\\(.*)\\$/s"):
934
+ return regex[:-8] + "/s"
901
935
  elif regex.endswith(".+/"):
902
936
  return regex[:-2] + "/"
903
937
  elif regex.endswith(".+/s"):
@@ -909,6 +943,11 @@ def _simpler_regex(regex: str) -> str:
909
943
  elif re.match(r"^/\[[^\]]*]\*/$", regex): # unanchored whatever chars repeated from zero
910
944
  # FIXME improve regex?
911
945
  return ""
946
+ elif re.match(r"^/\^\([-a-zA-Z0-9_]*(\|[-a-zA-Z0-9_]*)*\)\$/$", regex):
947
+ # re to list of words
948
+ # FIXME is this always a good idea?
949
+ words = sorted(set(regex[3:-3].split("|")))
950
+ return { "|": [ f"_{w}" for w in words ] }
912
951
  else:
913
952
  return regex
914
953
 
@@ -927,7 +966,9 @@ def simpler_regex(jm: JsonModel) -> bool:
927
966
  for p in list(model):
928
967
  if p and p[0] == "/":
929
968
  pp = _simpler_regex(p)
930
- if pp != p and (pp not in model or pp in model and model[pp] == "$ANY"):
969
+ if not isinstance(pp, str):
970
+ pass
971
+ elif pp != p and (pp not in model or pp in model and model[pp] == "$ANY"):
931
972
  changes += 1
932
973
  model[pp] = model[p]
933
974
  del model[p]
@@ -1,7 +1,7 @@
1
1
  from .mtypes import ModelType, ModelPath, ModelError, ModelObject
2
2
  from .mtypes import Jsonable, JsonObject, ValueType
3
3
  from .model import JsonModel
4
- from .utils import log
4
+ from .utils import log, model_eq
5
5
  from . import utils
6
6
  from . import predefs
7
7
 
@@ -68,12 +68,12 @@ def structure(model: ModelType) -> str|None:
68
68
 
69
69
  # TODO memoize?
70
70
  def is_submodel(jm: JsonModel, m1: ModelType, m2: ModelType) -> bool:
71
- """Tell whether m1 is a submodel of m2."""
71
+ """Tell whether m1 is a submodel of m2, i.e. is stricter than m2."""
72
72
 
73
- # log.debug(f"submodel: m1={m1} m2={m2}")
73
+ # log.debug(f"submodel 0: m1={m1} m2={m2}")
74
74
 
75
75
  # quick shortcut
76
- if m1 == m2 or m1 == "$NONE" or m2 == "$ANY":
76
+ if model_eq(m1, m2) or m1 == "$NONE" or m2 == "$ANY":
77
77
  return True
78
78
  if m2 == "$NONE":
79
79
  return False
@@ -86,8 +86,10 @@ def is_submodel(jm: JsonModel, m1: ModelType, m2: ModelType) -> bool:
86
86
  # and normalize
87
87
  m1, m2 = normalizeModel(m1), normalizeModel(m2)
88
88
 
89
+ # log.debug(f"submodel 1: m1={m1} m2={m2}")
90
+
89
91
  # shortcut again
90
- if m1 == m2 or m1 == "$NONE" or m2 == "$ANY":
92
+ if model_eq(m1, m2) or m1 == "$NONE" or m2 == "$ANY":
91
93
  return True
92
94
  if m2 == "$NONE":
93
95
  return False
@@ -103,8 +105,17 @@ def is_submodel(jm: JsonModel, m1: ModelType, m2: ModelType) -> bool:
103
105
 
104
106
  struc1 = structure(m1)
105
107
  if struc1 and struc1 in "&|^":
106
- # TODO check ^?
107
- return all(is_submodel(jm, m, m2) for m in m1[struc1] if not is_comment(m))
108
+ # BEWARE of empty lists!
109
+ if len(m1[struc1]) == 0:
110
+ # NOTE partial eval should do it
111
+ # | => $NONE
112
+ if struc1 in "|^":
113
+ return True
114
+ # & => ANY... hopefully will be optimized later?
115
+ return False
116
+ else:
117
+ return all(is_submodel(jm, m, m2) for m in m1[struc1] if not is_comment(m))
118
+
108
119
  if struc1 and struc1 == "@":
109
120
  # it is safe to ignore constraints
110
121
  return is_submodel(jm, m1["@"], m2)
@@ -116,11 +127,12 @@ def is_submodel(jm: JsonModel, m1: ModelType, m2: ModelType) -> bool:
116
127
  if not typed1:
117
128
  return False
118
129
 
119
- if isinstance(m2, (int, float)):
130
+ if isinstance(m2, (int, float)) and not isinstance(m2, bool):
120
131
  assert m2 in (-1, 0, 1, -1.0, 0.0, 1.0)
121
132
  typed2, t2 = utils.model_type(m2, [])
122
133
  assert typed2
123
- if isinstance(m1, (int, float)):
134
+ # log.warning(f"m1={m1} t1={t1} m2={m2} t2={t2} {t1 is t2}")
135
+ if isinstance(m1, (int, float)) and not isinstance(m1, bool):
124
136
  assert m1 in (-1, 0, 1, -1.0, 0.0, 1.0)
125
137
  return m1 >= m2 if t1 is t2 else False
126
138
  elif const1:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: json_model_compiler
3
- Version: 2.0.58
3
+ Version: 2.0.59
4
4
  Summary: JSON Model Tools
5
5
  Author: Fabien Coelho, Claire Yannou-Medrala
6
6
  License-Expression: CC0-1.0
@@ -1 +0,0 @@
1
- 2.0.58