[pulse] use only known facts for variable substitutions

Summary:
Using more than the "known" part of the arithmetic could accidentally
leak "pruned" information into certain facts.

I noticed this when adding more term equality reasoning to pulse in
another diff. At the moment this has little effect but is still more
correct conceptually.

Reviewed By: ezgicicek

Differential Revision: D26450333

fbshipit-source-id: eb31da344
master
Jules Villard 4 years ago committed by Facebook GitHub Bot
parent a1db290c2e
commit e7124511dc

@ -1466,7 +1466,7 @@ end = struct
let eliminate_vars ~keep phi = let eliminate_vars ~keep phi =
let subst = VarUF.reorient ~keep phi.both.var_eqs in let subst = VarUF.reorient ~keep phi.known.var_eqs in
try Sat (subst_var subst phi) with Contradiction -> Unsat try Sat (subst_var subst phi) with Contradiction -> Unsat
end end
@ -1609,4 +1609,4 @@ let has_no_assumptions phi =
Atom.Set.for_all (fun atom -> Formula.Normalizer.implies_atom phi.known atom) phi.pruned Atom.Set.for_all (fun atom -> Formula.Normalizer.implies_atom phi.known atom) phi.pruned
let get_var_repr phi v = (Formula.Normalizer.get_repr phi.both v :> Var.t) let get_var_repr phi v = (Formula.Normalizer.get_repr phi.known v :> Var.t)

Loading…
Cancel
Save