libpetri 7.2.0__tar.gz → 7.3.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 (247) hide show
  1. {libpetri-7.2.0 → libpetri-7.3.0}/PKG-INFO +1 -1
  2. {libpetri-7.2.0 → libpetri-7.3.0}/libpetri/__init__.py +4 -0
  3. {libpetri-7.2.0 → libpetri-7.3.0}/libpetri/__init__.pyi +2 -0
  4. {libpetri-7.2.0 → libpetri-7.3.0}/libpetri/_libpetri.pyi +6 -0
  5. {libpetri-7.2.0 → libpetri-7.3.0}/libpetri/verification.py +51 -1
  6. {libpetri-7.2.0 → libpetri-7.3.0}/libpetri/verification.pyi +11 -0
  7. {libpetri-7.2.0 → libpetri-7.3.0}/rust/Cargo.lock +10 -10
  8. {libpetri-7.2.0 → libpetri-7.3.0}/rust/Cargo.toml +8 -8
  9. libpetri-7.3.0/rust/libpetri/tests/nu055_name_alignment_run.rs +252 -0
  10. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-docgen/resources/petrinet-diagrams.js +1 -1
  11. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-py/Cargo.toml +2 -2
  12. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-py/src/verification.rs +48 -5
  13. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/abstract_replay.rs +33 -1
  14. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/bounded_run.rs +34 -0
  15. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/graph_decision.rs +103 -2
  16. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/lib.rs +3 -0
  17. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/linear_bound.rs +14 -0
  18. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/name_coloured_encoder.rs +18 -1
  19. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/name_fragment.rs +76 -29
  20. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/name_marking.rs +101 -0
  21. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/name_state_class_graph.rs +11 -11
  22. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/nu_scg_verifier.rs +190 -56
  23. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/property.rs +168 -6
  24. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/scg_verifier.rs +35 -1
  25. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/smt_encoder.rs +26 -0
  26. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/smt_verifier.rs +345 -75
  27. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/state_class_graph.rs +38 -0
  28. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/state_equation_phase.rs +34 -0
  29. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/state_space_cache.rs +14 -9
  30. libpetri-7.3.0/rust/libpetri-verification/src/stubborn_sets.rs +226 -0
  31. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/tests/common/relay_nets.rs +24 -0
  32. libpetri-7.3.0/rust/libpetri-verification/tests/nu_name_alignment.rs +525 -0
  33. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/tests/state_space_cache.rs +8 -0
  34. libpetri-7.3.0/rust/libpetri-verification/tests/stubborn_sets.rs +155 -0
  35. {libpetri-7.2.0 → libpetri-7.3.0}/README.md +0 -0
  36. {libpetri-7.2.0 → libpetri-7.3.0}/libpetri/archive.py +0 -0
  37. {libpetri-7.2.0 → libpetri-7.3.0}/libpetri/archive.pyi +0 -0
  38. {libpetri-7.2.0 → libpetri-7.3.0}/libpetri/asyncio_helpers.py +0 -0
  39. {libpetri-7.2.0 → libpetri-7.3.0}/libpetri/asyncio_helpers.pyi +0 -0
  40. {libpetri-7.2.0 → libpetri-7.3.0}/libpetri/debug.py +0 -0
  41. {libpetri-7.2.0 → libpetri-7.3.0}/libpetri/debug.pyi +0 -0
  42. {libpetri-7.2.0 → libpetri-7.3.0}/libpetri/events.py +0 -0
  43. {libpetri-7.2.0 → libpetri-7.3.0}/libpetri/events.pyi +0 -0
  44. {libpetri-7.2.0 → libpetri-7.3.0}/libpetri/export.py +0 -0
  45. {libpetri-7.2.0 → libpetri-7.3.0}/libpetri/export.pyi +0 -0
  46. {libpetri-7.2.0 → libpetri-7.3.0}/libpetri/model.py +0 -0
  47. {libpetri-7.2.0 → libpetri-7.3.0}/libpetri/model.pyi +0 -0
  48. {libpetri-7.2.0 → libpetri-7.3.0}/libpetri/py.typed +0 -0
  49. {libpetri-7.2.0 → libpetri-7.3.0}/libpetri/runtime.py +0 -0
  50. {libpetri-7.2.0 → libpetri-7.3.0}/libpetri/runtime.pyi +0 -0
  51. {libpetri-7.2.0 → libpetri-7.3.0}/pyproject.toml +0 -0
  52. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri/Cargo.toml +0 -0
  53. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri/README.md +0 -0
  54. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri/build.rs +0 -0
  55. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri/doc/showcase.svg +0 -0
  56. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri/examples/basic.rs +0 -0
  57. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri/src/lib.rs +0 -0
  58. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri/tests/auto_compose.rs +0 -0
  59. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri/tests/channel_composition.rs +0 -0
  60. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri/tests/compose_direct_e2e.rs +0 -0
  61. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri/tests/compose_e2e.rs +0 -0
  62. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri/tests/core073_snapshot_restore.rs +0 -0
  63. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri/tests/cross_lang_flat_dot.rs +0 -0
  64. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri/tests/cross_lang_inhibitor_read_dot.rs +0 -0
  65. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri/tests/cross_lang_junctions_dot.rs +0 -0
  66. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri/tests/cross_lang_pipeline_dot.rs +0 -0
  67. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri/tests/cross_lang_reset_output_dot.rs +0 -0
  68. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri/tests/exec042_terminal_places.rs +0 -0
  69. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri/tests/fusion.rs +0 -0
  70. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri/tests/inflight_atomicity.rs +0 -0
  71. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri/tests/mod031_identity_roundtrip.rs +0 -0
  72. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri/tests/nu_mint_contract.rs +0 -0
  73. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri/tests/subnet_verify.rs +0 -0
  74. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri/tests/time015_injectable_clock.rs +0 -0
  75. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/Cargo.toml +0 -0
  76. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/doc/arc_types.svg +0 -0
  77. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/doc/timing_modes.svg +0 -0
  78. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/src/action.rs +0 -0
  79. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/src/arc.rs +0 -0
  80. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/src/compose.rs +0 -0
  81. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/src/context.rs +0 -0
  82. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/src/dead_arcs.rs +0 -0
  83. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/src/fusion.rs +0 -0
  84. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/src/input.rs +0 -0
  85. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/src/instance.rs +0 -0
  86. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/src/interface.rs +0 -0
  87. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/src/lib.rs +0 -0
  88. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/src/match_spec.rs +0 -0
  89. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/src/name.rs +0 -0
  90. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/src/output.rs +0 -0
  91. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/src/petri_net.rs +0 -0
  92. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/src/place.rs +0 -0
  93. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/src/rewriter.rs +0 -0
  94. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/src/subnet.rs +0 -0
  95. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/src/subnet_def.rs +0 -0
  96. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/src/subnet_instance.rs +0 -0
  97. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/src/subnet_prefixes.rs +0 -0
  98. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/src/timing.rs +0 -0
  99. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/src/token.rs +0 -0
  100. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/src/transition.rs +0 -0
  101. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/tests/composition_properties.proptest-regressions +0 -0
  102. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/tests/composition_properties.rs +0 -0
  103. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/tests/mod031_place_resolution.rs +0 -0
  104. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-core/tests/nu_match_composition.rs +0 -0
  105. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-debug/Cargo.toml +0 -0
  106. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-debug/src/archive/mod.rs +0 -0
  107. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-debug/src/archive/session_archive.rs +0 -0
  108. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-debug/src/archive/session_archive_reader.rs +0 -0
  109. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-debug/src/archive/session_archive_storage.rs +0 -0
  110. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-debug/src/archive/session_archive_writer.rs +0 -0
  111. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-debug/src/archive/session_metadata.rs +0 -0
  112. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-debug/src/debug_aware_event_store.rs +0 -0
  113. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-debug/src/debug_command.rs +0 -0
  114. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-debug/src/debug_event_store.rs +0 -0
  115. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-debug/src/debug_protocol_handler.rs +0 -0
  116. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-debug/src/debug_response.rs +0 -0
  117. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-debug/src/debug_session_registry.rs +0 -0
  118. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-debug/src/lib.rs +0 -0
  119. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-debug/src/marking_cache.rs +0 -0
  120. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-debug/src/net_event_converter.rs +0 -0
  121. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-debug/src/place_analysis.rs +0 -0
  122. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-debug/src/token_projector_registry.rs +0 -0
  123. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-docgen/Cargo.toml +0 -0
  124. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-docgen/resources/petrinet-diagrams.css +0 -0
  125. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-docgen/src/diagram_renderer.rs +0 -0
  126. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-docgen/src/lib.rs +0 -0
  127. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-docgen/src/subnet_dot_export.rs +0 -0
  128. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-docgen/src/subnet_header.rs +0 -0
  129. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-docgen/tests/subnet_diagrams.rs +0 -0
  130. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-event/Cargo.toml +0 -0
  131. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-event/src/event_store.rs +0 -0
  132. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-event/src/lib.rs +0 -0
  133. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-event/src/net_event.rs +0 -0
  134. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-event/src/token_payload.rs +0 -0
  135. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-export/Cargo.toml +0 -0
  136. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-export/doc/export_example.svg +0 -0
  137. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-export/src/cluster_builder.rs +0 -0
  138. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-export/src/dot_exporter.rs +0 -0
  139. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-export/src/dot_renderer.rs +0 -0
  140. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-export/src/graph.rs +0 -0
  141. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-export/src/lib.rs +0 -0
  142. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-export/src/mapper.rs +0 -0
  143. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-export/src/styles.rs +0 -0
  144. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-export/src/subnet_prefixes.rs +0 -0
  145. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-py/src/action.rs +0 -0
  146. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-py/src/archive.rs +0 -0
  147. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-py/src/clock.rs +0 -0
  148. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-py/src/debug.rs +0 -0
  149. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-py/src/error.rs +0 -0
  150. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-py/src/events.rs +0 -0
  151. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-py/src/executor.rs +0 -0
  152. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-py/src/export.rs +0 -0
  153. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-py/src/lib.rs +0 -0
  154. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-py/src/marking_cache.rs +0 -0
  155. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-py/src/model.rs +0 -0
  156. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-py/src/open_net.rs +0 -0
  157. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-py/src/value.rs +0 -0
  158. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-runtime/Cargo.toml +0 -0
  159. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-runtime/build.rs +0 -0
  160. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-runtime/proptest-regressions/differential_prop_tests.txt +0 -0
  161. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-runtime/src/backend_suite_tests.rs +0 -0
  162. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-runtime/src/bitmap.rs +0 -0
  163. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-runtime/src/bitmap_backend.rs +0 -0
  164. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-runtime/src/clock.rs +0 -0
  165. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-runtime/src/compiled_net.rs +0 -0
  166. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-runtime/src/differential_prop_tests.rs +0 -0
  167. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-runtime/src/environment.rs +0 -0
  168. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-runtime/src/executor.rs +0 -0
  169. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-runtime/src/executor_core/backend.rs +0 -0
  170. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-runtime/src/executor_core/deadline.rs +0 -0
  171. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-runtime/src/executor_core/event_payload.rs +0 -0
  172. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-runtime/src/executor_core/executor.rs +0 -0
  173. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-runtime/src/executor_core/mod.rs +0 -0
  174. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-runtime/src/executor_core/output.rs +0 -0
  175. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-runtime/src/executor_core/scope.rs +0 -0
  176. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-runtime/src/executor_handle.rs +0 -0
  177. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-runtime/src/lib.rs +0 -0
  178. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-runtime/src/marking.rs +0 -0
  179. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-runtime/src/match_engine.rs +0 -0
  180. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-runtime/src/nu_relay_tests.rs +0 -0
  181. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-runtime/src/owned_precompiled.rs +0 -0
  182. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-runtime/src/precompiled_backend.rs +0 -0
  183. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-runtime/src/precompiled_executor.rs +0 -0
  184. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-runtime/src/precompiled_net.rs +0 -0
  185. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-runtime/src/termination.rs +0 -0
  186. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/Cargo.toml +0 -0
  187. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/build.rs +0 -0
  188. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/analyzer.rs +0 -0
  189. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/branch_outcomes.rs +0 -0
  190. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/cancel.rs +0 -0
  191. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/certificate_check.rs +0 -0
  192. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/counterexample.rs +0 -0
  193. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/dbm.rs +0 -0
  194. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/environment.rs +0 -0
  195. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/exact.rs +0 -0
  196. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/harness.rs +0 -0
  197. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/in_flight.rs +0 -0
  198. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/incidence_matrix.rs +0 -0
  199. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/invariant_synthesis.rs +0 -0
  200. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/marking_state.rs +0 -0
  201. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/name_state_class.rs +0 -0
  202. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/net_flattener.rs +0 -0
  203. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/open_net/closure.rs +0 -0
  204. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/open_net/contract.rs +0 -0
  205. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/open_net/graph_route.rs +0 -0
  206. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/open_net/mod.rs +0 -0
  207. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/open_net/predicate.rs +0 -0
  208. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/open_net/report.rs +0 -0
  209. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/open_net/result.rs +0 -0
  210. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/open_net/smt_route.rs +0 -0
  211. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/open_net/tests.rs +0 -0
  212. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/open_net/verify_open_net.rs +0 -0
  213. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/p_invariant.rs +0 -0
  214. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/parikh_search.rs +0 -0
  215. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/priority_semantics.rs +0 -0
  216. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/reaping.rs +0 -0
  217. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/rest_set.rs +0 -0
  218. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/result.rs +0 -0
  219. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/scc.rs +0 -0
  220. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/slot_bound_lp.rs +0 -0
  221. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/smt_text.rs +0 -0
  222. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/state_class.rs +0 -0
  223. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/state_equation_query.rs +0 -0
  224. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/structural_check.rs +0 -0
  225. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/terminal_places.rs +0 -0
  226. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/total_budget.rs +0 -0
  227. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/trap_refinement.rs +0 -0
  228. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/src/z3_process.rs +0 -0
  229. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/tests/common/json.rs +0 -0
  230. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/tests/common/net_json.rs +0 -0
  231. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/tests/common/nets.rs +0 -0
  232. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/tests/common/old_slot_bound.rs +0 -0
  233. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/tests/common/relay_fixtures.rs +0 -0
  234. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/tests/common/slot_lp_cases.rs +0 -0
  235. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/tests/conformance.rs +0 -0
  236. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/tests/env_bounded_premises.rs +0 -0
  237. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/tests/mint_declarations.rs +0 -0
  238. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/tests/nu_join_relay.rs +0 -0
  239. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/tests/phase_dump.rs +0 -0
  240. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/tests/reaping.rs +0 -0
  241. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/tests/route_agreement.rs +0 -0
  242. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/tests/slot_bound_lp.rs +0 -0
  243. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/tests/smt_script_parity.rs +0 -0
  244. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/tests/structural_route.rs +0 -0
  245. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/tests/stub_z3.rs +0 -0
  246. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/tests/verdict_parity.rs +0 -0
  247. {libpetri-7.2.0 → libpetri-7.3.0}/rust/libpetri-verification/tests/z3_gate.rs +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: libpetri
3
- Version: 7.2.0
3
+ Version: 7.3.0
4
4
  Classifier: Development Status :: 4 - Beta
5
5
  Classifier: License :: OSI Approved :: Apache Software License
6
6
  Classifier: Programming Language :: Python :: 3
@@ -119,8 +119,10 @@ from .verification import (
119
119
  ignore,
120
120
  joined_or_dead_lettered,
121
121
  mutual_exclusion,
122
+ name_aligned,
122
123
  place_bound,
123
124
  quiescent_count,
125
+ quiescent_name_aligned,
124
126
  unreachable,
125
127
  encode_smt_scripts,
126
128
  verify,
@@ -233,11 +235,13 @@ __all__ = [
233
235
  "inhibitor",
234
236
  "joined_or_dead_lettered",
235
237
  "mutual_exclusion",
238
+ "name_aligned",
236
239
  "one",
237
240
  "out",
238
241
  "out_place",
239
242
  "place_bound",
240
243
  "quiescent_count",
244
+ "quiescent_name_aligned",
241
245
  "read",
242
246
  "require_debug",
243
247
  "reset",
@@ -120,8 +120,10 @@ from .verification import (
120
120
  ignore as ignore,
121
121
  joined_or_dead_lettered as joined_or_dead_lettered,
122
122
  mutual_exclusion as mutual_exclusion,
123
+ name_aligned as name_aligned,
123
124
  place_bound as place_bound,
124
125
  quiescent_count as quiescent_count,
126
+ quiescent_name_aligned as quiescent_name_aligned,
125
127
  unreachable as unreachable,
126
128
  encode_smt_scripts as encode_smt_scripts,
127
129
  verify as verify,
@@ -559,6 +559,8 @@ def place_bound(place: str, bound: int) -> SmtProperty: ...
559
559
  def unreachable(places: list[str]) -> SmtProperty: ...
560
560
  def branch_place_bound(place: str, bound: int) -> SmtProperty: ...
561
561
  def joined_or_dead_lettered(pending: str) -> SmtProperty: ...
562
+ def name_aligned(places: list[str]) -> SmtProperty: ...
563
+ def quiescent_name_aligned(places: list[str]) -> SmtProperty: ...
562
564
  def quiescent_count(
563
565
  places: list[str], min: int, max: int | float, waived_by: list[str] | None = ...
564
566
  ) -> SmtProperty:
@@ -586,6 +588,7 @@ def verify_net(
586
588
  linear_bound: bool = ...,
587
589
  state_equation: bool = ...,
588
590
  enumeration_max_classes: int | None = ...,
591
+ partial_order_reduction: bool = ...,
589
592
  state_equation_phase: bool = ...,
590
593
  firing_bound: bool = ...,
591
594
  state_space_cache: StateSpaceCache | None = ...,
@@ -604,6 +607,8 @@ def verify_net(
604
607
  ``enumeration_max_classes`` (``None`` keeps the engine
605
608
  default of 50 000) is the class budget of the
606
609
  bounded state-space enumeration route; ``0`` disables it (VER-017).
610
+ ``partial_order_reduction`` (default ``True``) reduces that route by stubborn
611
+ sets for the quiescence properties; every dead marking is kept (VER-024).
607
612
  ``semiflow_invariants`` also takes ``"auto"``: union the P-semiflows exactly
608
613
  when the null-space basis lost a law to the H1 guard (VER-007).
609
614
  ``state_equation_phase`` (VER-018) and ``firing_bound`` (VER-019), both on by
@@ -627,6 +632,7 @@ def verify_subnet(
627
632
  sink_places: list[str] | None = ...,
628
633
  sink_places_when: dict[str, list[str]] | None = ...,
629
634
  enumeration_max_classes: int | None = ...,
635
+ partial_order_reduction: bool | None = ...,
630
636
  state_space_cache: StateSpaceCache | None = ...,
631
637
  budget_places: list[str] | None = ...,
632
638
  carrier_places: list[str] | None = ...,
@@ -159,6 +159,38 @@ def joined_or_dead_lettered(pending: PlaceLike) -> SmtProperty:
159
159
  return _ext.joined_or_dead_lettered(_coerce_place_name(pending))
160
160
 
161
161
 
162
+ def name_aligned(places: Iterable[PlaceLike]) -> SmtProperty:
163
+ """ν-net name alignment (NU-055): in every reachable marking, the places of
164
+ ``places`` together hold at most one distinct name. An empty place imposes
165
+ nothing, but a place holding two names violates it whatever the others hold, so
166
+ ``name_aligned([p])`` says ``p`` never holds two names. Places compare by name and
167
+ each counts once, at its first occurrence; the order changes no verdict, only the
168
+ description and which place a reason names. An empty ``places`` raises
169
+ ``ValueError``, a bare name instead of a list ``TypeError``.
170
+
171
+ Every place must be a coloured place of the ν fragment (a match key, a declared
172
+ carrier or a relay target): on an uncoloured place the verdict is ``unknown``,
173
+ never ``proven``. Decided only by Route B, the name-partition state-class graph
174
+ (NU-050); :func:`encode_smt_scripts` raises ``ValueError`` for it."""
175
+ return _ext.name_aligned(_alignment_names("name_aligned", places))
176
+
177
+
178
+ def quiescent_name_aligned(places: Iterable[PlaceLike]) -> SmtProperty:
179
+ """ν-net name alignment at rest (NU-055): the predicate of :func:`name_aligned`,
180
+ read only in the reachable quiescent markings (the reap-aware quiescence of
181
+ VER-002). Like :func:`joined_or_dead_lettered` it carries no sink clause. An empty
182
+ ``places`` raises ``ValueError``, a bare name instead of a list ``TypeError``."""
183
+ return _ext.quiescent_name_aligned(_alignment_names("quiescent_name_aligned", places))
184
+
185
+
186
+ def _alignment_names(factory: str, places: Iterable[PlaceLike]) -> list[str]:
187
+ # A str is an iterable of one-letter names; for these factories a bare name is the
188
+ # likely mistake for the singleton list (NU-055), so it is refused, not split.
189
+ if isinstance(places, str):
190
+ raise TypeError(f"{factory} takes a list of places: {factory}([{places!r}])")
191
+ return _place_names(places)
192
+
193
+
162
194
  def _place_names(places: Iterable[PlaceLike]) -> list[str]:
163
195
  return [_coerce_place_name(p) for p in places]
164
196
 
@@ -246,6 +278,7 @@ def verify(
246
278
  linear_bound: bool = True,
247
279
  state_equation: bool = False,
248
280
  enumeration_max_classes: int | None = None,
281
+ partial_order_reduction: bool = True,
249
282
  state_equation_phase: bool = True,
250
283
  firing_bound: bool = True,
251
284
  state_space_cache: StateSpaceCache | None = None,
@@ -420,6 +453,15 @@ def verify(
420
453
  SMT pipeline runs unchanged; pass ``0`` to disable it, which is what a test
421
454
  pinning the encoders' own answer wants.
422
455
 
456
+ ``partial_order_reduction`` (default ``True``, VER-024) reduces that route by
457
+ stubborn sets for the quiescence properties (``deadlock_free``,
458
+ ``terminates_at_sink``, ``joined_or_dead_lettered``, ``quiescent_count``): each
459
+ class expands only one stubborn set, every reachable dead marking is kept, and a
460
+ net that forks into independent subnets closes in about the sum of their state
461
+ spaces instead of the product. A witness is then the shortest path in the
462
+ reduced graph, not necessarily the shortest run. ``False`` restores the full
463
+ graph.
464
+
423
465
  ``state_equation_phase`` (default ``True``, VER-018) runs after the linear
424
466
  bound and before the fixpoint query: can a marking the marking equation
425
467
  admits violate the property? ``unsat`` proves it (``result.method ==
@@ -536,6 +578,7 @@ def verify(
536
578
  linear_bound=linear_bound,
537
579
  state_equation=state_equation,
538
580
  enumeration_max_classes=enumeration_max_classes,
581
+ partial_order_reduction=partial_order_reduction,
539
582
  state_equation_phase=state_equation_phase,
540
583
  firing_bound=firing_bound,
541
584
  state_space_cache=state_space_cache,
@@ -564,6 +607,7 @@ def verify_subnet(
564
607
  sink_places: Iterable[PlaceLike] | None = None,
565
608
  sink_places_when: Mapping[PlaceLike, Iterable[PlaceLike]] | None = None,
566
609
  enumeration_max_classes: int | None = None,
610
+ partial_order_reduction: bool | None = None,
567
611
  state_space_cache: StateSpaceCache | None = None,
568
612
  budget_places: Iterable[PlaceLike] | None = None,
569
613
  carrier_places: Iterable[PlaceLike] | None = None,
@@ -623,6 +667,7 @@ def verify_subnet(
623
667
  None if sink_places_when is None else _coerce_sink_places_when(sink_places_when)
624
668
  ),
625
669
  enumeration_max_classes=enumeration_max_classes,
670
+ partial_order_reduction=partial_order_reduction,
626
671
  state_space_cache=state_space_cache,
627
672
  budget_places=places(budget_places),
628
673
  carrier_places=places(carrier_places),
@@ -688,7 +733,10 @@ def encode_smt_scripts(
688
733
  ``assume_atomic_firing`` (VER-004) encodes the net without the in-flight split.
689
734
  ``mint_transitions`` (NU-010) declares the mints as :func:`verify` takes them; a
690
735
  name that is no transition of ``net`` raises ``ValueError`` with the reason
691
- :func:`verify` gives for its ``unknown`` verdict.
736
+ :func:`verify` gives for its ``unknown`` verdict. A name-alignment property
737
+ (:func:`name_aligned`, :func:`quiescent_name_aligned`, NU-055) raises
738
+ ``StructureError`` (a ``ValueError``): only Route B decides it, and Route B
739
+ sends no script.
692
740
  """
693
741
  return _ext.encode_smt_scripts(
694
742
  _coerce_net(net),
@@ -1004,8 +1052,10 @@ __all__ = [
1004
1052
  "ignore",
1005
1053
  "joined_or_dead_lettered",
1006
1054
  "mutual_exclusion",
1055
+ "name_aligned",
1007
1056
  "place_bound",
1008
1057
  "quiescent_count",
1058
+ "quiescent_name_aligned",
1009
1059
  "unreachable",
1010
1060
  "verify",
1011
1061
  "verify_open_net",
@@ -71,6 +71,13 @@ def place_bound(place: PlaceLike, bound: int) -> SmtProperty: ...
71
71
  def unreachable(places: Iterable[PlaceLike]) -> SmtProperty: ...
72
72
  def branch_place_bound(place: PlaceLike, bound: int) -> SmtProperty: ...
73
73
  def joined_or_dead_lettered(pending: PlaceLike) -> SmtProperty: ...
74
+ def name_aligned(places: Iterable[PlaceLike]) -> SmtProperty:
75
+ """The places of ``places`` together hold at most one distinct name, in every
76
+ reachable marking (NU-055). Each must be coloured; decided only by Route B. An
77
+ empty ``places`` raises ``ValueError``, a bare name ``TypeError``."""
78
+ def quiescent_name_aligned(places: Iterable[PlaceLike]) -> SmtProperty:
79
+ """:func:`name_aligned`, read only in the reachable quiescent markings (NU-055).
80
+ An empty ``places`` raises ``ValueError``, a bare name ``TypeError``."""
74
81
  def quiescent_count(
75
82
  places: Iterable[PlaceLike],
76
83
  min: int,
@@ -102,6 +109,7 @@ def verify(
102
109
  linear_bound: bool = ...,
103
110
  state_equation: bool = ...,
104
111
  enumeration_max_classes: int | None = ...,
112
+ partial_order_reduction: bool = ...,
105
113
  state_equation_phase: bool = ...,
106
114
  firing_bound: bool = ...,
107
115
  state_space_cache: StateSpaceCache | None = ...,
@@ -120,6 +128,8 @@ def verify(
120
128
  default of 50 000) is the class
121
129
  budget of the bounded state-space enumeration route, which decides an untimed
122
130
  closed net exactly with no solver at all; ``0`` disables it (VER-017).
131
+ ``partial_order_reduction`` (default ``True``) reduces that route by stubborn
132
+ sets for the quiescence properties; every dead marking is kept (VER-024).
123
133
  ``semiflow_invariants="auto"`` unions the P-semiflows exactly when the
124
134
  null-space basis lost a law to the H1 guard (VER-007). ``state_equation_phase``
125
135
  (VER-018) and ``firing_bound`` (VER-019), both on by default, can decide the
@@ -162,6 +172,7 @@ def verify_subnet(
162
172
  sink_places: Iterable[PlaceLike] | None = ...,
163
173
  sink_places_when: _PlaceSets | None = ...,
164
174
  enumeration_max_classes: int | None = ...,
175
+ partial_order_reduction: bool | None = ...,
165
176
  state_space_cache: StateSpaceCache | None = ...,
166
177
  budget_places: Iterable[PlaceLike] | None = ...,
167
178
  carrier_places: Iterable[PlaceLike] | None = ...,
@@ -504,7 +504,7 @@ checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d"
504
504
 
505
505
  [[package]]
506
506
  name = "libpetri"
507
- version = "10.1.0"
507
+ version = "11.0.0"
508
508
  dependencies = [
509
509
  "libpetri-core",
510
510
  "libpetri-debug",
@@ -518,7 +518,7 @@ dependencies = [
518
518
 
519
519
  [[package]]
520
520
  name = "libpetri-benches"
521
- version = "10.1.0"
521
+ version = "11.0.0"
522
522
  dependencies = [
523
523
  "criterion",
524
524
  "libpetri",
@@ -528,7 +528,7 @@ dependencies = [
528
528
 
529
529
  [[package]]
530
530
  name = "libpetri-core"
531
- version = "10.1.0"
531
+ version = "11.0.0"
532
532
  dependencies = [
533
533
  "libpetri-event",
534
534
  "proptest",
@@ -536,7 +536,7 @@ dependencies = [
536
536
 
537
537
  [[package]]
538
538
  name = "libpetri-debug"
539
- version = "10.1.0"
539
+ version = "11.0.0"
540
540
  dependencies = [
541
541
  "crossbeam-channel",
542
542
  "flate2",
@@ -549,7 +549,7 @@ dependencies = [
549
549
 
550
550
  [[package]]
551
551
  name = "libpetri-docgen"
552
- version = "10.1.0"
552
+ version = "11.0.0"
553
553
  dependencies = [
554
554
  "libpetri-core",
555
555
  "libpetri-export",
@@ -558,18 +558,18 @@ dependencies = [
558
558
 
559
559
  [[package]]
560
560
  name = "libpetri-event"
561
- version = "10.1.0"
561
+ version = "11.0.0"
562
562
 
563
563
  [[package]]
564
564
  name = "libpetri-export"
565
- version = "10.1.0"
565
+ version = "11.0.0"
566
566
  dependencies = [
567
567
  "libpetri-core",
568
568
  ]
569
569
 
570
570
  [[package]]
571
571
  name = "libpetri-py"
572
- version = "7.2.0"
572
+ version = "7.3.0"
573
573
  dependencies = [
574
574
  "libpetri",
575
575
  "pyo3",
@@ -580,7 +580,7 @@ dependencies = [
580
580
 
581
581
  [[package]]
582
582
  name = "libpetri-runtime"
583
- version = "10.1.0"
583
+ version = "11.0.0"
584
584
  dependencies = [
585
585
  "libpetri-core",
586
586
  "libpetri-docgen",
@@ -591,7 +591,7 @@ dependencies = [
591
591
 
592
592
  [[package]]
593
593
  name = "libpetri-verification"
594
- version = "10.1.0"
594
+ version = "11.0.0"
595
595
  dependencies = [
596
596
  "libpetri-core",
597
597
  "libpetri-docgen",
@@ -3,7 +3,7 @@ resolver = "2"
3
3
  members = ["libpetri-core", "libpetri-event", "libpetri-runtime", "libpetri-export", "libpetri-verification", "libpetri-debug", "libpetri-docgen", "libpetri", "libpetri-py"]
4
4
 
5
5
  [workspace.package]
6
- version = "10.1.0"
6
+ version = "11.0.0"
7
7
  edition = "2024"
8
8
  rust-version = "1.88"
9
9
  license = "Apache-2.0"
@@ -11,13 +11,13 @@ repository = "https://github.com/debe/libpetri"
11
11
  homepage = "https://libpetri.org"
12
12
 
13
13
  [workspace.dependencies]
14
- libpetri-core = { path = "libpetri-core", version = "10.1.0" }
15
- libpetri-event = { path = "libpetri-event", version = "10.1.0" }
16
- libpetri-runtime = { path = "libpetri-runtime", version = "10.1.0" }
17
- libpetri-export = { path = "libpetri-export", version = "10.1.0" }
18
- libpetri-verification = { path = "libpetri-verification", version = "10.1.0" }
19
- libpetri-debug = { path = "libpetri-debug", version = "10.1.0" }
20
- libpetri-docgen = { path = "libpetri-docgen", version = "10.1.0" }
14
+ libpetri-core = { path = "libpetri-core", version = "11.0.0" }
15
+ libpetri-event = { path = "libpetri-event", version = "11.0.0" }
16
+ libpetri-runtime = { path = "libpetri-runtime", version = "11.0.0" }
17
+ libpetri-export = { path = "libpetri-export", version = "11.0.0" }
18
+ libpetri-verification = { path = "libpetri-verification", version = "11.0.0" }
19
+ libpetri-debug = { path = "libpetri-debug", version = "11.0.0" }
20
+ libpetri-docgen = { path = "libpetri-docgen", version = "11.0.0" }
21
21
  tokio = { version = "1", features = ["rt", "rt-multi-thread", "time", "sync", "macros"] }
22
22
  criterion = { version = "0.8", features = ["html_reports"] }
23
23
  pyo3 = { version = "0.28", default-features = false }
@@ -0,0 +1,252 @@
1
+ //! \[NU-055\] AC5: the search-as-you-type net of the worked example, run with names minted in
2
+ //! the default scope and in a pinned one ([NU-010], [NU-011]) on both executors. The fixed net
3
+ //! rests with `box` and `list` holding one name (`QuiescentNameAligned` is `Proven`); the buggy
4
+ //! variant rests on the old results (`Violated`, 12 firings), and the minting scope changes
5
+ //! neither. The verifier answers the same on these executable nets as on the fixtures of
6
+ //! `spec/verification-fixtures/nu-aligned-fixtures.json`.
7
+ //!
8
+ //! `fetchA` answers only once `show` has shown a result, so the reply to the first keystroke
9
+ //! lands after the reply to the second, deterministically: the run the buggy variant's
10
+ //! counterexample describes. Lives in the umbrella crate so it can run the executors and the
11
+ //! verifier together. The same runs as TypeScript's `tests/verification/nu-name-alignment.test.ts`.
12
+
13
+ #![cfg(all(feature = "tokio", feature = "z3"))]
14
+
15
+ use std::sync::Arc;
16
+
17
+ use libpetri::core::action::{BoxedAction, async_action, sync_action};
18
+ use libpetri::core::input::one;
19
+ use libpetri::core::match_spec::MatchSpec;
20
+ use libpetri::core::name::NameId;
21
+ use libpetri::core::output::{and, out_place};
22
+ use libpetri::core::petri_net::PetriNet;
23
+ use libpetri::core::place::Place;
24
+ use libpetri::core::token::Token;
25
+ use libpetri::core::transition::Transition;
26
+ use libpetri::event::event_store::NoopEventStore;
27
+ use libpetri::runtime::compiled_net::CompiledNet;
28
+ use libpetri::runtime::executor::{BitmapNetExecutor, ExecutorOptions};
29
+ use libpetri::runtime::marking::Marking;
30
+ use libpetri::runtime::precompiled_executor::PrecompiledNetExecutor;
31
+ use libpetri::runtime::precompiled_net::PrecompiledNet;
32
+ use libpetri::verification::marking_state::MarkingStateBuilder;
33
+ use libpetri::verification::name_fragment::FragmentMode;
34
+ use libpetri::verification::property::SmtProperty;
35
+ use libpetri::verification::result::VerificationRoute;
36
+ use libpetri::verification::smt_verifier::SmtVerifier;
37
+ use tokio::sync::Notify;
38
+
39
+ const INITIAL: [(&str, usize); 4] = [("typed", 2), ("idle", 1), ("listEmpty", 1), ("slot", 1)];
40
+ const SCOPE: &str = "nu055-scope";
41
+
42
+ fn p(name: &str) -> Place<String> {
43
+ Place::new(name)
44
+ }
45
+
46
+ fn key(s: &String) -> NameId {
47
+ NameId::new(s.clone())
48
+ }
49
+
50
+ /// Writes a unit token into `to`.
51
+ fn unit(to: &'static str) -> BoxedAction {
52
+ sync_action(move |ctx| {
53
+ ctx.output(to, "unit".to_string())?;
54
+ Ok(())
55
+ })
56
+ }
57
+
58
+ /// Writes the name consumed from `from` into each of `to`, and a unit token into `unit_to`.
59
+ fn relay(from: &'static str, to: &'static [&'static str], unit_to: Option<&'static str>) -> BoxedAction {
60
+ sync_action(move |ctx| {
61
+ let n: String = (*ctx.input::<String>(from)?).clone();
62
+ for place in to {
63
+ ctx.output(place, n.clone())?;
64
+ }
65
+ if let Some(place) = unit_to {
66
+ ctx.output(place, "unit".to_string())?;
67
+ }
68
+ Ok(())
69
+ })
70
+ }
71
+
72
+ /// Mints a fresh name into `box` and `inflight` ([NU-010]).
73
+ fn mint(inflight: &'static str) -> BoxedAction {
74
+ sync_action(move |ctx| {
75
+ let n = ctx.fresh_name().as_str().to_string();
76
+ ctx.output("box", n.clone())?;
77
+ ctx.output(inflight, n)?;
78
+ Ok(())
79
+ })
80
+ }
81
+
82
+ fn step(name: &str, ins: &[&str], outs: &[&str], action: BoxedAction) -> Transition {
83
+ let mut b = Transition::builder(name);
84
+ for i in ins {
85
+ b = b.input(one(&p(i)));
86
+ }
87
+ let out = if outs.len() == 1 {
88
+ out_place(&p(outs[0]))
89
+ } else {
90
+ and(outs.iter().map(|o| out_place(&p(o))).collect())
91
+ };
92
+ b.output(out).action(action).build()
93
+ }
94
+
95
+ /// The search-as-you-type net with executable actions: each token of a coloured place is
96
+ /// its name. `fetchA` waits for `show`, so it answers last.
97
+ fn search_as_you_type(bug: bool) -> PetriNet {
98
+ let shown = Arc::new(Notify::new());
99
+ let gate = Arc::clone(&shown);
100
+ let fetch_a = async_action(move |mut ctx| {
101
+ let gate = Arc::clone(&gate);
102
+ async move {
103
+ let n: String = (*ctx.input::<String>("inflightA")?).clone();
104
+ gate.notified().await;
105
+ ctx.output("reply", n)?;
106
+ Ok(ctx)
107
+ }
108
+ });
109
+ let show = sync_action(move |ctx| {
110
+ let n: String = (*ctx.input::<String>("staged")?).clone();
111
+ ctx.output("list", n)?;
112
+ ctx.output("slot", "unit".to_string())?;
113
+ shown.notify_one();
114
+ Ok(())
115
+ });
116
+ let apply = if bug {
117
+ step("apply_bug", &["reply", "slot"], &["staged", "clr"], relay("reply", &["staged"], Some("clr")))
118
+ } else {
119
+ Transition::builder("apply")
120
+ .input(one(&p("reply")))
121
+ .input(one(&p("box")))
122
+ .input(one(&p("slot")))
123
+ .match_spec(
124
+ MatchSpec::builder()
125
+ .key(&p("reply"), key)
126
+ .key(&p("box"), key)
127
+ .relay_to(&p("box"), key)
128
+ .relay_to(&p("staged"), key)
129
+ .build(),
130
+ )
131
+ .output(and(vec![out_place(&p("box")), out_place(&p("staged")), out_place(&p("clr"))]))
132
+ .action(relay("reply", &["box", "staged"], Some("clr")))
133
+ .build()
134
+ };
135
+ PetriNet::builder(if bug { "searchAsYouTypeBug" } else { "searchAsYouType" })
136
+ .transitions([
137
+ step("first", &["idle", "typed"], &["armedA"], unit("armedA")),
138
+ step("retire", &["box", "typed"], &["armedB"], unit("armedB")),
139
+ step("sendA", &["armedA"], &["box", "inflightA"], mint("inflightA")),
140
+ step("sendB", &["armedB"], &["box", "inflightB"], mint("inflightB")),
141
+ step("fetchA", &["inflightA"], &["reply"], fetch_a),
142
+ step("fetchB", &["inflightB"], &["reply"], relay("inflightB", &["reply"], None)),
143
+ apply,
144
+ step("clearNone", &["listEmpty", "clr"], &["ready"], unit("ready")),
145
+ step("clear", &["list", "clr"], &["ready"], unit("ready")),
146
+ step("show", &["staged", "ready"], &["list", "slot"], show),
147
+ ])
148
+ .build()
149
+ }
150
+
151
+ fn initial_tokens() -> Marking {
152
+ let mut m = Marking::new();
153
+ for (name, k) in INITIAL {
154
+ for _ in 0..k {
155
+ m.add(&p(name), Token::at("unit".to_string(), 0));
156
+ }
157
+ }
158
+ m
159
+ }
160
+
161
+ fn names(m: &Marking, place: &str) -> Vec<String> {
162
+ m.queue(place)
163
+ .map(|q| q.iter().map(|t| t.downcast::<String>().expect("a String token").value().clone()).collect())
164
+ .unwrap_or_default()
165
+ }
166
+
167
+ #[derive(Debug, Clone, Copy)]
168
+ enum Backend {
169
+ Bitmap,
170
+ Precompiled,
171
+ }
172
+
173
+ async fn run(backend: Backend, net: &PetriNet, scope: Option<&str>) -> Marking {
174
+ let (tx, rx) = tokio::sync::mpsc::unbounded_channel();
175
+ drop(tx);
176
+ match backend {
177
+ Backend::Bitmap => {
178
+ let mut options = ExecutorOptions::default();
179
+ if let Some(scope) = scope {
180
+ options = options.execution_scope(scope);
181
+ }
182
+ let mut ex = BitmapNetExecutor::<NoopEventStore>::new(net, initial_tokens(), options);
183
+ ex.run_async(rx).await.into_owned()
184
+ }
185
+ Backend::Precompiled => {
186
+ let prog = PrecompiledNet::from_compiled(CompiledNet::compile(net));
187
+ let mut builder = PrecompiledNetExecutor::<NoopEventStore>::builder(&prog, initial_tokens());
188
+ if let Some(scope) = scope {
189
+ builder = builder.execution_scope(scope);
190
+ }
191
+ let mut ex = builder.build();
192
+ ex.run_async(rx).await.into_owned()
193
+ }
194
+ }
195
+ }
196
+
197
+ /// [NU-055] AC5: on both executors and in both minting scopes the fixed net rests aligned
198
+ /// and the buggy variant, with the first reply answered last, rests on the old results.
199
+ #[tokio::test]
200
+ async fn nu055_ac5_runs_rest_as_the_verdicts_say_in_every_minting_scope() {
201
+ for backend in [Backend::Bitmap, Backend::Precompiled] {
202
+ for scope in [None, Some(SCOPE)] {
203
+ for bug in [false, true] {
204
+ let at_rest = run(backend, &search_as_you_type(bug), scope).await;
205
+ let what = format!("{backend:?}, scope {scope:?}, bug {bug}");
206
+ let in_box = names(&at_rest, "box");
207
+ let in_list = names(&at_rest, "list");
208
+ assert_eq!(in_box.len(), 1, "{what}: {in_box:?}");
209
+ assert_eq!(in_list.len(), 1, "{what}: {in_list:?}");
210
+ if let Some(scope) = scope {
211
+ assert!(in_box[0].contains(&format!("#{scope}:")), "{what}: {in_box:?}");
212
+ }
213
+ if bug {
214
+ assert_ne!(in_list[0], in_box[0], "{what}");
215
+ } else {
216
+ assert_eq!(in_list[0], in_box[0], "{what}");
217
+ }
218
+ }
219
+ }
220
+ }
221
+ }
222
+
223
+ /// [NU-055] AC5: the verdicts on the executable nets are those of the fixtures.
224
+ #[test]
225
+ fn nu055_ac5_the_verdicts_on_the_executable_nets_match_the_fixtures() {
226
+ for bug in [false, true] {
227
+ let net = search_as_you_type(bug);
228
+ let carriers: &[&str] = if bug {
229
+ &["box", "inflightA", "inflightB", "reply", "staged", "list"]
230
+ } else {
231
+ &["inflightA", "inflightB", "list"]
232
+ };
233
+ let mut m0 = MarkingStateBuilder::new();
234
+ for (name, k) in INITIAL {
235
+ m0 = m0.tokens(name, k);
236
+ }
237
+ let r = SmtVerifier::for_net(&net)
238
+ .initial_marking(m0.build())
239
+ .property(SmtProperty::quiescent_name_aligned(["box", "list"]))
240
+ .mint_transitions(["sendA", "sendB"].map(String::from))
241
+ .carrier_places(carriers.iter().map(|c| c.to_string()))
242
+ .fragment_mode(FragmentMode::Extended)
243
+ .verify();
244
+ assert_eq!(r.route, VerificationRoute::NuScg, "{}", r.report);
245
+ if bug {
246
+ assert!(r.is_violated(), "{}", r.report);
247
+ assert_eq!(r.counterexample_transitions.len(), 12);
248
+ } else {
249
+ assert!(r.is_proven(), "{}", r.report);
250
+ }
251
+ }
252
+ }
@@ -6354,7 +6354,7 @@ textContent??"").replace(/^cluster_/,"");Mn.classList.toggle("is-hidden",!N.has(
6354
6354
  en",!bn.has(v))}if(!Q)for(let Mn of Array.from(P.querySelectorAll("g.node.petri-replica")))Mn.classList.add("is-hidden");let Sn=new Map;for(let Mn of Array.from(P.querySelectorAll("g.node"))){let v=Mn.getAttribute("data-id");v&&Sn.set(v,Mn)}for(let Mn of Array.from(P.querySelectorAll("g.edge"))){let v=Mn.getAttribute("data-src")??"",Vn=Mn.getAttribute("data-dst")??"",te=Sn.get(v)?.classList.contains(
6355
6355
  "is-hidden")??!1,pe=Sn.get(Vn)?.classList.contains("is-hidden")??!1;Mn.classList.toggle("is-hidden",te||pe)}}var Pfe=["--lpv-bg","--lpv-header-bg","--lpv-border","--lpv-text","--lpv-muted","--lpv-cluster-bg","--lpv-cluster-bg-collapsed","--lpv-cluster-stroke-width","--lpv-cluster-stroke-dash","--lpv-cluster-fill-tint","--lpv-dim-opacity","--lpv-active-filter-outline","--lpv-legend-bg","--lpv-chip-bg","--lpv-chip-active-bg","--lpv-sidebar-bg","--lpv-sidebar-border","--lpv-sidebar-text","--lpv-sidebar-mute\
6356
6356
  d","--lpv-sidebar-chip-bg","--lpv-sidebar-chip-hover-bg","--lpv-sidebar-chip-off-opacity","--lpv-shared-glyph-color","--lpv-replica-fill","--lpv-replica-stroke","--lpv-highlight-stroke","--lpv-highlight-glow","--lpv-neighbor-stroke","--lpv-faded-node-opacity","--lpv-faded-edge-opacity","--lpv-faded-cluster-opacity"];var XPe=/^\s*subgraph\s+cluster_[A-Za-z0-9_]+\s*\{\s*$/,KPe=/^\s*\}\s*$/;function Cfe(P){let O=P.split("\n"),N=[],Q=0;for(let bn of O){if(XPe.test(bn)){Q++;continue}if(Q>0){if(KPe.test(bn)){Q--;continue}(bn.includes("[")||bn.includes("->"))&&N.push(_fe(bn));continue}if(bn.includes("->")&&(bn.includes("ltail=")||bn.includes("lhead="))){N.push(_fe(bn));continue}N.push(bn)}return N.join("\n")}function _fe(P){
6357
- return P.replace(/,\s*ltail="cluster_[^"]*"/g,"").replace(/,\s*lhead="cluster_[^"]*"/g,"").replace(/\[\s*ltail="cluster_[^"]*"\s*,\s*/g,"[").replace(/\[\s*lhead="cluster_[^"]*"\s*,\s*/g,"[").replace(/\[\s*ltail="cluster_[^"]*"\s*\]/g,"[]").replace(/\[\s*lhead="cluster_[^"]*"\s*\]/g,"[]")}var Ofe="8.1.0";async function ale(P,O,N={}){let Q=N.previousHandle??null,bn=Q?new Set(Q.collapsedPrefixes):new Set,Sn=Q?.activeFilter??null,Mn=N.subnets??Q?.subnets??"show";Q&&Q.dispose();let v=await Promise.resolve().then(()=>(lle(),fle)),Vn=(N.layout??"elk")==="elk",te=Mn==="hide"?Cfe(P):P,pe={clusterLayout:N.clusterLayout,leafPacking:N.leafPacking},Fe=Vn?await v.renderDotToSvgWithElkLayout(te,pe):await v.renderDotToSvg(
6357
+ return P.replace(/,\s*ltail="cluster_[^"]*"/g,"").replace(/,\s*lhead="cluster_[^"]*"/g,"").replace(/\[\s*ltail="cluster_[^"]*"\s*,\s*/g,"[").replace(/\[\s*lhead="cluster_[^"]*"\s*,\s*/g,"[").replace(/\[\s*ltail="cluster_[^"]*"\s*\]/g,"[]").replace(/\[\s*lhead="cluster_[^"]*"\s*\]/g,"[]")}var Ofe="9.0.0";async function ale(P,O,N={}){let Q=N.previousHandle??null,bn=Q?new Set(Q.collapsedPrefixes):new Set,Sn=Q?.activeFilter??null,Mn=N.subnets??Q?.subnets??"show";Q&&Q.dispose();let v=await Promise.resolve().then(()=>(lle(),fle)),Vn=(N.layout??"elk")==="elk",te=Mn==="hide"?Cfe(P):P,pe={clusterLayout:N.clusterLayout,leafPacking:N.leafPacking},Fe=Vn?await v.renderDotToSvgWithElkLayout(te,pe):await v.renderDotToSvg(
6358
6358
  te);O.innerHTML="",O.appendChild(Fe),O.classList.add("libpetri-viewer");let ft=mfe(Fe,N.panzoom),gt=X0n(Fe);Ffe(gt);let $t=N.layout??"elk";$t==="elk"&&(xfe(Fe),vX(Fe));let $e=new Set,dt=null,Ie=null,Ct=!1,We=null,Pn=null,Bt=!0;function It(){if(!N.chrome||We&&We.parentNode===O)return;We=document.createElement("div"),We.className="libpetri-viewer-chrome",We.style.position="absolute",We.style.inset="\
6359
6359
  0",We.style.pointerEvents="none";let Rt=document.createElement("div");Rt.className="diagram-controls",Rt.style.pointerEvents="auto";let or=document.createElement("button");or.type="button",or.className="diagram-btn btn-reset",or.title="Reset view",or.textContent="Reset",or.addEventListener("click",()=>Ir.fit());let ui=document.createElement("button");ui.type="button",ui.className="diagram-btn btn-\
6360
6360
  fullscreen",ui.title="Toggle fullscreen",ui.textContent="Fullscreen",ui.addEventListener("click",()=>Yr(O,ui));let wr=document.createElement("button");wr.type="button",wr.className="diagram-btn btn-subnets",wr.title=Mn==="show"?"Hide subnet groupings":"Show subnet groupings",wr.textContent=Mn==="show"?"Flat view":"Subnets view",wr.addEventListener("click",()=>{Ir.toggleSubnets()}),Rt.appendChild(wr),
@@ -2,7 +2,7 @@
2
2
  name = "libpetri-py"
3
3
  # Decoupled from the Rust workspace version: the Python wheel releases on its
4
4
  # own track (PyPI), independent of the crates.io Rust crate versions.
5
- version = "7.2.0"
5
+ version = "7.3.0"
6
6
  edition.workspace = true
7
7
  rust-version.workspace = true
8
8
  license.workspace = true
@@ -16,7 +16,7 @@ name = "_libpetri"
16
16
  crate-type = ["cdylib"]
17
17
 
18
18
  [dependencies]
19
- libpetri = { path = "../libpetri", version = "10.1.0", default-features = false }
19
+ libpetri = { path = "../libpetri", version = "11.0.0", default-features = false }
20
20
  pyo3 = { workspace = true }
21
21
  pyo3-async-runtimes = { workspace = true }
22
22
  serde_json = "1"