semanticdltl 1.1.0__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 (47) hide show
  1. semanticdltl-1.1.0/.gitignore +26 -0
  2. semanticdltl-1.1.0/CHANGELOG.md +92 -0
  3. semanticdltl-1.1.0/CITATION.cff +42 -0
  4. semanticdltl-1.1.0/LICENSE +674 -0
  5. semanticdltl-1.1.0/MC.py +37 -0
  6. semanticdltl-1.1.0/PKG-INFO +591 -0
  7. semanticdltl-1.1.0/README.md +563 -0
  8. semanticdltl-1.1.0/examples/README.md +189 -0
  9. semanticdltl-1.1.0/examples/extra_props.py +42 -0
  10. semanticdltl-1.1.0/examples/formulas.txt +22 -0
  11. semanticdltl-1.1.0/examples/formulas2.txt +3 -0
  12. semanticdltl-1.1.0/examples/sample.init +7 -0
  13. semanticdltl-1.1.0/examples/sample.mod +18 -0
  14. semanticdltl-1.1.0/examples/sample2.mod +25 -0
  15. semanticdltl-1.1.0/examples/session_macros.txt +22 -0
  16. semanticdltl-1.1.0/examples/synthea/README.md +303 -0
  17. semanticdltl-1.1.0/examples/synthea/build_store.py +75 -0
  18. semanticdltl-1.1.0/examples/synthea/formulas.txt +37 -0
  19. semanticdltl-1.1.0/examples/synthea/generate_logs.py +292 -0
  20. semanticdltl-1.1.0/examples/synthea/propositions.py +130 -0
  21. semanticdltl-1.1.0/pyproject.toml +64 -0
  22. semanticdltl-1.1.0/src/dltl/__init__.py +39 -0
  23. semanticdltl-1.1.0/src/dltl/__main__.py +25 -0
  24. semanticdltl-1.1.0/src/dltl/cli.py +181 -0
  25. semanticdltl-1.1.0/src/dltl/evaluator.py +393 -0
  26. semanticdltl-1.1.0/src/dltl/formula.py +170 -0
  27. semanticdltl-1.1.0/src/dltl/log.py +271 -0
  28. semanticdltl-1.1.0/src/dltl/macros.py +64 -0
  29. semanticdltl-1.1.0/src/dltl/parser.py +229 -0
  30. semanticdltl-1.1.0/src/dltl/propositions.py +103 -0
  31. semanticdltl-1.1.0/src/dltl/session.py +265 -0
  32. semanticdltl-1.1.0/tests/conftest.py +65 -0
  33. semanticdltl-1.1.0/tests/golden/sample.forms +14 -0
  34. semanticdltl-1.1.0/tests/golden/sample.norm +3 -0
  35. semanticdltl-1.1.0/tests/golden/sample.res +3 -0
  36. semanticdltl-1.1.0/tests/golden/sample.stdout +14 -0
  37. semanticdltl-1.1.0/tests/golden/sample2.stdout +2 -0
  38. semanticdltl-1.1.0/tests/golden/synthea.stdout +13 -0
  39. semanticdltl-1.1.0/tests/test_cli_args.py +78 -0
  40. semanticdltl-1.1.0/tests/test_evaluator.py +165 -0
  41. semanticdltl-1.1.0/tests/test_headers.py +53 -0
  42. semanticdltl-1.1.0/tests/test_log.py +138 -0
  43. semanticdltl-1.1.0/tests/test_macros.py +57 -0
  44. semanticdltl-1.1.0/tests/test_parser.py +114 -0
  45. semanticdltl-1.1.0/tests/test_regression_api.py +131 -0
  46. semanticdltl-1.1.0/tests/test_regression_cli.py +57 -0
  47. semanticdltl-1.1.0/tests/test_synthea_example.py +109 -0
