[pulse] Fixed a bug in AbductiveDomain.leq operator. (#1424)

Summary:
the mapping for computing 'leq' relation in isomorphic graphs was sometimes mixed with opposite mappings due to typos in the code.

Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for how to set up your development environment and run tests.

Pull Request resolved: https://github.com/facebook/infer/pull/1424

Reviewed By: ngorogiannis

Differential Revision: D28118324

Pulled By: jvillard

fbshipit-source-id: 56e813bd1
master
Yoonseok Ko 4 years ago committed by Facebook GitHub Bot
parent c44fba8944
commit 713199ac2a

@ -112,8 +112,8 @@ let leq ~lhs ~rhs =
&& &&
match match
BaseDomain.isograph_map BaseDomain.empty_mapping BaseDomain.isograph_map BaseDomain.empty_mapping
~lhs:(rhs.pre :> BaseDomain.t) ~lhs:(lhs.pre :> BaseDomain.t)
~rhs:(lhs.pre :> BaseDomain.t) ~rhs:(rhs.pre :> BaseDomain.t)
with with
| NotIsomorphic -> | NotIsomorphic ->
false false

@ -125,7 +125,7 @@ module GraphComparison = struct
IsomorphicUpTo mapping IsomorphicUpTo mapping
| Some _, None | None, Some _ -> | Some _, None | None, Some _ ->
NotIsomorphic NotIsomorphic
| Some (edges_rhs, attrs_rhs), Some (edges_lhs, attrs_lhs) -> | Some (edges_lhs, attrs_lhs), Some (edges_rhs, attrs_rhs) ->
(* continue the comparison recursively on all edges and attributes *) (* continue the comparison recursively on all edges and attributes *)
if Attributes.equal attrs_rhs attrs_lhs then if Attributes.equal attrs_rhs attrs_lhs then
let bindings_lhs = Memory.Edges.bindings edges_lhs in let bindings_lhs = Memory.Edges.bindings edges_lhs in

Loading…
Cancel
Save