X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fhconsed_run.ml;fp=src%2Fhconsed_run.ml;h=22140280ac0151aeb54e1a5c0cd129f854491d3f;hb=05eaaee159125065661a69fbe3d11f54a3534f3f;hp=0000000000000000000000000000000000000000;hpb=71804e81fe8aaa4c95073663b1cabdb5ba1dc87a;p=tatoo.git diff --git a/src/hconsed_run.ml b/src/hconsed_run.ml new file mode 100644 index 0000000..2214028 --- /dev/null +++ b/src/hconsed_run.ml @@ -0,0 +1,51 @@ +(***********************************************************************) +(* *) +(* Lucca Hirschi, LRI UMR8623 *) +(* Université Paris-Sud & CNRS *) +(* *) +(* Copyright 2010-2012 Université Paris-Sud and Centre National de la *) +(* Recherche Scientifique. All rights reserved. This file is *) +(* distributed under the terms of the GNU Lesser General Public *) +(* License, with the special exception on linking described in file *) +(* ../LICENSE. *) +(* *) +(***********************************************************************) + +INCLUDE "utils.ml" + + +(* Hash Consign modules *) + +module type Oracle_fixpoint = +sig + type t = StateSet.t*StateSet.t*StateSet.t*((StateSet.elt*Formula.t) list)*QName.t + val equal : t -> t -> bool + val hash : t -> int +end + +type dStateS = StateSet.t*StateSet.t +module type Run_fixpoint = +sig + type t = dStateS*dStateS*dStateS*(State.t*Formula.t) list*QName.t + val equal : t -> t -> bool + val hash : t -> int +end + +module Oracle_fixpoint : Oracle_fixpoint = struct + type t = + StateSet.t*StateSet.t*StateSet.t*((StateSet.elt*Formula.t) list)*QName.t + let equal (s,l,r,list,t) (s',l',r',list',t') = StateSet.equal s s' && + StateSet.equal l l' && StateSet.equal r r' && QName.equal t t' + let hash (s,l,r,list,t) = + HASHINT4(StateSet.hash s, StateSet.hash l, StateSet.hash r, QName.hash t) +end + +let dequal (x,y) (x',y') = StateSet.equal x x' && StateSet.equal y y' +let dhash (x,y) = HASHINT2(StateSet.hash x, StateSet.hash y) +module Run_fixpoint : Run_fixpoint = struct + type t = dStateS*dStateS*dStateS*(State.t*Formula.t) list*QName.t + let equal (s,l,r,list,t) (s',l',r',list',t') = dequal s s' && + dequal l l' && dequal r r' && QName.equal t t' + let hash (s,l,r,list,t) = + HASHINT4(dhash s, dhash l, dhash r, QName.hash t) +end