@@ -0,0 +1,26 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ dist/
6
+ build/
7
+ .venv/
8
+ .pytest_cache/
9
+ .ruff_cache/
10
+
11
+ # IDE / notebooks
12
+ .idea/
13
+ .vscode/
14
+ .vcode/
15
+ .ipynb_checkpoints/
16
+ .DS_Store
17
+
18
+ # Model checker outputs (generated next to the .mod file)
19
+ *.res
20
+ *.norm
21
+ *_trace_lengths.csv
22
+ !tests/golden/*
23
+
24
+ # Oxigraph store of the Synthea example (built locally with build_store.py)
25
+ examples/synthea/store/
26
+
@@ -0,0 +1,92 @@
1
+ # Changelog
2
+
3
+ ## 1.1.0 (2026-09-15)
4
+
5
+ Port of the second version of the prototype (the one that was actually meant
6
+ to be published) onto the packaged code base.
7
+
8
+ ### New
9
+
10
+ - `_LOAD name file.py` loads a Python file during a session; its functions
11
+ and variables are available in data expressions as `name.<attribute>`.
12
+ - Lines starting with `@` run the rest of the line in the operating-system
13
+ shell.
14
+ - `_BYE` ends the session, as an alternative to the historical `_AGUR`
15
+ (`agur` is also accepted).
16
+ - Events now carry their position in the trace: an event is the tuple
17
+ `(position, atoms, attr1, attr2, ...)`, with `I_POS = 0` and `I_ATOM = 1`
18
+ exported by `dltl.log` and available inside data expressions. `x[#]` keeps
19
+ working and equals `x[I_POS]`. Non-atomic attributes therefore start at
20
+ index 2 (`Log.column_index` reflects it; code that used hard-coded
21
+ positions must be adjusted).
22
+ - `F`, `G`, `O` and `H` stop evaluating a trace as soon as their value is
23
+ known for the remaining events (same results, less work).
24
+ - A non-numeric value in a numeric column produces a warning and `0.0`
25
+ instead of aborting the load.
26
+ - Default propositions module aligned with the prototype: `IN_DIC`,
27
+ `IN_DIC_2`, `SAME_KEY_VALUE`, `check_patt`, `check_patt_f`,
28
+ `diff_att_geq`, `diff_pos`, `has_f_value`, `near`, `quote` (the last three
29
+ were broken in the prototype and are fixed). `suma`, `doble`, `TS_IG` and
30
+ the SPARQL helpers are gone.
31
+ - Second regression fixture `examples/sample2.mod` + `examples/formulas2.txt`.
32
+ - `examples/synthea/`: a semantic example with fourteen clinical event logs
33
+ generated from Synthea disease modules (50 to 5000 traces), each paired
34
+ with an RDF knowledge graph in N-Quads (one named graph per event), a
35
+ propositions module that queries the graph of the frozen event with SPARQL
36
+ through Oxigraph, the log generator, a store builder and a documented
37
+ session. Optional dependency `pyoxigraph` (`pip install "semanticdltl[synthea]"`).
38
+ - `Log.load` (and `--log-file`) accept gzipped models (`model.mod.gz`).
39
+ - Nested macros are expanded depth-first, so the generated formulas keep the
40
+ order of the macro values (`?a` = `a,b`, `?b` = `?a,c` gives `a, b, c`;
41
+ the prototype gave `c, a, b`). Macro values are never interpreted as
42
+ commands; this is now documented.
43
+
44
+ ### Changed
45
+
46
+ - The trace lengths file is `<model>_trace_lengths.csv` (was `.txt`).
47
+ - `examples/sample.mod` is the prototype's updated model (trace `id2` has `c`
48
+ events); one column of the reference `.norm` changed accordingly.
49
+ - Loading time is printed only in interactive mode.
50
+
51
+ ### Removed
52
+
53
+ - The `scripts/` directory (log conversion helpers) and the semantic event
54
+ logs of `examples/semantic/`.
55
+
56
+ ### Not ported
57
+
58
+ - The prototype's experimental parallel entry point (`MC_multi_proc.py`,
59
+ based on `pathos`) is not included: it did not run against the prototype's
60
+ own evaluator. Parallel evaluation of traces is left as future work.
61
+
62
+ ## 1.0.0 (2026-09-02)
63
+
64
+ First packaged release of the model checker, now called SemanticDLTL
65
+ (importable as `dltl`, command `dltl-mc`, `python -m dltl` or the legacy
66
+ `python MC.py`).
67
+
68
+ ### Behaviour changes with respect to the prototype
69
+
70
+ - **Operator precedence**: `&` now binds tighter than `|`, as stated in the
71
+ grammar and as is conventional. `a | b & c` is read as `a | (b & c)`; the
72
+ prototype read it as `(a | b) & c`. Use parentheses if you relied on the old
73
+ reading.
74
+ - `_WHO_NOT` is dispatched as a command (it used to be parsed as a formula).
75
+ - `_CLEAR_DATA` (alias `_CLEAR_CHECKED`) also forgets the list of checked
76
+ formulas, so `.forms` and `.res` stay aligned.
77
+ - The trace lengths file is no longer written every time a model is loaded:
78
+ the new `_WRITE_LENGTHS` command writes it on demand, and it is now called
79
+ `<log>_trace_lengths.txt` (it was `<log>_longs_trazas.txt`).
80
+ - Formulas are saved in `.forms` exactly as typed (the prototype leaked a
81
+ `\'` escaping into the file).
82
+ - Missing init/formula files stop the run with exit code 1 instead of
83
+ silently falling back to the standard input.
84
+ - Attribute names that collide with evaluator internals (`t`, `v`, `X`, ...)
85
+ and atomic propositions that are not valid Python identifiers now work.
86
+ - Several models can be loaded in the same process (`Log.load`).
87
+
88
+ ### Command line
89
+
90
+ - New `--key value` options (`--log-file`, `--init-file`, `--formula-file`,
91
+ `--no-interactive`, `--multi-line`, `--propositions`, `--version`); the
92
+ `key=value` syntax is still accepted.
@@ -0,0 +1,42 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use this software, please cite the paper below."
3
+ type: software
4
+ title: "SemanticDLTL: a DLTL model checker over finite traces"
5
+ authors:
6
+ - family-names: Ezpeleta
7
+ given-names: Joaquín
8
+ affiliation: Universidad de Zaragoza, Spain
9
+ - family-names: Fabra
10
+ given-names: Javier
11
+ affiliation: Universidad de Zaragoza, Spain
12
+ - family-names: Ibáñez
13
+ given-names: María José
14
+ affiliation: Universidad de La Rioja, Spain
15
+ contact:
16
+ - name: SemanticDLTL team
17
+ email: semanticdltl@unizar.es
18
+ version: 1.1.0
19
+ date-released: "2026-09-15"
20
+ doi: 10.5281/zenodo.22777413
21
+ identifiers:
22
+ - type: doi
23
+ value: 10.5281/zenodo.22777412
24
+ description: "Concept DOI: resolves to the latest version"
25
+ - type: doi
26
+ value: 10.5281/zenodo.22777413
27
+ description: "Version 1.1.0"
28
+ repository-code: "https://github.com/jfabra/SemanticDLTL"
29
+ license: GPL-3.0-or-later
30
+ preferred-citation:
31
+ type: conference-paper
32
+ title: "A Linear Temporal Logic Model Checking Method over Finite Words with Correlated Transition Attributes"
33
+ authors:
34
+ - family-names: Couvreur
35
+ given-names: Jean-Michel
36
+ - family-names: Ezpeleta
37
+ given-names: Joaquín
38
+ collection-title: "Data-Driven Process Discovery and Analysis (SIMPDA 2017), Lecture Notes in Business Information Processing, vol. 340"
39
+ publisher:
40
+ name: Springer
41
+ year: 2019
42
+ url: "https://hal.science/hal-01944569v1"