Hacked together graph rewriter

This commit is contained in:
Joeri Exelmans 2024-09-12 11:04:32 +02:00
parent f12fd8bd6c
commit 89b7c83440
8 changed files with 261 additions and 32 deletions

View file

@ -227,6 +227,7 @@ class RAMCompare:
# Memoizing the result of comparison gives a huge performance boost!
# Especially `is_subtype_of` is very slow, and will be performed many times over on the same pair of nodes during the matching process.
# Assuming the model is not altered *during* matching, this is safe.
@functools.cache
def __call__(self, g_vtx, h_vtx):
# First check if the types match (if we have type-information)