json-model-compiler 2.0b31__tar.gz → 2.0b36__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 (242) hide show
  1. {json_model_compiler-2.0b31/site → json_model_compiler-2.0b36}/BACKLOG.md +78 -34
  2. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/BENCH.md +18 -10
  3. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/PKG-INFO +7 -6
  4. {json_model_compiler-2.0b31/site → json_model_compiler-2.0b36}/README.md +5 -3
  5. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/about.sh +16 -5
  6. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/docker/Dockerfile +2 -1
  7. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/analyze.py +58 -2
  8. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/clang.py +118 -23
  9. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/data/jmc.pod +29 -9
  10. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/irep.py +215 -65
  11. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/java.py +11 -5
  12. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/javascript.py +12 -6
  13. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/language.py +29 -4
  14. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/optim.py +33 -0
  15. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/perl.py +32 -18
  16. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/plpgsql.py +32 -15
  17. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/python.py +1 -0
  18. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/c/json-model.c +17 -14
  19. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/c/json-model.h +6 -6
  20. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/script.py +45 -14
  21. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/utils.py +81 -0
  22. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/xstatic.py +405 -73
  23. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model_compiler.egg-info/PKG-INFO +7 -6
  24. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model_compiler.egg-info/SOURCES.txt +35 -13
  25. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model_compiler.egg-info/requires.txt +1 -2
  26. json_model_compiler-2.0b36/models/test-schema.model.json +43 -0
  27. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/pyproject.toml +7 -5
  28. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36/site}/BACKLOG.md +78 -34
  29. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/site/BENCH.md +18 -10
  30. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36/site}/README.md +5 -3
  31. json_model_compiler-2.0b36/site/benchmarks/2025102201.csv +164 -0
  32. json_model_compiler-2.0b36/site/benchmarks/2025102201.json +296 -0
  33. json_model_compiler-2.0b36/site/benchmarks/2025102201.md +209 -0
  34. json_model_compiler-2.0b36/site/benchmarks/202510220b.csv +164 -0
  35. json_model_compiler-2.0b36/site/benchmarks/202510220b.json +296 -0
  36. json_model_compiler-2.0b36/site/benchmarks/202510220b.md +207 -0
  37. json_model_compiler-2.0b36/site/benchmarks/2025102400.csv +158 -0
  38. json_model_compiler-2.0b36/site/benchmarks/2025102400.json +296 -0
  39. json_model_compiler-2.0b36/site/benchmarks/2025102400.md +207 -0
  40. json_model_compiler-2.0b36/site/benchmarks/2025102402.csv +164 -0
  41. json_model_compiler-2.0b36/site/benchmarks/2025102402.json +296 -0
  42. json_model_compiler-2.0b36/site/benchmarks/2025102402.md +208 -0
  43. json_model_compiler-2.0b36/site/benchmarks/2025102700.csv +164 -0
  44. json_model_compiler-2.0b36/site/benchmarks/2025102700.json +296 -0
  45. json_model_compiler-2.0b36/site/benchmarks/2025102700.md +208 -0
  46. json_model_compiler-2.0b36/site/benchmarks/2025102705.csv +164 -0
  47. json_model_compiler-2.0b36/site/benchmarks/2025102705.json +296 -0
  48. json_model_compiler-2.0b36/site/benchmarks/2025102705.md +208 -0
  49. json_model_compiler-2.0b36/site/benchmarks/2025102900.csv +166 -0
  50. json_model_compiler-2.0b36/site/benchmarks/2025102900.json +296 -0
  51. json_model_compiler-2.0b36/site/benchmarks/2025102900.md +211 -0
  52. json_model_compiler-2.0b36/site/benchmarks/2025103000.csv +166 -0
  53. json_model_compiler-2.0b36/site/benchmarks/2025103000.json +296 -0
  54. json_model_compiler-2.0b36/site/benchmarks/2025103000.md +211 -0
  55. json_model_compiler-2.0b36/site/benchmarks/2025110100.csv +166 -0
  56. json_model_compiler-2.0b36/site/benchmarks/2025110100.json +296 -0
  57. json_model_compiler-2.0b36/site/benchmarks/2025110100.md +211 -0
  58. json_model_compiler-2.0b36/site/benchmarks/2025110500.csv +166 -0
  59. json_model_compiler-2.0b36/site/benchmarks/2025110500.json +296 -0
  60. json_model_compiler-2.0b36/site/benchmarks/2025110500.md +211 -0
  61. json_model_compiler-2.0b36/site/benchmarks/2025111100.csv +166 -0
  62. json_model_compiler-2.0b36/site/benchmarks/2025111100.json +296 -0
  63. json_model_compiler-2.0b36/site/benchmarks/2025111100.md +211 -0
  64. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/site/cover.md +1 -1
  65. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/site/index.html +31 -2
  66. json_model_compiler-2.0b31/site/benchmarks/2025101700.csv +0 -163
  67. json_model_compiler-2.0b31/site/benchmarks/2025101700.json +0 -296
  68. json_model_compiler-2.0b31/site/benchmarks/2025101700.md +0 -206
  69. json_model_compiler-2.0b31/site/benchmarks/2025101701.csv +0 -163
  70. json_model_compiler-2.0b31/site/benchmarks/2025101701.json +0 -296
  71. json_model_compiler-2.0b31/site/benchmarks/2025101701.md +0 -207
  72. json_model_compiler-2.0b31/site/benchmarks/2025101808.csv +0 -163
  73. json_model_compiler-2.0b31/site/benchmarks/2025101808.json +0 -296
  74. json_model_compiler-2.0b31/site/benchmarks/2025101808.md +0 -208
  75. json_model_compiler-2.0b31/site/benchmarks/2025101900.csv +0 -163
  76. json_model_compiler-2.0b31/site/benchmarks/2025101900.json +0 -296
  77. json_model_compiler-2.0b31/site/benchmarks/2025101900.md +0 -208
  78. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/.gitignore +0 -0
  79. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/.gitmodules +0 -0
  80. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/API.md +0 -0
  81. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/DESIGN.md +0 -0
  82. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/DEV.md +0 -0
  83. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/DOC.md +0 -0
  84. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/HOWTO.md +0 -0
  85. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/INTEGRATION.md +0 -0
  86. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/MANIFEST.in +0 -0
  87. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/Makefile +0 -0
  88. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/PUBS.md +0 -0
  89. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/SPEC.md +0 -0
  90. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/TUTO.md +0 -0
  91. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/docker/.dockerignore +0 -0
  92. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/docker/.gitignore +0 -0
  93. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/docker/Makefile +0 -0
  94. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/docker/README.md +0 -0
  95. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/docker/jmc +0 -0
  96. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/README.md +0 -0
  97. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/__init__.py +0 -0
  98. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/convert.py +0 -0
  99. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/data/clang_entry.c +0 -0
  100. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/data/clang_free.c +0 -0
  101. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/data/clang_init.c +0 -0
  102. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/data/clang_pcre2_fun.c +0 -0
  103. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/data/clang_re2_fun.c +0 -0
  104. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/data/java_free.java +0 -0
  105. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/data/java_init.java +0 -0
  106. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/data/javascript_exe.js +0 -0
  107. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/data/javascript_foot.js +0 -0
  108. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/data/javascript_free.js +0 -0
  109. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/data/javascript_head.js +0 -0
  110. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/data/javascript_init.js +0 -0
  111. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/data/javascript_main.js +0 -0
  112. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/data/perl_entry.pl +0 -0
  113. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/data/perl_exe.pl +0 -0
  114. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/data/perl_free.pl +0 -0
  115. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/data/perl_init.pl +0 -0
  116. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/data/perl_main.pl +0 -0
  117. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/data/perl_pkg.pl +0 -0
  118. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/data/plpgsql_entry.sql +0 -0
  119. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/data/python_entry.py +0 -0
  120. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/data/python_exe.py +0 -0
  121. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/data/python_free.py +0 -0
  122. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/data/python_init.py +0 -0
  123. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/data/python_main.py +0 -0
  124. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/export.py +0 -0
  125. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/model.py +0 -0
  126. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/mtypes.py +0 -0
  127. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/objmerge.py +0 -0
  128. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/recurse.py +0 -0
  129. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/resolver.py +0 -0
  130. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/Makefile +0 -0
  131. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/__init__.py +0 -0
  132. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/c/Makefile +0 -0
  133. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/c/main.c +0 -0
  134. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/java/.gitignore +0 -0
  135. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/java/Makefile +0 -0
  136. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/java/README.md +0 -0
  137. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/java/env.bash +0 -0
  138. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/java/json_model/Checker.java +0 -0
  139. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/java/json_model/GSON.java +0 -0
  140. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/java/json_model/JSON.java +0 -0
  141. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/java/json_model/JSONP.java +0 -0
  142. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/java/json_model/Jackson.java +0 -0
  143. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/java/json_model/Main.java +0 -0
  144. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/java/json_model/ModelChecker.java +0 -0
  145. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/java/json_model/Path.java +0 -0
  146. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/java/json_model/Report.java +0 -0
  147. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/java/json_model/Runtime.java +0 -0
  148. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/java/pom.xml +0 -0
  149. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/js/README.md +0 -0
  150. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/js/index.js +0 -0
  151. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/js/main.js +0 -0
  152. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/js/package.json +0 -0
  153. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/pl/.gitignore +0 -0
  154. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/pl/Changes +0 -0
  155. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/pl/LICENSE +0 -0
  156. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/pl/MANIFEST +0 -0
  157. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/pl/Makefile.PL +0 -0
  158. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/pl/README +0 -0
  159. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/pl/ignore.txt +0 -0
  160. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/pl/lib/JSON/JsonModel.pm +0 -0
  161. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/pl/t/00-load.t +0 -0
  162. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/pl/t/manifest.t +0 -0
  163. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/pl/t/pod-coverage.t +0 -0
  164. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/pl/t/pod.t +0 -0
  165. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/pl/xt/boilerplate.t +0 -0
  166. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/sql/META.json +0 -0
  167. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/sql/Makefile +0 -0
  168. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/sql/json_model--2.0.sql +0 -0
  169. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/sql/json_model.control +0 -0
  170. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/support.py +0 -0
  171. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/runtime/types.py +0 -0
  172. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model/url_cache.py +0 -0
  173. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model_compiler.egg-info/dependency_links.txt +0 -0
  174. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model_compiler.egg-info/entry_points.txt +0 -0
  175. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/json_model_compiler.egg-info/top_level.txt +0 -0
  176. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/ansiblelint-meta.model.json +0 -0
  177. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/cypress.model.json +0 -0
  178. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/diploma-arrete.model.json +0 -0
  179. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/diploma-export.model.json +0 -0
  180. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/everything.model.json +0 -0
  181. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/fresq.model.json +0 -0
  182. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/geo-easy.model.json +0 -0
  183. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/geo.model.json +0 -0
  184. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/jmc-ir.model.json +0 -0
  185. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-model-latest.model.json +0 -0
  186. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-model-moschin.model.json +0 -0
  187. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-model-no-merge.model.json +0 -0
  188. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-model-v1.model.json +0 -0
  189. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-model-v2-en.model.json +0 -0
  190. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-model-v2.model.json +0 -0
  191. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-model.model.json +0 -0
  192. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-schema-draft-01-fuzzy.model.json +0 -0
  193. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-schema-draft-01-nesting.model.json +0 -0
  194. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-schema-draft-01.model.json +0 -0
  195. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-schema-draft-02-fuzzy.model.json +0 -0
  196. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-schema-draft-02-nesting.model.json +0 -0
  197. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-schema-draft-02.model.json +0 -0
  198. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-schema-draft-03-fuzzy.model.json +0 -0
  199. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-schema-draft-03-nesting.model.json +0 -0
  200. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-schema-draft-03.model.json +0 -0
  201. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-schema-draft-04-fuzzy.model.json +0 -0
  202. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-schema-draft-04-mongodb.model.json +0 -0
  203. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-schema-draft-04-nesting.model.json +0 -0
  204. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-schema-draft-04.model.json +0 -0
  205. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-schema-draft-06-fuzzy.model.json +0 -0
  206. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-schema-draft-06.model.json +0 -0
  207. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-schema-draft-07-fuzzy.model.json +0 -0
  208. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-schema-draft-07.model.json +0 -0
  209. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-schema-draft-2019-09-fuzzy.model.json +0 -0
  210. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-schema-draft-2019-09.model.json +0 -0
  211. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-schema-draft-2020-12-fuzzy.model.json +0 -0
  212. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-schema-draft-2020-12-tight.model.json +0 -0
  213. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-schema-draft-2020-12.model.json +0 -0
  214. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-schema-draft-next-fuzzy.model.json +0 -0
  215. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-schema-draft-next.model.json +0 -0
  216. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-schema-draft-tight.model.json +0 -0
  217. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-schema-draft-tighter-loose.model.json +0 -0
  218. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-schema-draft-tighter.model.json +0 -0
  219. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/json-schema-linter.model.json +0 -0
  220. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/jsound.model.json +0 -0
  221. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/l10n.model.json +0 -0
  222. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/lazygit.model.json +0 -0
  223. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/openapi-311-fuzzy.model.json +0 -0
  224. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/openapi-311-models.model.json +0 -0
  225. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/openapi-311.model.json +0 -0
  226. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/person.model.json +0 -0
  227. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/person2.model.json +0 -0
  228. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/models/pgxn.model.json +0 -0
  229. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/package.json +0 -0
  230. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/setup.cfg +0 -0
  231. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/site/API.md +0 -0
  232. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/site/DOC.md +0 -0
  233. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/site/DOCKER.md +0 -0
  234. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/site/HOWTO.md +0 -0
  235. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/site/PUBS.md +0 -0
  236. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/site/SPEC.md +0 -0
  237. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/site/TUTO.md +0 -0
  238. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/site/benchmarks/2025102200.csv +0 -0
  239. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/site/benchmarks/2025102200.json +0 -0
  240. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/site/benchmarks/2025102200.md +0 -0
  241. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/site/favicon.ico +0 -0
  242. {json_model_compiler-2.0b31 → json_model_compiler-2.0b36}/site/json_logo.svg +0 -0
@@ -2,60 +2,58 @@
2
2
 
3
3
  ## Current Tasks
4
4
 
5
- - [x] pr: improve radar chart responsiveness and sorting
6
- - [x] backend: remove intermediate variable on return
7
- - [x] backend: remove unused boolean variable declaration on simple direct return
8
- - [x] ~backend: remove redundant scalar test in some cases~
9
- - [x] backend: remove reporting instructions under no reporting
10
- - [x] backend: add late code filtering to catch some backend-specific stuff
11
- - [x] c-backend: remove redundant scalar test in some cases (with late filtering)
12
- - [x] c-backend: remove some useless braces around one instruction (with late filtering)
13
- - [x] backend: simplify conditional assignment patterns with one boolean constant
14
- - [x] backend: merge boolean declaration and first assignment if possible
15
- - [x] backend: optimize pattern "if (! res) res = E; ret res;"
16
- - [x] backend: refactoring, cleanup and generalization
17
- - [x] static: add likely/unlikely hints to clang
18
- - [x] c-backend: optimize startwith implementation
19
- - [x] backend: optimize pattern "res = E1; if (! res) res = E2;"
20
- - [x] backend: optimize full pattern "(E && ...) || (E && ...)"
21
- - [x] backend: or/and flattening
22
- - [x] backend: optimize partial pattern "... || (E && ...) || (E && ...) || ...;"
23
- - [x] backend: optimize pattern "V = E1; if (V) V = E2;"
24
- - [x] perf: add launcher script
25
- - [x] c-backend: cleanup duplicated `json_is_boolean` calls
26
- - [x] c-backend: fix bad constant string expression syntax
27
- - [ ] backend: generate direct code for search constant on small sets
28
- - [ ] backend: fix `TRUE AND` in `mv-07/json-schema-draft-tight.sql`
29
- - [ ] backend: fix `unused but set variable` warning
5
+ - [x] tests: check how clang compares to gcc (maybe a few pc better)
6
+ - [x] static: partition long lists of properties based on first bytes
7
+ - [x] static: use more bytes for str hashing depending on min len
8
+ - [x] static: generate hexa constants for partition limits tests
9
+ - [x] static: use `continue` instead of long multi-if statements
10
+ - [x] c-backend: partition inlined str cset
11
+ - [x] static: or acceleration based on full or partial distinct mandatory props
12
+ - [x] static: set default C partition threshold to _6_
13
+ - [x] c-backend: replace `strcmp` with `memcmp` in runtime
14
+ - [x] backend: improve if patterns in some cases
15
+ - [x] pr: add explicit winner column to per case perf
16
+ - [x] model: simplify `{"": "$NONE"}`
17
+ - [x] ~model: avoid dead code in `mv-0f/dedup-002`~ (simple pair ok, multiple seldom useful)
18
+ - [ ] test: improve output determinism
19
+ - [ ] perf: compute performance overhead globally instead of per run
20
+ - [ ] static: xor acceleration based on distinct mandatory props
21
+ - [ ] static: merge partial mandatory prop discriminants
22
+ - [ ] static: merge may/must property handling, or not?
23
+ - [ ] static: take into account str _byte_ len when partitioning
24
+ - [ ] static: possibly use up to 8 bytes when hashing?
25
+ - [ ] static: fix hash size to depends on byte encoding, not str len
26
+ - [ ] perf: test partitioning for js, java, perl, python…
27
+ - [ ] perf: investigate best settings for js, java and python
28
+ - [ ] perf: allow to run with any docker image
29
+ - [ ] static: maybe skip must checks if all must props already seen
30
30
  - [ ] backend: cleanup unused assigned variable, see `mv-08/openapi-311.c`
31
- - [ ] backend: useless computations in `mv-17/xor_01.pl`
32
- - [ ] static: improve likely hints, eg may only category
33
- - [ ] backend: optimize pattern "res = E1; return res || E2;" (only one use)
31
+ - [ ] backend: fix `unused but set variable` warning and remove `-Wno-…` (dead code)
34
32
  - [ ] backend: remove useless `ELSE NULL` see `mv-02/geo.sql`
33
+ - [ ] command: export before/after model optimization
34
+ - [ ] perf: experiment object matching with various mandatory/optional properties
35
+ - [ ] backend: optimize pattern "res = E1; return res || E2;" (only one use)
35
36
  - [ ] backend: optimize pattern "res = E; if (! res) ret F; res not used before set;"
36
37
  - [ ] backend: optimize pattern "{ decl X = ... ; res = f(X (once) ) }"
37
38
  - [ ] backend: simplify assignment patterns with ternary operator when available?
38
- - [ ] backend: consider applying language-specific formatting tools? `clang-format`, `flake8`…
39
- - [ ] backend: remove reporting expressions under no reporting
39
+ - [ ] backend: consider applying language-specific formatting tools? `clang-format`, `black`…
40
40
  - [ ] c-backend: get pval string into a variable for strcmp unrolling and inlining
41
41
  - [ ] c-backend: add number of chunks limit to strcmp optimization
42
42
  - [ ] c-backend: strcmp to const inlining and unrolling for all instances
43
+ - [ ] c-backend: more typed cset optimizations?
43
44
  - [ ] static: partial discriminator with else?
44
45
  - [ ] static: optimize not string cst test?
45
- - [ ] perf: compute performance overhead globally instead of per run
46
46
  - [ ] tests: add ir optimized output (too large?)
47
+ - [ ] tests: drop language outputs for IR only?!
47
48
  - [ ] tests: add pytest ir tests
48
49
  - [ ] tests: add generated ir model check
49
- - [ ] tests: drop language outputs for IR only?!
50
50
  - [ ] tests: check generated IR with IR model
51
- - [ ] perf: experiment object matching with various mandatory/optional properties
52
51
  - [ ] static: close may/must? merge with open?
53
52
  - [ ] static: add a dynamic test for different strategies in object checking
54
53
  - [ ] backend: refactor ir optimizations
55
54
  - [ ] command: add direct ir to lang conversion
56
55
  - [ ] artifact: make work with dind (docker compose?)
57
56
  - [ ] static: recognize already compile objects and reuse function esp under no-reporting?
58
- - [ ] tests: check how clang compares to gcc
59
57
  - [ ] tests: add non regression tests to docker build
60
58
  - [ ] service: json to lang conversion API
61
59
  - [ ] api: web interface with caching and security
@@ -82,6 +80,7 @@
82
80
  - [ ] tests: parallelize per-case instead of per-dir?
83
81
  - [ ] static: shorten xor exit?
84
82
  - [ ] perf: profile some cases
83
+ - [ ] c-backend: use vector instructions for larger strcmp?
85
84
 
86
85
  ## Re Do
87
86
 
@@ -698,3 +697,48 @@
698
697
  - [x] perf: allow running over a subset of tools only
699
698
  - [x] static: remove unexpected `$ANY` messages (irep dead code elimination)
700
699
  - [x] pr: add new artifact (2025101808)
700
+ - [x] pr: improve radar chart responsiveness and sorting
701
+ - [x] backend: remove intermediate variable on return
702
+ - [x] backend: remove unused boolean variable declaration on simple direct return
703
+ - [x] ~backend: remove redundant scalar test in some cases~
704
+ - [x] backend: remove reporting instructions under no reporting
705
+ - [x] backend: add late code filtering to catch some backend-specific stuff
706
+ - [x] c-backend: remove redundant scalar test in some cases (with late filtering)
707
+ - [x] c-backend: remove some useless braces around one instruction (with late filtering)
708
+ - [x] backend: simplify conditional assignment patterns with one boolean constant
709
+ - [x] backend: merge boolean declaration and first assignment if possible
710
+ - [x] backend: optimize pattern "if (! res) res = E; ret res;"
711
+ - [x] backend: refactoring, cleanup and generalization
712
+ - [x] static: add likely/unlikely hints to clang
713
+ - [x] c-backend: optimize startwith implementation
714
+ - [x] backend: optimize pattern "res = E1; if (! res) res = E2;"
715
+ - [x] backend: optimize full pattern "(E && ...) || (E && ...)"
716
+ - [x] backend: or/and flattening
717
+ - [x] backend: optimize partial pattern "... || (E && ...) || (E && ...) || ...;"
718
+ - [x] backend: optimize pattern "V = E1; if (V) V = E2;"
719
+ - [x] perf: add launcher script
720
+ - [x] c-backend: cleanup duplicated `json_is_boolean` calls
721
+ - [x] c-backend: fix bad constant string expression syntax
722
+ - [x] backend: optimize length-based non-empty string check
723
+ - [x] backend: remove reporting expressions under no reporting
724
+ - [x] backend: nullify reporting parameters under no reporting
725
+ - [x] command: silent more cc warnings
726
+ - [x] c-backend: try with `clang` instead of `gcc`
727
+ - [x] static: improve likely hints depending on expectations
728
+ - [x] backend: fix `TRUE AND` in `mv-07/json-schema-draft-tight.sql` (late)
729
+ - [x] backend: useless computations in `mv-17/xor_01.pl`
730
+ - [x] static: for must-only scheme controlled by option
731
+ - [x] static: further improve likely hints
732
+ - [x] command: rename `--unroll-may-…` options for `--may-must-open-threshold`
733
+ - [x] command: set optimization parameters depending on target language
734
+ - [x] static: order must/may props by increasing size
735
+ - [x] command: fix bad mmo threshold initializations
736
+ - [x] static: shorten return on open one may no must/regs/defs
737
+ - [x] backend: optimize pattern "if (!? V) V = cst;"
738
+ - [x] backend: optimize pattern "V = C; if (!? V) ..."
739
+ - [x] backend: optimize pattern "V = E1; V = E2;"
740
+ - [x] c-backend: generate direct code for search constant on small str sets
741
+ - [x] static: add likely hints on array checks
742
+ - [x] perf: test max strcmp cset to set default default
743
+ - [x] pr: move out schema-to-model conversion
744
+ - [x] pr: adjust radar display to visible datasets
@@ -8,11 +8,18 @@ C, JS, Java (GSON, Jackson and JSONP using Johnzon) and Python with
8
8
 
9
9
  ## Recent Artifacts
10
10
 
