Abstract away Object Diagram pattern matching in a function that does all the magic

This commit is contained in:
Joeri Exelmans 2024-09-13 12:32:12 +02:00
parent 13f19cdec6
commit f45872d3f7
3 changed files with 89 additions and 101 deletions

View file

@ -25,7 +25,7 @@ def process_rule(state, lhs: UUID, rhs: UUID):
# Rewrite is performed in-place
# Also updates the mapping in-place, to become RHS -> host
def rewrite(state, lhs: UUID, rhs: UUID, rhs_mm: UUID, match_mapping: dict, m_to_transform: UUID, mm: UUID) -> dict:
def rewrite(state, lhs: UUID, rhs: UUID, rhs_mm: UUID, match_mapping: dict, m_to_transform: UUID, mm: UUID):
bottom = Bottom(state)
scd_metamodel_id = state.read_dict(state.read_root(), "SCD")