json-model-compiler 2.0b31__tar.gz → 2.0b32__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.
- {json_model_compiler-2.0b31/site → json_model_compiler-2.0b32}/BACKLOG.md +29 -26
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/BENCH.md +5 -7
- {json_model_compiler-2.0b31/json_model_compiler.egg-info → json_model_compiler-2.0b32}/PKG-INFO +3 -2
- {json_model_compiler-2.0b31/site → json_model_compiler-2.0b32}/README.md +2 -1
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/about.sh +12 -5
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/clang.py +20 -14
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/irep.py +14 -6
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/java.py +11 -5
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/javascript.py +12 -6
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/language.py +9 -2
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/perl.py +24 -16
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/plpgsql.py +21 -15
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/script.py +2 -1
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/xstatic.py +9 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32/json_model_compiler.egg-info}/PKG-INFO +3 -2
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model_compiler.egg-info/SOURCES.txt +4 -13
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/pyproject.toml +1 -1
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32/site}/BACKLOG.md +29 -26
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/site/BENCH.md +5 -7
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32/site}/README.md +2 -1
- json_model_compiler-2.0b32/site/benchmarks/2025102201.csv +164 -0
- json_model_compiler-2.0b32/site/benchmarks/2025102201.json +296 -0
- json_model_compiler-2.0b32/site/benchmarks/2025102201.md +209 -0
- json_model_compiler-2.0b31/site/benchmarks/2025101700.csv +0 -163
- json_model_compiler-2.0b31/site/benchmarks/2025101700.json +0 -296
- json_model_compiler-2.0b31/site/benchmarks/2025101700.md +0 -206
- json_model_compiler-2.0b31/site/benchmarks/2025101701.csv +0 -163
- json_model_compiler-2.0b31/site/benchmarks/2025101701.json +0 -296
- json_model_compiler-2.0b31/site/benchmarks/2025101701.md +0 -207
- json_model_compiler-2.0b31/site/benchmarks/2025101808.csv +0 -163
- json_model_compiler-2.0b31/site/benchmarks/2025101808.json +0 -296
- json_model_compiler-2.0b31/site/benchmarks/2025101808.md +0 -208
- json_model_compiler-2.0b31/site/benchmarks/2025101900.csv +0 -163
- json_model_compiler-2.0b31/site/benchmarks/2025101900.json +0 -296
- json_model_compiler-2.0b31/site/benchmarks/2025101900.md +0 -208
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/.gitignore +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/.gitmodules +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/API.md +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/DESIGN.md +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/DEV.md +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/DOC.md +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/HOWTO.md +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/INTEGRATION.md +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/MANIFEST.in +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/Makefile +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/PUBS.md +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/SPEC.md +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/TUTO.md +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/docker/.dockerignore +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/docker/.gitignore +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/docker/Dockerfile +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/docker/Makefile +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/docker/README.md +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/docker/jmc +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/README.md +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/__init__.py +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/analyze.py +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/convert.py +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/data/clang_entry.c +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/data/clang_free.c +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/data/clang_init.c +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/data/clang_pcre2_fun.c +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/data/clang_re2_fun.c +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/data/java_free.java +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/data/java_init.java +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/data/javascript_exe.js +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/data/javascript_foot.js +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/data/javascript_free.js +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/data/javascript_head.js +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/data/javascript_init.js +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/data/javascript_main.js +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/data/jmc.pod +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/data/perl_entry.pl +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/data/perl_exe.pl +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/data/perl_free.pl +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/data/perl_init.pl +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/data/perl_main.pl +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/data/perl_pkg.pl +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/data/plpgsql_entry.sql +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/data/python_entry.py +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/data/python_exe.py +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/data/python_free.py +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/data/python_init.py +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/data/python_main.py +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/export.py +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/model.py +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/mtypes.py +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/objmerge.py +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/optim.py +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/python.py +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/recurse.py +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/resolver.py +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/Makefile +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/__init__.py +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/c/Makefile +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/c/json-model.c +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/c/json-model.h +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/c/main.c +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/java/.gitignore +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/java/Makefile +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/java/README.md +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/java/env.bash +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/java/json_model/Checker.java +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/java/json_model/GSON.java +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/java/json_model/JSON.java +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/java/json_model/JSONP.java +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/java/json_model/Jackson.java +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/java/json_model/Main.java +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/java/json_model/ModelChecker.java +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/java/json_model/Path.java +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/java/json_model/Report.java +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/java/json_model/Runtime.java +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/java/pom.xml +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/js/README.md +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/js/index.js +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/js/main.js +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/js/package.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/pl/.gitignore +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/pl/Changes +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/pl/LICENSE +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/pl/MANIFEST +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/pl/Makefile.PL +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/pl/README +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/pl/ignore.txt +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/pl/lib/JSON/JsonModel.pm +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/pl/t/00-load.t +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/pl/t/manifest.t +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/pl/t/pod-coverage.t +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/pl/t/pod.t +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/pl/xt/boilerplate.t +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/sql/META.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/sql/Makefile +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/sql/json_model--2.0.sql +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/sql/json_model.control +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/support.py +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/runtime/types.py +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/url_cache.py +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model/utils.py +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model_compiler.egg-info/dependency_links.txt +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model_compiler.egg-info/entry_points.txt +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model_compiler.egg-info/requires.txt +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/json_model_compiler.egg-info/top_level.txt +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/ansiblelint-meta.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/cypress.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/diploma-arrete.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/diploma-export.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/everything.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/fresq.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/geo-easy.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/geo.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/jmc-ir.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-model-latest.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-model-moschin.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-model-no-merge.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-model-v1.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-model-v2-en.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-model-v2.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-model.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-schema-draft-01-fuzzy.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-schema-draft-01-nesting.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-schema-draft-01.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-schema-draft-02-fuzzy.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-schema-draft-02-nesting.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-schema-draft-02.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-schema-draft-03-fuzzy.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-schema-draft-03-nesting.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-schema-draft-03.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-schema-draft-04-fuzzy.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-schema-draft-04-mongodb.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-schema-draft-04-nesting.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-schema-draft-04.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-schema-draft-06-fuzzy.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-schema-draft-06.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-schema-draft-07-fuzzy.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-schema-draft-07.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-schema-draft-2019-09-fuzzy.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-schema-draft-2019-09.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-schema-draft-2020-12-fuzzy.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-schema-draft-2020-12-tight.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-schema-draft-2020-12.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-schema-draft-next-fuzzy.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-schema-draft-next.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-schema-draft-tight.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-schema-draft-tighter-loose.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-schema-draft-tighter.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/json-schema-linter.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/jsound.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/l10n.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/lazygit.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/openapi-311-fuzzy.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/openapi-311-models.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/openapi-311.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/person.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/person2.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/models/pgxn.model.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/package.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/setup.cfg +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/site/API.md +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/site/DOC.md +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/site/DOCKER.md +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/site/HOWTO.md +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/site/PUBS.md +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/site/SPEC.md +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/site/TUTO.md +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/site/benchmarks/2025102200.csv +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/site/benchmarks/2025102200.json +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/site/benchmarks/2025102200.md +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/site/cover.md +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/site/favicon.ico +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/site/index.html +0 -0
- {json_model_compiler-2.0b31 → json_model_compiler-2.0b32}/site/json_logo.svg +0 -0
|
@@ -2,41 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
## Current Tasks
|
|
4
4
|
|
|
5
|
-
- [x]
|
|
6
|
-
- [x] backend: remove
|
|
7
|
-
- [x] backend:
|
|
8
|
-
- [x]
|
|
9
|
-
- [
|
|
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
|
|
5
|
+
- [x] backend: optimize length-based non-empty string check
|
|
6
|
+
- [x] backend: remove reporting expressions under no reporting
|
|
7
|
+
- [x] backend: nullify reporting parameters under no reporting
|
|
8
|
+
- [x] command: silent more cc warnings
|
|
9
|
+
- [ ] backend: optimize pattern "res = E1; return res || E2;" (only one use)
|
|
27
10
|
- [ ] backend: generate direct code for search constant on small sets
|
|
28
11
|
- [ ] backend: fix `TRUE AND` in `mv-07/json-schema-draft-tight.sql`
|
|
29
|
-
- [ ] backend: fix `unused but set variable` warning
|
|
30
|
-
- [ ] backend: cleanup unused assigned variable, see `mv-08/openapi-311.c`
|
|
12
|
+
- [ ] backend: fix `unused but set variable` warning and remove `-Wno-…`
|
|
31
13
|
- [ ] backend: useless computations in `mv-17/xor_01.pl`
|
|
14
|
+
- [ ] backend: cleanup unused assigned variable, see `mv-08/openapi-311.c`
|
|
32
15
|
- [ ] static: improve likely hints, eg may only category
|
|
33
|
-
- [ ] backend: optimize pattern "res = E1; return res || E2;" (only one use)
|
|
34
16
|
- [ ] backend: remove useless `ELSE NULL` see `mv-02/geo.sql`
|
|
35
17
|
- [ ] backend: optimize pattern "res = E; if (! res) ret F; res not used before set;"
|
|
36
18
|
- [ ] backend: optimize pattern "{ decl X = ... ; res = f(X (once) ) }"
|
|
37
19
|
- [ ] backend: simplify assignment patterns with ternary operator when available?
|
|
38
20
|
- [ ] backend: consider applying language-specific formatting tools? `clang-format`, `flake8`…
|
|
39
|
-
- [ ] backend: remove reporting expressions under no reporting
|
|
40
21
|
- [ ] c-backend: get pval string into a variable for strcmp unrolling and inlining
|
|
41
22
|
- [ ] c-backend: add number of chunks limit to strcmp optimization
|
|
42
23
|
- [ ] c-backend: strcmp to const inlining and unrolling for all instances
|
|
@@ -698,3 +679,25 @@
|
|
|
698
679
|
- [x] perf: allow running over a subset of tools only
|
|
699
680
|
- [x] static: remove unexpected `$ANY` messages (irep dead code elimination)
|
|
700
681
|
- [x] pr: add new artifact (2025101808)
|
|
682
|
+
- [x] pr: improve radar chart responsiveness and sorting
|
|
683
|
+
- [x] backend: remove intermediate variable on return
|
|
684
|
+
- [x] backend: remove unused boolean variable declaration on simple direct return
|
|
685
|
+
- [x] ~backend: remove redundant scalar test in some cases~
|
|
686
|
+
- [x] backend: remove reporting instructions under no reporting
|
|
687
|
+
- [x] backend: add late code filtering to catch some backend-specific stuff
|
|
688
|
+
- [x] c-backend: remove redundant scalar test in some cases (with late filtering)
|
|
689
|
+
- [x] c-backend: remove some useless braces around one instruction (with late filtering)
|
|
690
|
+
- [x] backend: simplify conditional assignment patterns with one boolean constant
|
|
691
|
+
- [x] backend: merge boolean declaration and first assignment if possible
|
|
692
|
+
- [x] backend: optimize pattern "if (! res) res = E; ret res;"
|
|
693
|
+
- [x] backend: refactoring, cleanup and generalization
|
|
694
|
+
- [x] static: add likely/unlikely hints to clang
|
|
695
|
+
- [x] c-backend: optimize startwith implementation
|
|
696
|
+
- [x] backend: optimize pattern "res = E1; if (! res) res = E2;"
|
|
697
|
+
- [x] backend: optimize full pattern "(E && ...) || (E && ...)"
|
|
698
|
+
- [x] backend: or/and flattening
|
|
699
|
+
- [x] backend: optimize partial pattern "... || (E && ...) || (E && ...) || ...;"
|
|
700
|
+
- [x] backend: optimize pattern "V = E1; if (V) V = E2;"
|
|
701
|
+
- [x] perf: add launcher script
|
|
702
|
+
- [x] c-backend: cleanup duplicated `json_is_boolean` calls
|
|
703
|
+
- [x] c-backend: fix bad constant string expression syntax
|
|
@@ -8,11 +8,8 @@ C, JS, Java (GSON, Jackson and JSONP using Johnzon) and Python with
|
|
|
8
8
|
|
|
9
9
|
## Recent Artifacts
|
|
10
10
|
|
|
11
|
+
- [2025102201](benchmarks/2025102201.md) no predefs, jmc 2.0b31 vs jsc 11.11.1, 5 runs, 1000 iterations.
|
|
11
12
|
- [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.
|
|
16
13
|
|
|
17
14
|
## Benchmarking Script
|
|
18
15
|
|
|
@@ -23,8 +20,9 @@ It downloads the benchmark schemas and test values, and runs through docker-in-d
|
|
|
23
20
|
[sourcemeta/jsonschema](https://github.com/sourcemeta/jsonschema/pkgs/container/jsonschema)
|
|
24
21
|
for comparison using the Blaze CLI.
|
|
25
22
|
|
|
26
|
-
It is typically started on a large host with the
|
|
27
|
-
|
|
23
|
+
It is typically started on a large host with the
|
|
24
|
+
[`start_bench.sh` script](https://github.com/clairey-zx81/json-model/blob/main/tests/perf/start_bench.sh)
|
|
25
|
+
which will span the necessary dockers, try `--help` for setting details:
|
|
28
26
|
|
|
29
27
|
```sh
|
|
30
28
|
JMC=latest JMC_OPTS=--no-predef \
|
|
@@ -37,7 +35,7 @@ The main script options are:
|
|
|
37
35
|
- `-p PARA` parallelism (a little less that the number of available cores, default is _8_)
|
|
38
36
|
- `-l LOOP` loop iterations for performance average (at least _1000_, the default)
|
|
39
37
|
- `-r RUNS` number of runs (odd number, default is _3_)
|
|
40
|
-
- `--cap-py` reduce python iterations by a factor of 10 (default is
|
|
38
|
+
- `--no-cap-py` do _not_ reduce python iterations by a factor of 10 (default is to reduce)
|
|
41
39
|
|
|
42
40
|
## Benchmarking Conditions
|
|
43
41
|
|
{json_model_compiler-2.0b31/json_model_compiler.egg-info → json_model_compiler-2.0b32}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: json_model_compiler
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.0b32
|
|
4
4
|
Summary: JSON Model Tools
|
|
5
5
|
Author: Fabien Coelho, Claire Yannou-Medrala
|
|
6
6
|
License-Expression: CC0-1.0
|
|
@@ -159,7 +159,8 @@ See the [benchmark page](BENCH.md) for artifacts which compare various
|
|
|
159
159
|
[JSON Model Compiler](https://github.com/clairey-zx81/json-model) runs (C, JS, Java, Python) with
|
|
160
160
|
[Sourcemeta Blaze CLI](https://github.com/sourcemeta/jsonschema) using test cases from
|
|
161
161
|
[JSON Schema Benchmark](https://github.com/sourcemeta-research/jsonschema-benchmark).
|
|
162
|
-
Overall, JMC C implementation is about
|
|
162
|
+
Overall, JMC C implementation is about 33% faster than Blaze C++ on these tests,
|
|
163
|
+
and JavaScript and Java/GSON implementations are only about 15% slower than Blaze.
|
|
163
164
|
|
|
164
165
|
## More Information
|
|
165
166
|
|
|
@@ -127,7 +127,8 @@ 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
128
|
[Sourcemeta Blaze CLI](https://github.com/sourcemeta/jsonschema) using test cases from
|
|
129
129
|
[JSON Schema Benchmark](https://github.com/sourcemeta-research/jsonschema-benchmark).
|
|
130
|
-
Overall, JMC C implementation is about
|
|
130
|
+
Overall, JMC C implementation is about 33% faster than Blaze C++ on these tests,
|
|
131
|
+
and JavaScript and Java/GSON implementations are only about 15% slower than Blaze.
|
|
131
132
|
|
|
132
133
|
## More Information
|
|
133
134
|
|
|
@@ -57,7 +57,7 @@ cloc --md \
|
|
|
57
57
|
|
|
58
58
|
cloc --md \
|
|
59
59
|
json_model/clang.py \
|
|
60
|
-
json_model/data/*.
|
|
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/*.
|
|
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,12 @@ 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
|
+
nmodels=$(echo tests/[mrb]*/*.model.json | wc -w)
|
|
113
|
+
nschemas=$(echo tests/[mrb]*/*.schema.json | wc -w)
|
|
114
|
+
modellocs=$(cat tests/[mrb]*/*.model.json | wc -l)
|
|
115
|
+
nvalues=$(cat tests/[mrb]*/*.values.json | egrep '(true|false)' | wc -l)
|
|
116
|
+
allvalues=$(( $nvalues + $nmodels + $nschemas ))
|
|
117
|
+
|
|
112
118
|
cat <<EOF
|
|
113
119
|
|
|
114
120
|
Note that the generated code may also depend on third-party libraries.
|
|
@@ -119,7 +125,8 @@ Test models cover the various features of JSON Model.
|
|
|
119
125
|
Each model is tested for each target language (Python, C, JavaScript, PL/pgSQL, Perl, Java)
|
|
120
126
|
on a set of test vectors.
|
|
121
127
|
|
|
122
|
-
- number of models: $
|
|
123
|
-
-
|
|
124
|
-
- number of test values: $
|
|
128
|
+
- number of JSON models: $nmodels
|
|
129
|
+
- total JSON model locs: $modellocs
|
|
130
|
+
- number of test vector JSON values: $nvalues
|
|
131
|
+
- all tested JSON values (including models and generated schemas): $allvalues
|
|
125
132
|
EOF
|
|
@@ -126,6 +126,12 @@ class CLangJansson(Language):
|
|
|
126
126
|
#
|
|
127
127
|
# inlined type test expressions about JSON data
|
|
128
128
|
#
|
|
129
|
+
def rep(self) -> str:
|
|
130
|
+
return "rep" if self._with_report else "NULL"
|
|
131
|
+
|
|
132
|
+
def path(self, p: str) -> str:
|
|
133
|
+
return p if self._with_path else "NULL"
|
|
134
|
+
|
|
129
135
|
def is_num(self, var: Var) -> BoolExpr:
|
|
130
136
|
return f"json_is_number({var})"
|
|
131
137
|
|
|
@@ -184,23 +190,23 @@ class CLangJansson(Language):
|
|
|
184
190
|
if not self._with_predef and self.str_content_predef(name):
|
|
185
191
|
return self.const(True) if is_str else self.is_a(var, str)
|
|
186
192
|
if name == "$UUID":
|
|
187
|
-
return f"jm_is_valid_uuid({val}, {path}, rep)"
|
|
193
|
+
return f"jm_is_valid_uuid({val}, {self.path(path)}, {self.rep()})"
|
|
188
194
|
elif name == "$DATE":
|
|
189
|
-
return f"jm_is_valid_date({val}, {path}, rep)"
|
|
195
|
+
return f"jm_is_valid_date({val}, {self.path(path)}, {self.rep()})"
|
|
190
196
|
elif name == "$TIME":
|
|
191
|
-
return f"jm_is_valid_time({val}, {path}, rep)"
|
|
197
|
+
return f"jm_is_valid_time({val}, {self.path(path)}, {self.rep()})"
|
|
192
198
|
elif name == "$DATETIME":
|
|
193
|
-
return f"jm_is_valid_datetime({val}, {path}, rep)"
|
|
199
|
+
return f"jm_is_valid_datetime({val}, {self.path(path)}, {self.rep()})"
|
|
194
200
|
elif name == "$REGEX":
|
|
195
|
-
return f"jm_is_valid_regex({val}, false, {path}, rep)"
|
|
201
|
+
return f"jm_is_valid_regex({val}, false, {self.path(path)}, {self.rep()})"
|
|
196
202
|
elif name == "$EXREG":
|
|
197
|
-
return f"jm_is_valid_regex({val}, true, {path}, rep)"
|
|
203
|
+
return f"jm_is_valid_regex({val}, true, {self.path(path)}, {self.rep()})"
|
|
198
204
|
elif name in ("$URL", "$URI"):
|
|
199
|
-
return f"jm_is_valid_url({val}, {path}, rep)"
|
|
205
|
+
return f"jm_is_valid_url({val}, {self.path(path)}, {self.rep()})"
|
|
200
206
|
elif name == "$EMAIL":
|
|
201
|
-
return f"jm_is_valid_email({val}, {path}, rep)"
|
|
207
|
+
return f"jm_is_valid_email({val}, {self.path(path)}, {self.rep()})"
|
|
202
208
|
elif name == "$JSON":
|
|
203
|
-
return f"jm_is_valid_json({val}, {path}, rep)"
|
|
209
|
+
return f"jm_is_valid_json({val}, {self.path(path)}, {self.rep()})"
|
|
204
210
|
else:
|
|
205
211
|
return super().predef(var, name, path, is_str)
|
|
206
212
|
|
|
@@ -268,12 +274,12 @@ class CLangJansson(Language):
|
|
|
268
274
|
def check_call(self, name: str, val: Expr, path: Var, *,
|
|
269
275
|
is_ptr: bool = False, is_raw: bool = False) -> BoolExpr:
|
|
270
276
|
if is_raw:
|
|
271
|
-
return f"jm_check_fun_string({name}, {val}, {path}, rep)"
|
|
277
|
+
return f"jm_check_fun_string({name}, {val}, {self.path(path)}, {self.rep()})"
|
|
272
278
|
else:
|
|
273
279
|
return super().check_call(name, val, path, is_ptr=is_ptr, is_raw=is_raw) # type: ignore
|
|
274
280
|
|
|
275
281
|
def check_unique(self, val: JsonExpr, path: Var) -> BoolExpr:
|
|
276
|
-
return f"jm_array_is_unique({val}, {path}, rep)"
|
|
282
|
+
return f"jm_array_is_unique({val}, {self.path(path)}, {self.rep()})"
|
|
277
283
|
|
|
278
284
|
def check_constraint(self, op: str, vop: int|float|str, val: JsonExpr, path: Var) -> BoolExpr:
|
|
279
285
|
"""Call inefficient type-unaware constraint check."""
|
|
@@ -282,7 +288,7 @@ class CLangJansson(Language):
|
|
|
282
288
|
"<=": "op_le", "<": "op_lt",
|
|
283
289
|
">=": "op_ge", ">": "op_gt"
|
|
284
290
|
}
|
|
285
|
-
return f"jm_check_constraint({val}, {OPS[op]}, &{self._cst(vop)}, {path}, rep)"
|
|
291
|
+
return f"jm_check_constraint({val}, {OPS[op]}, &{self._cst(vop)}, {self.path(path)}, {self.rep()})"
|
|
286
292
|
|
|
287
293
|
#
|
|
288
294
|
# inline comparison expressions for strings
|
|
@@ -330,10 +336,10 @@ class CLangJansson(Language):
|
|
|
330
336
|
# reporting
|
|
331
337
|
#
|
|
332
338
|
def is_reporting(self) -> BoolExpr:
|
|
333
|
-
return "rep != NULL"
|
|
339
|
+
return "rep != NULL" if self._with_report else "false"
|
|
334
340
|
|
|
335
341
|
def report(self, msg: str, path: Var) -> Block:
|
|
336
|
-
return ([ f"if (rep) jm_report_add_entry(rep, {self.esc(msg)}, {path});" ]
|
|
342
|
+
return ([ f"if (rep) jm_report_add_entry(rep, {self.esc(msg)}, {self.path(path)});" ]
|
|
337
343
|
if self._with_report else [])
|
|
338
344
|
|
|
339
345
|
def clean_report(self) -> Block:
|
|
@@ -652,12 +652,20 @@ def partialEval(code: Jsonable, reporting: bool) -> int:
|
|
|
652
652
|
|
|
653
653
|
def peRwt(code: Jsonable, _: Path) -> Jsonable:
|
|
654
654
|
nonlocal changes
|
|
655
|
-
if not reporting
|
|
656
|
-
code
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
655
|
+
if not reporting:
|
|
656
|
+
if _isOp(code, "rep"):
|
|
657
|
+
code.clear()
|
|
658
|
+
code.update({"o": "no", "#": "# IRO no reporting"})
|
|
659
|
+
changes += 1
|
|
660
|
+
elif _isOp(code, "isr"):
|
|
661
|
+
code.clear()
|
|
662
|
+
code.update(o="cst", c=False)
|
|
663
|
+
changes += 1
|
|
664
|
+
elif _isOp(code, "cr"):
|
|
665
|
+
code.clear()
|
|
666
|
+
code.update(o="ign")
|
|
667
|
+
changes += 1
|
|
668
|
+
if _isOp(code, "&"):
|
|
661
669
|
ands = code["exprs"]
|
|
662
670
|
# log.warning(f"&: {ands}")
|
|
663
671
|
assert isinstance(ands, list)
|
|
@@ -81,6 +81,12 @@ class Java(Language):
|
|
|
81
81
|
#
|
|
82
82
|
# inlined type test expressions about JSON data
|
|
83
83
|
#
|
|
84
|
+
def rep(self) -> str:
|
|
85
|
+
return "rep" if self._with_report else "null"
|
|
86
|
+
|
|
87
|
+
def path(self, p: str) -> str:
|
|
88
|
+
return p if self._with_path else "null"
|
|
89
|
+
|
|
84
90
|
def is_num(self, var: Var) -> BoolExpr:
|
|
85
91
|
return f"json.isNumber({var})"
|
|
86
92
|
|
|
@@ -191,8 +197,8 @@ class Java(Language):
|
|
|
191
197
|
def check_call(self, name: Var, val: JsonExpr, path: Var, *,
|
|
192
198
|
is_ptr: bool = False, is_raw: bool = False) -> BoolExpr:
|
|
193
199
|
val = f"json.strToJSON({val})" if is_raw else val
|
|
194
|
-
return f"{name}.call({val}, {path}, rep)" if is_ptr else \
|
|
195
|
-
f"{name}({val}, {path}, rep)"
|
|
200
|
+
return f"{name}.call({val}, {self.path(path)}, {self.rep()})" if is_ptr else \
|
|
201
|
+
f"{name}({val}, {self.path(path)}, {self.rep()})"
|
|
196
202
|
|
|
197
203
|
#
|
|
198
204
|
# inlined length computation
|
|
@@ -219,7 +225,7 @@ class Java(Language):
|
|
|
219
225
|
return f"{val}.endsWith({self.esc(end)})"
|
|
220
226
|
|
|
221
227
|
def check_unique(self, val: JsonExpr, path: Var) -> BoolExpr:
|
|
222
|
-
return f"rt.array_is_unique({val}, {path}, rep)"
|
|
228
|
+
return f"rt.array_is_unique({val}, {self.path(path)}, {self.rep()})"
|
|
223
229
|
|
|
224
230
|
CMP_OPS = {
|
|
225
231
|
"=": "json_model.Runtime.Operator.EQ",
|
|
@@ -232,7 +238,7 @@ class Java(Language):
|
|
|
232
238
|
|
|
233
239
|
def check_constraint(self, op: str, vop: int|float|str, val: JsonExpr, path: Var) -> BoolExpr:
|
|
234
240
|
"""Call inefficient type-unaware constraint check."""
|
|
235
|
-
return f"rt.check_constraint({val}, {self.CMP_OPS[op]}, {self.json_cst(vop)}, {path}, rep)"
|
|
241
|
+
return f"rt.check_constraint({val}, {self.CMP_OPS[op]}, {self.json_cst(vop)}, {self.path(path)}, {self.rep()})"
|
|
236
242
|
|
|
237
243
|
#
|
|
238
244
|
# inline comparison expressions for strings
|
|
@@ -273,7 +279,7 @@ class Java(Language):
|
|
|
273
279
|
return "rep != null"
|
|
274
280
|
|
|
275
281
|
def report(self, msg: str, path: Var) -> Block:
|
|
276
|
-
return ([ f"if (rep != null) rep.addEntry({self.esc(msg)}, {path});" ]
|
|
282
|
+
return ([ f"if (rep != null) rep.addEntry({self.esc(msg)}, {self.path(path)});" ]
|
|
277
283
|
if self._with_report else [])
|
|
278
284
|
|
|
279
285
|
def clean_report(self) -> Block:
|
|
@@ -44,6 +44,12 @@ class JavaScript(Language):
|
|
|
44
44
|
#
|
|
45
45
|
# inlined type test expressions about JSON data
|
|
46
46
|
#
|
|
47
|
+
def rep(self) -> str:
|
|
48
|
+
return "rep" if self._with_report else "null"
|
|
49
|
+
|
|
50
|
+
def path(self, p: str) -> str:
|
|
51
|
+
return p if self._with_path else "null"
|
|
52
|
+
|
|
47
53
|
def is_num(self, var: Var) -> BoolExpr:
|
|
48
54
|
# JS === BF
|
|
49
55
|
# 12.5 instanceof Number === false
|
|
@@ -110,11 +116,11 @@ class JavaScript(Language):
|
|
|
110
116
|
if name == "$UUID":
|
|
111
117
|
return f"runtime.jm_is_valid_uuid({val})"
|
|
112
118
|
elif name == "$DATE":
|
|
113
|
-
return f"runtime.jm_is_valid_date({val}, {path}, rep)"
|
|
119
|
+
return f"runtime.jm_is_valid_date({val}, {self.path(path)}, {self.rep()})"
|
|
114
120
|
elif name == "$TIME":
|
|
115
|
-
return f"runtime.jm_is_valid_time({val}, {path}, rep)"
|
|
121
|
+
return f"runtime.jm_is_valid_time({val}, {self.path(path)}, {self.rep()})"
|
|
116
122
|
elif name == "$DATETIME":
|
|
117
|
-
return f"runtime.jm_is_valid_datetime({val}, {path}, rep)"
|
|
123
|
+
return f"runtime.jm_is_valid_datetime({val}, {self.path(path)}, {self.rep()})"
|
|
118
124
|
elif name == "$REGEX":
|
|
119
125
|
return f"runtime.jm_is_valid_regex({val}, false)"
|
|
120
126
|
elif name == "$EXREG":
|
|
@@ -155,10 +161,10 @@ class JavaScript(Language):
|
|
|
155
161
|
return f"{val}.endsWith({self.esc(end)})"
|
|
156
162
|
|
|
157
163
|
def check_unique(self, val: JsonExpr, path: Var) -> BoolExpr:
|
|
158
|
-
return f"runtime.jm_array_is_unique({val}, {path}, rep)"
|
|
164
|
+
return f"runtime.jm_array_is_unique({val}, {self.path(path)}, {self.rep()})"
|
|
159
165
|
|
|
160
166
|
def check_constraint(self, op: str, vop: int|float|str, val: JsonExpr, path: Var) -> BoolExpr:
|
|
161
|
-
return f"runtime.jm_check_constraint({val}, {self.esc(op)}, {self.const(vop)}, {path}, rep)"
|
|
167
|
+
return f"runtime.jm_check_constraint({val}, {self.esc(op)}, {self.const(vop)}, {self.path(path)}, {self.rep()})"
|
|
162
168
|
|
|
163
169
|
def nope(self) -> Block:
|
|
164
170
|
return []
|
|
@@ -175,7 +181,7 @@ class JavaScript(Language):
|
|
|
175
181
|
return "rep !== null"
|
|
176
182
|
|
|
177
183
|
def report(self, msg: str, path: Var) -> Block:
|
|
178
|
-
return ([ f"rep !== null && rep.push([{self.esc(msg)}, {path}])" ]
|
|
184
|
+
return ([ f"rep !== null && rep.push([{self.esc(msg)}, {self.path(path)}])" ]
|
|
179
185
|
if self._with_report else [])
|
|
180
186
|
|
|
181
187
|
def clean_report(self) -> Block:
|
|
@@ -315,9 +315,16 @@ class Language:
|
|
|
315
315
|
#
|
|
316
316
|
# boolean expression
|
|
317
317
|
#
|
|
318
|
+
def rep(self) -> str:
|
|
319
|
+
"""Current report variable."""
|
|
320
|
+
return "rep" if self._with_report else "None"
|
|
321
|
+
|
|
322
|
+
def path(self, p: str) -> str:
|
|
323
|
+
return p if self._with_path else "None"
|
|
324
|
+
|
|
318
325
|
def str_check_call(self, name: str, val: StrExpr, path: Var) -> BoolExpr:
|
|
319
326
|
"""Model check call for a string value."""
|
|
320
|
-
return f"{name}({val}, {path}, rep)"
|
|
327
|
+
return f"{name}({val}, {self.path(path)}, {self.rep()})"
|
|
321
328
|
|
|
322
329
|
def check_call(self, name: Var, val: JsonExpr, path: Var, *,
|
|
323
330
|
is_ptr: bool = False, is_raw: bool = False) -> BoolExpr:
|
|
@@ -326,7 +333,7 @@ class Language:
|
|
|
326
333
|
is_ptr: the name is a function pointer, not a direct function
|
|
327
334
|
is_raw: value is a raw (string) value, not a json
|
|
328
335
|
"""
|
|
329
|
-
return f"{name}({val}, {path}, rep)"
|
|
336
|
+
return f"{name}({val}, {self.path(path)}, {self.rep()})"
|
|
330
337
|
|
|
331
338
|
def check_unique(self, val: JsonExpr, path: Var) -> BoolExpr:
|
|
332
339
|
"""Check uniqueness."""
|
|
@@ -27,6 +27,12 @@ class Perl(Language):
|
|
|
27
27
|
def esc(self, s: str) -> StrExpr:
|
|
28
28
|
return "'" + s.replace("'", r"\'") + "'"
|
|
29
29
|
|
|
30
|
+
def rep(self) -> str:
|
|
31
|
+
return "$rep" if self._with_report else "undef"
|
|
32
|
+
|
|
33
|
+
def path(self, p: str) -> str:
|
|
34
|
+
return p if self._with_path else "undef"
|
|
35
|
+
|
|
30
36
|
def is_num(self, var: Var) -> BoolExpr:
|
|
31
37
|
var = f"${var}" if self.is_a_var(var) else var
|
|
32
38
|
return f"jm_is_numeric({var})"
|
|
@@ -96,31 +102,33 @@ class Perl(Language):
|
|
|
96
102
|
is_str_and = self.is_a(var, str) + " && " # type: ignore
|
|
97
103
|
var, path = self._val(var), self._val(path) # type: ignore
|
|
98
104
|
if name in ("$URL", "$URI"): # approximate
|
|
99
|
-
return is_str_and + f"jm_is_valid_url({var}, {path},
|
|
105
|
+
return is_str_and + f"jm_is_valid_url({var}, {self.path(path)}, {self.rep()})"
|
|
100
106
|
elif name == "$DATE":
|
|
101
|
-
return is_str_and + f"jm_is_valid_date({var}, {path},
|
|
107
|
+
return is_str_and + f"jm_is_valid_date({var}, {self.path(path)}, {self.rep()})"
|
|
102
108
|
elif name == "$TIME":
|
|
103
|
-
return is_str_and + f"jm_is_valid_time({var}, {path},
|
|
109
|
+
return is_str_and + f"jm_is_valid_time({var}, {self.path(path)}, {self.rep()})"
|
|
104
110
|
elif name == "$DATETIME":
|
|
105
|
-
return is_str_and + f"jm_is_valid_datetime({var}, {path},
|
|
111
|
+
return is_str_and + f"jm_is_valid_datetime({var}, {self.path(path)}, {self.rep()})"
|
|
106
112
|
elif name == "$REGEX":
|
|
107
|
-
return is_str_and + f"jm_is_valid_regex({var}, {path},
|
|
113
|
+
return is_str_and + f"jm_is_valid_regex({var}, {self.path(path)}, {self.rep()})"
|
|
108
114
|
elif name == "$EXREG":
|
|
109
|
-
return is_str_and + f"jm_is_valid_exreg({var}, {path},
|
|
115
|
+
return is_str_and + f"jm_is_valid_exreg({var}, {self.path(path)}, {self.rep()})"
|
|
110
116
|
elif name == "$UUID":
|
|
111
|
-
return is_str_and + f"jm_is_valid_uuid({var}, {path},
|
|
117
|
+
return is_str_and + f"jm_is_valid_uuid({var}, {self.path(path)}, {self.rep()})"
|
|
112
118
|
elif name == "$EMAIL":
|
|
113
|
-
return is_str_and + f"jm_is_valid_email({var}, {path},
|
|
119
|
+
return is_str_and + f"jm_is_valid_email({var}, {self.path(path)}, {self.rep()})"
|
|
114
120
|
elif name == "$JSON":
|
|
115
|
-
return is_str_and + f"jm_is_valid_json({var}, {path},
|
|
121
|
+
return is_str_and + f"jm_is_valid_json({var}, {self.path(path)}, {self.rep()})"
|
|
116
122
|
else:
|
|
117
123
|
return super().predef(var, name, path, is_str)
|
|
118
124
|
|
|
119
125
|
def check_unique(self, val: JsonExpr, path: Var) -> BoolExpr:
|
|
120
|
-
|
|
126
|
+
path = self.path(self._val(path))
|
|
127
|
+
return f"jm_is_unique_array(${val}, {path}, {self.rep()})"
|
|
121
128
|
|
|
122
129
|
def check_constraint(self, op: str, vop: int|float|str, val: JsonExpr, path: Var) -> BoolExpr:
|
|
123
|
-
|
|
130
|
+
path = self.path(self._val(path))
|
|
131
|
+
return f"jm_check_constraint({self._val(val)}, {self.esc(op)}, {self.const(vop)}, {path}, {self.rep()})"
|
|
124
132
|
|
|
125
133
|
def file_header(self, exe: bool = True) -> Block:
|
|
126
134
|
code: Block = self.file_load("perl_exe.pl") if exe else []
|
|
@@ -143,7 +151,7 @@ class Perl(Language):
|
|
|
143
151
|
return code
|
|
144
152
|
|
|
145
153
|
def clean_report(self) -> Block:
|
|
146
|
-
return [ "defined $rep && $rep = [];" ]
|
|
154
|
+
return [ "defined $rep && $rep = [];" ] if self._with_report else []
|
|
147
155
|
|
|
148
156
|
def nope(self) -> Block:
|
|
149
157
|
return [ ";" ]
|
|
@@ -229,19 +237,19 @@ class Perl(Language):
|
|
|
229
237
|
is_ptr: bool = False, is_raw: bool = False) -> BoolExpr:
|
|
230
238
|
# FIXME is_ptr, is_raw
|
|
231
239
|
val = f"${val}" if self.is_a_var(val) else val
|
|
232
|
-
path = f"${path}" if self.is_a_var(path) else path
|
|
240
|
+
path = self.path(f"${path}" if self.is_a_var(path) else path)
|
|
233
241
|
name = f"&${name}" if is_ptr else name
|
|
234
|
-
return f"{name}({val}, {path},
|
|
242
|
+
return f"{name}({val}, {path}, {self.rep()})"
|
|
235
243
|
|
|
236
244
|
def str_check_call(self, name: str, val: StrExpr, path: Var) -> BoolExpr:
|
|
237
245
|
return self.check_call(name, val, path)
|
|
238
246
|
|
|
239
247
|
def is_reporting(self) -> BoolExpr:
|
|
240
|
-
return "defined $rep"
|
|
248
|
+
return "defined $rep" if self._with_report else "0"
|
|
241
249
|
|
|
242
250
|
def report(self, msg: str, path: Var) -> Block:
|
|
243
251
|
# FIXME probably need to copy path
|
|
244
|
-
path = f"${path}" if self.is_a_var(path) else path
|
|
252
|
+
path = self.path(f"${path}" if self.is_a_var(path) else path)
|
|
245
253
|
return [ f"push @$rep, [{self.esc(msg)}, {path}] if defined $rep;" ] \
|
|
246
254
|
if self._with_report else []
|
|
247
255
|
|
|
@@ -55,6 +55,12 @@ class PLpgSQL(Language):
|
|
|
55
55
|
#
|
|
56
56
|
# inlined type test expressions about JSON data
|
|
57
57
|
#
|
|
58
|
+
def rep(self) -> str:
|
|
59
|
+
return "rep" if self._with_report else "NULL"
|
|
60
|
+
|
|
61
|
+
def path(self, p: str) -> str:
|
|
62
|
+
return p if self._with_path else "NULL"
|
|
63
|
+
|
|
58
64
|
def is_num(self, var: Var) -> BoolExpr:
|
|
59
65
|
return f"JSONB_TYPEOF({var}) = 'number'"
|
|
60
66
|
|
|
@@ -109,23 +115,23 @@ class PLpgSQL(Language):
|
|
|
109
115
|
val = var if is_str else f"JSON_VALUE({var}, '$' RETURNING TEXT)"
|
|
110
116
|
cktype = "" if is_str else (self.is_a(var, str) + " AND ") # pyright: ignore
|
|
111
117
|
if name == "$UUID":
|
|
112
|
-
return cktype + f"jm_is_valid_uuid({val}, {path}, rep)"
|
|
118
|
+
return cktype + f"jm_is_valid_uuid({val}, {self.path(path)}, {self.rep()})"
|
|
113
119
|
elif name == "$DATE":
|
|
114
|
-
return cktype + f"jm_is_valid_date({val}, {path}, rep)"
|
|
120
|
+
return cktype + f"jm_is_valid_date({val}, {self.path(path)}, {self.rep()})"
|
|
115
121
|
elif name == "$TIME":
|
|
116
|
-
return cktype + f"jm_is_valid_time({val}, {path}, rep)"
|
|
122
|
+
return cktype + f"jm_is_valid_time({val}, {self.path(path)}, {self.rep()})"
|
|
117
123
|
elif name == "$DATETIME":
|
|
118
|
-
return cktype + f"jm_is_valid_datetime({val}, {path}, rep)"
|
|
124
|
+
return cktype + f"jm_is_valid_datetime({val}, {self.path(path)}, {self.rep()})"
|
|
119
125
|
elif name == "$REGEX":
|
|
120
|
-
return cktype + f"jm_is_valid_regex({val}, {path}, rep)"
|
|
126
|
+
return cktype + f"jm_is_valid_regex({val}, {self.path(path)}, {self.rep()})"
|
|
121
127
|
elif name == "$EXREG":
|
|
122
|
-
return cktype + f"jm_is_valid_extreg({val}, {path}, rep)"
|
|
128
|
+
return cktype + f"jm_is_valid_extreg({val}, {self.path(path)}, {self.rep()})"
|
|
123
129
|
elif name in ("$URL", "$URI"):
|
|
124
|
-
return cktype + f"jm_is_valid_url({val}, {path}, rep)"
|
|
130
|
+
return cktype + f"jm_is_valid_url({val}, {self.path(path)}, {self.rep()})"
|
|
125
131
|
elif name == "$EMAIL":
|
|
126
|
-
return cktype + f"jm_is_valid_email({val}, {path}, rep)"
|
|
132
|
+
return cktype + f"jm_is_valid_email({val}, {self.path(path)}, {self.rep()})"
|
|
127
133
|
elif name == "$JSON":
|
|
128
|
-
return cktype + f"jm_is_valid_json({val}, {path}, rep)"
|
|
134
|
+
return cktype + f"jm_is_valid_json({val}, {self.path(path)}, {self.rep()})"
|
|
129
135
|
else:
|
|
130
136
|
return super().predef(var, name, path, is_str)
|
|
131
137
|
|
|
@@ -191,15 +197,15 @@ class PLpgSQL(Language):
|
|
|
191
197
|
is_ptr: bool = False, is_raw: bool = False) -> BoolExpr:
|
|
192
198
|
if is_raw:
|
|
193
199
|
val = f"TO_JSONB({val})"
|
|
194
|
-
return f"jm_call({name}, {val}, {path}, rep)" if is_ptr else \
|
|
195
|
-
f"{name}({val}, {path}, rep)"
|
|
200
|
+
return f"jm_call({name}, {val}, {self.path(path)}, {self.rep()})" if is_ptr else \
|
|
201
|
+
f"{name}({val}, {self.path(path)}, {self.rep()})"
|
|
196
202
|
|
|
197
203
|
def check_unique(self, val: JsonExpr, path: Var) -> BoolExpr:
|
|
198
|
-
return f"jm_array_is_unique({val}, {path}, rep)"
|
|
204
|
+
return f"jm_array_is_unique({val}, {self.path(path)}, {self.rep()})"
|
|
199
205
|
|
|
200
206
|
def check_constraint(self, op: str, vop: int|float|str, val: JsonExpr, path: Var) -> BoolExpr:
|
|
201
207
|
"""Call inefficient type-unaware constraint check."""
|
|
202
|
-
return f"jm_check_constraint({val}, '{op}', {self._cst(vop)}, {path}, rep)"
|
|
208
|
+
return f"jm_check_constraint({val}, '{op}', {self._cst(vop)}, {self.path(path)}, {self.rep()})"
|
|
203
209
|
|
|
204
210
|
#
|
|
205
211
|
# simple instructions
|
|
@@ -228,12 +234,12 @@ class PLpgSQL(Language):
|
|
|
228
234
|
# reporting
|
|
229
235
|
#
|
|
230
236
|
def is_reporting(self) -> BoolExpr:
|
|
231
|
-
return "rep IS NOT NULL"
|
|
237
|
+
return "rep IS NOT NULL" if self._with_report else "FALSE"
|
|
232
238
|
|
|
233
239
|
def report(self, msg: str, path: Var) -> Block:
|
|
234
240
|
return [
|
|
235
241
|
r"IF rep IS NOT NULL THEN",
|
|
236
|
-
f" CALL jm_report_add_entry(rep, {self.esc(msg)}, {path});",
|
|
242
|
+
f" CALL jm_report_add_entry(rep, {self.esc(msg)}, {self.path(path)});",
|
|
237
243
|
r"END IF;"
|
|
238
244
|
] if self._with_report else []
|
|
239
245
|
|
|
@@ -185,7 +185,8 @@ def create_model(murl: str, resolver: Resolver, *,
|
|
|
185
185
|
check=check, merge=merge, optimize=optimize)
|
|
186
186
|
|
|
187
187
|
DEFAULT_CC = "cc"
|
|
188
|
-
DEFAULT_CFLAGS = "-Wall -Wno-address -Wno-c23-extensions -Wno-unused-variable
|
|
188
|
+
DEFAULT_CFLAGS = "-Wall -Wno-address -Wno-c23-extensions -Wno-unused-variable " \
|
|
189
|
+
"-Wno-unused-function -Wno-unused-but-set-variable -Wno-parentheses -Ofast"
|
|
189
190
|
DEFAULT_LDFLAGS_PCRE2 = "-ljansson -lpcre2-8 -lm"
|
|
190
191
|
# pkgconf --libs cre2
|
|
191
192
|
DEFAULT_LDFLAGS_CRE2 = "-L/usr/local/lib -ljansson -lcre2 -lpthread -lre2 -lm -lstdc++"
|
|
@@ -231,6 +231,15 @@ class CodeGenerator:
|
|
|
231
231
|
has_unique = "!" in model
|
|
232
232
|
if has_unique and not isinstance(model["!"], bool): # should not get there
|
|
233
233
|
raise ModelError("unique constraint value must be a boolean")
|
|
234
|
+
|
|
235
|
+
# simplify non empty string check based on length
|
|
236
|
+
if (tmodel is str and len(cmp_props) == 1 and
|
|
237
|
+
((">=" in cmp_props and isinstance(model[">="], (int, float)) and 0 < model[">="] <= 1) or
|
|
238
|
+
(">" in cmp_props and isinstance(model[">"], (int, float)) and 0 <= model[">"] < 1))):
|
|
239
|
+
del model[">" if ">" in cmp_props else ">="]
|
|
240
|
+
model["!="] = ""
|
|
241
|
+
cmp_props = {"!="}
|
|
242
|
+
|
|
234
243
|
# TODO ensure that not bool
|
|
235
244
|
has_int = any(isinstance(model[k], int) for k in cmp_props)
|
|
236
245
|
has_flt = any(isinstance(model[k], float) for k in cmp_props)
|
{json_model_compiler-2.0b31 → json_model_compiler-2.0b32/json_model_compiler.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: json_model_compiler
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.0b32
|
|
4
4
|
Summary: JSON Model Tools
|
|
5
5
|
Author: Fabien Coelho, Claire Yannou-Medrala
|
|
6
6
|
License-Expression: CC0-1.0
|
|
@@ -159,7 +159,8 @@ See the [benchmark page](BENCH.md) for artifacts which compare various
|
|
|
159
159
|
[JSON Model Compiler](https://github.com/clairey-zx81/json-model) runs (C, JS, Java, Python) with
|
|
160
160
|
[Sourcemeta Blaze CLI](https://github.com/sourcemeta/jsonschema) using test cases from
|
|
161
161
|
[JSON Schema Benchmark](https://github.com/sourcemeta-research/jsonschema-benchmark).
|
|
162
|
-
Overall, JMC C implementation is about
|
|
162
|
+
Overall, JMC C implementation is about 33% faster than Blaze C++ on these tests,
|
|
163
|
+
and JavaScript and Java/GSON implementations are only about 15% slower than Blaze.
|
|
163
164
|
|
|
164
165
|
## More Information
|
|
165
166
|
|