11
- - [2025102200](benchmarks/2025102200.md) no predefs, jmc 2.0b31 vs jsc 11.11.1, 5 runs, 1000 iterations.
12
- - [2025101900](benchmarks/2025101900.md) no predefs, jmc 2.0b30 vs jsc 11.11.1, 7 runs, 2000 iterations.
13
- - [2025101808](benchmarks/2025101808.md) no predefs, jmc 2.0b30 vs jsc 11.11.1, 11 runs, 1000 iterations.
14
- - [2025101701](benchmarks/2025101701.md) no predefs, jmc 2.0b29 vs jsc 11.11.1, 5 runs, 10000 iterations.
15
- - [2025101700](benchmarks/2025101700.md) no predefs, jmc 2.0b29 vs jsc 11.11.1, 3 runs, 1000 iterations.
11
+ - [2025111100](benchmarks/2025111100.md) clang, no predefs, jmc 2.0b36 vs jsc 12.2.1, 3 runs, 1000 iterations.
12
+ - [2025110500](benchmarks/2025110500.md) clang, no predefs, jmc 2.0b36 vs jsc 12.2.0, 3 runs, 1000 iterations.
13
+ - [2025110100](benchmarks/2025110100.md) clang, no predefs, jmc 2.0b35 vs jsc 12.2.0, 3 runs, 1000 iterations.
14
+ - [2025103000](benchmarks/2025103000.md) clang, no predefs, jmc 2.0b35 vs jsc 12.1.0, 3 runs, 1000 iterations.
15
+ - [2025102900](benchmarks/2025102900.md) clang, no predefs, jmc 2.0b35 vs jsc 12.0.0, 3 runs, 1000 iterations.
16
+ - [2025102705](benchmarks/2025102705.md) clang, no predefs, jmc 2.0b34 vs jsc 12.0.0, 5 runs, 1000 iterations.
17
+ - [2025102700](benchmarks/2025102700.md) clang, no predefs, jmc 2.0b34 vs jsc 12.0.0, 3 runs, 1000 iterations.
18
+ - [2025102402](benchmarks/2025102402.md) clang, no predefs, jmc 2.0b33 vs jsc 11.11.1, 7 runs, 1000 iterations.
19
+ - [2025102400](benchmarks/2025102400.md) clang, no predefs, jmc 2.0b33 vs jsc 11.11.1, 5 runs, 1000 iterations.
20
+ - [202510220b](benchmarks/202510220b.md) clang, no predefs, jmc 2.0b32 vs jsc 11.11.1, 5 runs, 1000 iterations.
21
+ - [2025102201](benchmarks/2025102201.md) gcc, no predefs, jmc 2.0b31 vs jsc 11.11.1, 5 runs, 1000 iterations.
22
+ - [2025102200](benchmarks/2025102200.md) gcc, no predefs, jmc 2.0b31 vs jsc 11.11.1, 5 runs, 1000 iterations.
16
23
 
17
24
  ## Benchmarking Script
18
25
 
@@ -23,12 +30,13 @@ It downloads the benchmark schemas and test values, and runs through docker-in-d
23
30
  [sourcemeta/jsonschema](https://github.com/sourcemeta/jsonschema/pkgs/container/jsonschema)
24
31
  for comparison using the Blaze CLI.
25
32
 
26
- It is typically started on a large host with the `start_bench.sh` script which
27
- will span the necessary dockers:
33
+ It is typically started on a large host with the
34
+ [`start_bench.sh` script](https://github.com/clairey-zx81/json-model/blob/main/tests/perf/start_bench.sh)
35
+ which will span the necessary dockers:
28
36
 
29
37
  ```sh
30
- JMC=latest JMC_OPTS=--no-predef \
31
- nohup ./start_bench.sh latest -p 20 -l 1000 -r 5 --cap-py &
38
+ JMC=latest JMC_OPTS="--no-predef --cc=clang-20" \
39
+ nohup ./start_bench.sh latest -p 16 -l 1000 -r 5 &
32
40
  # in the generated directory, look for the summary markdown and radar json files.
33
41
  ```
34
42
 
@@ -37,7 +45,7 @@ The main script options are:
37
45
  - `-p PARA` parallelism (a little less that the number of available cores, default is _8_)
38
46
  - `-l LOOP` loop iterations for performance average (at least _1000_, the default)
39
47
  - `-r RUNS` number of runs (odd number, default is _3_)
40
- - `--cap-py` reduce python iterations by a factor of 10 (default is _no_)
48
+ - `--no-cap-py` do _not_ reduce python iterations by a factor of 10 (default is to reduce)
41
49
 
42
50
  ## Benchmarking Conditions
43
51
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: json_model_compiler
3
- Version: 2.0b31
3
+ Version: 2.0b36
4
4
  Summary: JSON Model Tools
5
5
  Author: Fabien Coelho, Claire Yannou-Medrala
6
6
  License-Expression: CC0-1.0
@@ -15,7 +15,7 @@ Requires-Dist: requests
15
15
  Requires-Dist: google-re2
16
16
  Requires-Dist: pyyaml
17
17
  Requires-Dist: validators
18
- Requires-Dist: json-schema-utils
18
+ Requires-Dist: json-schema-utils>=0.8.5
19
19
  Provides-Extra: dev
20
20
  Requires-Dist: flake8; extra == "dev"
21
21
  Requires-Dist: ruff; extra == "dev"
@@ -24,7 +24,6 @@ Requires-Dist: pytest; extra == "dev"
24
24
  Requires-Dist: pytest-xdist[psutils]; extra == "dev"
25
25
  Requires-Dist: filelock; extra == "dev"
26
26
  Requires-Dist: ipython; extra == "dev"
27
- Requires-Dist: json_schema_utils; extra == "dev"
28
27
  Provides-Extra: dist
29
28
  Requires-Dist: build; extra == "dist"
30
29
  Requires-Dist: wheel; extra == "dist"
@@ -157,9 +156,11 @@ print("reasons:", reasons)
157
156
 
158
157
  See the [benchmark page](BENCH.md) for artifacts which compare various
159
158
  [JSON Model Compiler](https://github.com/clairey-zx81/json-model) runs (C, JS, Java, Python) with
160
- [Sourcemeta Blaze CLI](https://github.com/sourcemeta/jsonschema) using test cases from
161
- [JSON Schema Benchmark](https://github.com/sourcemeta-research/jsonschema-benchmark).
162
- Overall, JMC C implementation is about 50% faster than Blaze C++ on these tests.
159
+ [Sourcemeta Blaze CLI](https://github.com/sourcemeta/jsonschema) as a baseline using test cases
160
+ from [JSON Schema Benchmark](https://github.com/sourcemeta-research/jsonschema-benchmark).
161
+ Overall, JMC-C implementation fares over 50% faster than Blaze C++ and comes ahead 70% of the time
162
+ on the latest benchmarks tests, and JMC-JS and JMC-Java/GSON native implementations are on average
163
+ about 40% slower than Blaze C++, which given the intrinsic language capabilities is honorable.
163
164
 
164
165
  ## More Information
165
166
 
@@ -125,9 +125,11 @@ print("reasons:", reasons)
125
125
 
126
126
  See the [benchmark page](BENCH.md) for artifacts which compare various
127
127
  [JSON Model Compiler](https://github.com/clairey-zx81/json-model) runs (C, JS, Java, Python) with
128
- [Sourcemeta Blaze CLI](https://github.com/sourcemeta/jsonschema) using test cases from
129
- [JSON Schema Benchmark](https://github.com/sourcemeta-research/jsonschema-benchmark).
130
- Overall, JMC C implementation is about 50% faster than Blaze C++ on these tests.
128
+ [Sourcemeta Blaze CLI](https://github.com/sourcemeta/jsonschema) as a baseline using test cases
129
+ from [JSON Schema Benchmark](https://github.com/sourcemeta-research/jsonschema-benchmark).
130
+ Overall, JMC-C implementation fares over 50% faster than Blaze C++ and comes ahead 70% of the time
131
+ on the latest benchmarks tests, and JMC-JS and JMC-Java/GSON native implementations are on average
132
+ about 40% slower than Blaze C++, which given the intrinsic language capabilities is honorable.
131
133
 
132
134
  ## More Information
133
135
 
@@ -57,7 +57,7 @@ cloc --md \
57
57
 
58
58
  cloc --md \
59
59
  json_model/clang.py \
60
- json_model/data/*.c \
60
+ json_model/data/*.[ch] \
61
61
  | tail -1 | sed "s/SUM:/C/"
62
62
 
63
63
  cloc --md \
@@ -85,7 +85,7 @@ cloc --md \
85
85
  json_model/python.py \
86
86
  json_model/data/*.py \
87
87
  json_model/clang.py \
88
- json_model/data/*.c \
88
+ json_model/data/*.[ch] \
89
89
  json_model/javascript.py \
90
90
  json_model/data/*.js \
91
91
  json_model/plpgsql.py \
@@ -109,6 +109,16 @@ cloc --md \
109
109
  json_model/runtime \
110
110
  | sed -n -e '/SUM/s/\([0-9][0-9]*\)/**\1**/g;s/SUM:/**Total**/;/^$/,$p' | grep -v '^-[-|]*$'
111
111
 
112
+ n_models=$(ls tests/[mrb]*/*.model.json | wc -l)
113
+ n_values=$(cat tests/[mrb]*/*.values.json | egrep '(true|false)' | wc -l)
114
+ n_value_files=$(ls tests/[mrb]*/*.values.json | wc -l)
115
+ n_schemas=$(echo tests/[mrb]*/*.schema.json | wc -w)
116
+ n_test_schemas=$(grep '^ "schema": {' tests/JSON-Schema-Test-Suite/tests/*/*.json | wc -l)
117
+ n_test_files=$(ls tests/JSON-Schema-Test-Suite/tests/*/*.json | wc -l)
118
+ model_locs=$(cat tests/[mrb]*/*.model.json | wc -l)
119
+
120
+ all_values=$(( $n_values + $n_models + $n_value_files + $n_schemas + $n_test_schemas + $n_test_files ))
121
+
112
122
  cat <<EOF
113
123
 
114
124
  Note that the generated code may also depend on third-party libraries.
@@ -119,7 +129,8 @@ Test models cover the various features of JSON Model.
119
129
  Each model is tested for each target language (Python, C, JavaScript, PL/pgSQL, Perl, Java)
120
130
  on a set of test vectors.
121
131
 
122
- - number of models: $(echo tests/*/*.model.json | wc -w)
123
- - model JSON locs: $(cat tests/*/*.model.json | wc -l)
124
- - number of test values: $(cat tests/*/*.values.json | egrep '(true|false)' | wc -l)
132
+ - number of JSON models: $n_models
133
+ - total JSON model locs: $model_locs
134
+ - number of test vector JSON values: $n_values
135
+ - all tested JSON values (including models, generated schemas and test suite schemas): $all_values
125
136
  EOF
@@ -10,7 +10,8 @@ ARG JSU=main
10
10
  RUN apt update ; \
11
11
  apt upgrade -y ; \
12
12
  apt install -y --no-install-recommends --fix-missing \
13
- git ca-certificates libtool m4 time automake make pkgconf gcc g++ texinfo jq curl less \
13
+ git ca-certificates libtool m4 time automake make pkgconf gcc g++ clang-20 \
14
+ texinfo jq curl less \
14
15
  nano vim libpcre2-dev libre2-dev libjansson-dev \
15
16
  python3 python-is-python3 python3-venv python3-pip \
16
17
  perl libre-engine-re2-perl libjson-maybexs-perl libcpanel-json-xs-perl libdatetime-hires-perl \
@@ -4,8 +4,8 @@
4
4
  import functools
5
5
  import re
6
6
 
7
- from .mtypes import UnknownModel, ModelPath, ModelType, ModelFilter
8
- from .utils import log, CONST_RE, is_regex
7
+ from .mtypes import UnknownModel, ModelPath, ModelType, ModelFilter, ModelObject, ModelArray
8
+ from .utils import log, CONST_RE, is_regex, is_a_simple_object
9
9
  from .recurse import recModel, allFlt, noRwt
10
10
  from .model import JsonModel
11
11
  from .runtime import ConstSet
@@ -512,3 +512,59 @@ def disjunct_analyse(jm: JsonModel, model: ModelType, mpath: ModelPath, lists: b
512
512
  disjuncts.append((prop, ctype, lmi))
513
513
  # final result
514
514
  return disjuncts, all_const_props, list(rejected)
515
+
516
+ def incompatible_prop(prop: str, obj: ModelObject) -> bool:
517
+ """Is this property incompatible with the object model?"""
518
+ for p, m in obj.items():
519
+ if p == "":
520
+ if m != "$NONE": # default object
521
+ return False
522
+ elif p[0] == "#":
523
+ pass
524
+ elif p[0] in ("_", "!", "?"):
525
+ if p[1:] == prop:
526
+ return False
527
+ elif p[0] == "/":
528
+ # TODO check regex!
529
+ return False
530
+ elif p[0] == "$":
531
+ # TODO check reference?
532
+ return False
533
+ elif p == prop:
534
+ return False
535
+ else:
536
+ pass
537
+ return True
538
+
539
+ # TODO partial: not all objets? shared prop names?
540
+ def distinct_prop_objects(jm, models: ModelArray) -> list[str|None]:
541
+ """Return distinct mandatory props to shorten/split or/xor object checks."""
542
+ if len(models) <= 1:
543
+ return [None] * len(models)
544
+ objs = [ultimate_model(jm, m) for m in models]
545
+ counts: list[dict[str, int]] = []
546
+ for idx, obj in enumerate(objs):
547
+ counts.append({})
548
+ if is_a_simple_object(obj):
549
+ for prop in obj.keys():
550
+ if not prop or prop[0] in "#?/$":
551
+ continue
552
+ # else mandatory property name
553
+ pname = prop[1:] if prop[0] in "!_" else prop
554
+ counts[idx][pname] = 0
555
+ for i, o in enumerate(objs):
556
+ if i != idx and incompatible_prop(pname, o):
557
+ counts[idx][pname] += 1
558
+ # keep the most selective property on each model
559
+ distinct_prop: list[str|None] = []
560
+ for uses in counts:
561
+ best = max(uses.values()) if uses else None
562
+ if best:
563
+ for prop, count in uses.items():
564
+ if count == best:
565
+ distinct_prop.append((prop, best == len(models) - 1))
566
+ break
567
+ else:
568
+ distinct_prop.append(None)
569
+ assert len(distinct_prop) == len(models)
570
+ return distinct_prop