Python: Remove omittable exists variables

This commit is contained in:
Tony Torralba
2022-12-21 16:34:22 +01:00
parent 3b6dae41cd
commit d87c8c75d6
30 changed files with 190 additions and 225 deletions

View File

@@ -231,8 +231,8 @@ predicate points_to_consistency(string clsname, string problem, string what) {
what = obj.toString()
)
or
exists(ControlFlowNode use, ControlFlowNode inter, Object obj |
intermediate_origins(use, inter, obj) and
exists(ControlFlowNode use, ControlFlowNode inter |
intermediate_origins(use, inter, _) and
clsname = use.getAQlClass() and
problem = "has intermediate origin " + inter and
what = use.toString()

View File

@@ -12,5 +12,5 @@ import python
from ControlFlowNode f, Object o
where
f.refersTo(o) and
not exists(ClassObject c | f.refersTo(o, c, _))
not f.refersTo(o, _, _)
select o, "Type inference fails for 'object'."