equal
deleted
inserted
replaced
193 principal = None |
193 principal = None |
194 # sort for test predictability |
194 # sort for test predictability |
195 for rel in sorted(relations, key=lambda x: (x.children[0].name, x.r_type)): |
195 for rel in sorted(relations, key=lambda x: (x.children[0].name, x.r_type)): |
196 # only equality relation with a variable as rhs may be principal |
196 # only equality relation with a variable as rhs may be principal |
197 if rel.operator() not in ('=', 'IS') \ |
197 if rel.operator() not in ('=', 'IS') \ |
198 or not isinstance(rel.children[1].children[0], VariableRef): |
198 or not isinstance(rel.children[1].children[0], VariableRef) or rel.neged(strict=True): |
199 continue |
199 continue |
200 if rel.scope is rel.stmt: |
200 if rel.scope is rel.stmt: |
201 return rel |
201 return rel |
202 principal = rel |
202 principal = rel |
203 if principal is None: |
203 if principal is None: |