Fix bug in conformance checker?
This commit is contained in:
parent
07c695f9e2
commit
a7148d455b
1 changed files with 4 additions and 1 deletions
|
|
@ -465,6 +465,7 @@ class Conformance:
|
||||||
tm_element, = self.bottom.read_outgoing_elements(self.type_model, type_name)
|
tm_element, = self.bottom.read_outgoing_elements(self.type_model, type_name)
|
||||||
type_is_edge = self.bottom.read_edge_source(tm_element) is not None
|
type_is_edge = self.bottom.read_edge_source(tm_element) is not None
|
||||||
if is_edge == type_is_edge:
|
if is_edge == type_is_edge:
|
||||||
|
mismatch = False
|
||||||
matched = 0
|
matched = 0
|
||||||
for name, optional, attr_type in structure:
|
for name, optional, attr_type in structure:
|
||||||
try:
|
try:
|
||||||
|
|
@ -493,8 +494,10 @@ class Conformance:
|
||||||
if optional:
|
if optional:
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
|
mismatch = True
|
||||||
break
|
break
|
||||||
if matched == len(structure):
|
# if matched == len(structure):
|
||||||
|
if not mismatch:
|
||||||
self.candidates.setdefault(m_name, set()).add(type_name)
|
self.candidates.setdefault(m_name, set()).add(type_name)
|
||||||
# filter out candidates for links based on source and target types
|
# filter out candidates for links based on source and target types
|
||||||
for m_element, m_name in self.model_names.items():
|
for m_element, m_name in self.model_names.items():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue