From 558772fbe4579c3c5d82cb88535d347c2cdf290b Mon Sep 17 00:00:00 2001 From: Joeri Exelmans Date: Wed, 23 Jul 2025 13:57:25 +0200 Subject: [PATCH] commit some long outstanding changes --- bootstrap/scd.py | 3 +-- transformation/rewriter.py | 7 ++++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/bootstrap/scd.py b/bootstrap/scd.py index facf176..3a3002d 100644 --- a/bootstrap/scd.py +++ b/bootstrap/scd.py @@ -78,8 +78,7 @@ def bootstrap_scd(state: State) -> UUID: add_edge_element("gc_inh_element", glob_constr_node, element_node) # # Attribute inherits from Element add_edge_element("attr_inh_element", attr_node, element_node) - # # Association inherits from Element - # add_edge_element("assoc_inh_element", assoc_edge, element_node) + # # Association inherits from Class add_edge_element("assoc_inh_element", assoc_edge, class_node) # # AttributeLink inherits from Element add_edge_element("attr_link_inh_element", attr_link_edge, element_node) diff --git a/transformation/rewriter.py b/transformation/rewriter.py index 100073f..51b8bca 100644 --- a/transformation/rewriter.py +++ b/transformation/rewriter.py @@ -223,7 +223,12 @@ def rewrite(state, result = exec_then_eval(python_expr, _globals=eval_globals, _locals={'this': host_obj}) # 'this' can be used to read the previous value of the slot - host_odapi.overwrite_primitive_value(host_obj_name, result, is_code=False) + # print("EVAL", common_name, python_expr, "RESULT", result, host_obj_name) + try: + host_odapi.overwrite_primitive_value(host_obj_name, result, is_code=False) + except Exception as e: + e.add_note(f"while evaluating attribute {common_name}") + raise else: msg = f"Don't know what to do with element '{common_name}' -> '{host_obj_name}:{host_type}')" # print(msg)