petri net formalism: add inhibitor arc

This commit is contained in:
Joeri Exelmans 2024-12-03 23:25:10 +01:00
parent da4f1718ce
commit 6571d8556c
6 changed files with 33 additions and 13 deletions

View file

@ -61,7 +61,8 @@ def rewrite(state, lhs_m: UUID, rhs_m: UUID, pattern_mm: UUID, lhs_match: dict,
if "GlobalCondition" not in k and not k.endswith("_condition") and not k.endswith(".condition")
and (not k.endswith("_name") or k.endswith("RAM_name")) and (not k.endswith(".name")))
print('filtered out:', set(k for k in bottom.read_keys(rhs_m) if k.endswith(".name") or k.endswith("_name")))
# See which keys were ignored by the rewriter:
# print('filtered out:', set(k for k in bottom.read_keys(rhs_m) if k.endswith(".name") or k.endswith("_name")))
common = lhs_keys & rhs_keys
to_delete = lhs_keys - common