From 58fed211f8ed0b3e5996cff2b2303a0917bb1d78 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kim=20Nguy=E1=BB=85n?= Date: Mon, 4 Feb 2013 16:04:55 +0100 Subject: [PATCH] Finish renaming Move constructor to Atom. --- src/formula.ml | 12 ++++++------ src/formula.mli | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/formula.ml b/src/formula.ml index f4022f9..7bd8ca6 100644 --- a/src/formula.ml +++ b/src/formula.ml @@ -14,7 +14,7 @@ (***********************************************************************) (* - Time-stamp: + Time-stamp: *) INCLUDE "utils.ml" @@ -48,7 +48,7 @@ module rec Node : Hcons.S | a,b when a == b -> true | Or(xf1, xf2), Or(yf1, yf2) | And(xf1, xf2), And(yf1,yf2) -> (xf1 == yf1) && (xf2 == yf2) - | Move(d1, p1, s1), Move(d2 ,p2 ,s2) -> d1 == d2 && p1 == p2 && s1 == s2 + | Atom(d1, p1, s1), Atom(d2 ,p2 ,s2) -> d1 == d2 && p1 == p2 && s1 == s2 | _ -> false let hash f = @@ -60,7 +60,7 @@ module rec Node : Hcons.S | And (f1, f2) -> HASHINT3(PRIME3, Uid.to_int f1.Node.id, Uid.to_int f2.Node.id) - | Move(d, p, s) -> HASHINT4(PRIME5, hash_const_variant d,vb p,s) + | Atom(d, p, s) -> HASHINT4(PRIME5, hash_const_variant d,vb p,s) end type t = Node.t @@ -73,7 +73,7 @@ let compare f1 f2 = compare f1.Node.id f2.Node.id let prio f = match expr f with | True | False -> 10 - | Move _ -> 8 + | Atom _ -> 8 | And _ -> 6 | Or _ -> 1 @@ -90,7 +90,7 @@ let rec print ?(parent=false) ppf f = (print ppf f1); fprintf ppf " %s " Pretty.vee; (print ppf f2); - | Move(dir, b, s) -> + | Atom(dir, b, s) -> let _ = flush_str_formatter() in let fmt = str_formatter in let a_str, d_str = @@ -125,7 +125,7 @@ let cons pos neg = let true_,false_ = cons True False let atom_ d p s = - fst (cons (Move(d,p,s)) (Move(d,not p,s))) + fst (cons (Atom(d,p,s)) (Atom(d,not p,s))) let not_ f = f.Node.node.neg diff --git a/src/formula.mli b/src/formula.mli index 867d616..9a0b066 100644 --- a/src/formula.mli +++ b/src/formula.mli @@ -14,7 +14,7 @@ (***********************************************************************) (* - Time-stamp: + Time-stamp: *) (** Implementation of hashconsed Boolean formulae *) @@ -28,7 +28,7 @@ type 'formula expr = | True | Or of 'formula * 'formula | And of 'formula * 'formula - | Move of move * bool * State.t + | Atom of move * bool * State.t (** View of the internal representation of a formula, used for pattern matching *) -- 2.17.1