nice visualization

This commit is contained in:
Joeri Exelmans 2025-07-23 13:54:32 +02:00
parent fecce51828
commit e046f2f972
5 changed files with 35 additions and 9 deletions

View file

@ -39,8 +39,11 @@ KINDS = ["nac", "lhs", "rhs"]
# Phony name generator that raises an error if you try to use it :)
class LHSNameGenerator:
def __call__(self, type_name):
if type_name == "GlobalCondition":
return parser.DefaultNameGenerator()(type_name)
raise Exception(f"Error: Object or link of type '{type_name}' does not have a name.\nAnonymous objects/links are not allowed in the LHS of a rule, because they can have unintended consequences. Please give all of the elements in the LHS explicit names.")
# load model transformation rules
def load_rules(state, get_filename, rt_mm_ramified, rule_names, check_conformance=True):
rules = {}