diff --git a/framework/conformance.py b/framework/conformance.py index 9a97ca4..ec8ae50 100644 --- a/framework/conformance.py +++ b/framework/conformance.py @@ -445,10 +445,12 @@ class Conformance: candidate_element, = self.bottom.read_outgoing_elements(self.type_model, candidate_name) candidate_source = self.type_model_names[self.bottom.read_edge_source(candidate_element)] if candidate_source not in source_candidates: - remove.add(candidate_name) + if len(source_candidates.intersection(set(self.sub_types[candidate_source]))) == 0: + remove.add(candidate_name) candidate_target = self.type_model_names[self.bottom.read_edge_target(candidate_element)] if candidate_target not in target_candidates: - remove.add(candidate_name) + if len(target_candidates.intersection(set(self.sub_types[candidate_target]))) == 0: + remove.add(candidate_name) self.candidates[m_name] = self.candidates[m_name].difference(remove) def build_morphisms(self): diff --git a/framework/interactive_prompt.py b/framework/interactive_prompt.py index ff38c8c..f0e9645 100644 --- a/framework/interactive_prompt.py +++ b/framework/interactive_prompt.py @@ -70,7 +70,7 @@ def main(): 'filter': lambda x: False if x.lower() == 'false' else x }) args = prompt(args_questions) - args = {k: types[k](v) for k, v in args.items()} + args = {k: types[k](v) if len(v) > 0 else None for k, v in args.items()} try: output = method(**args) if output is not None: