Commit e3fd6338 authored by Pietro Abate's avatar Pietro Abate

Minor code cleanup

parent 95981ec8
......@@ -276,7 +276,6 @@ let mk_e ll =
) ll
let tallying_tests = [
(*
[("((Int | Bool) -> Int)", "(`$A -> `$B)")], mk_e [
[(V "A","Empty")];
[(V "A","Int | Bool");(V "B","Int")]
......@@ -299,16 +298,16 @@ let tallying_tests = [
[("((Int,Int) , (Int | Bool))","(`$A,Int) | ((`$B,Int),Bool)")], mk_e [
[(V "A", "(Int,Int)"); (V "B","Int")]
];
*)
[("((`$A , Int) | (`$B , Bool))","(Int , (Int | Bool))")], mk_e [
[(V "A","Int");(V "B","Int")]
];
(*
[("[] -> []","Int -> `$A")], [];
[("Bool -> Bool","Int -> `$A")], [];
[("((`$A , Int) & (`$B , Bool))","(Int , (Int & Bool))")], [[]];
*)
(* map even *)
[("(`$A -> `$B) -> [`$A] -> [`$B]","(Int -> Bool) & ((`$A \\ Int) -> (`$A \\ Int))")], [[]];
]
let test_tallying =
......
......@@ -166,12 +166,6 @@ struct
let h = X.hash x + 17 in (* partial evaluation of compute_hash... *)
`Split (h, x,`True,`False,`False)
(*
let neg_atom x =
let h = X.hash x + 16637 in (* partial evaluation of compute_hash... *)
`Split (h, x,`False,`False,`True)
*)
let vars v =
let a = atom (`Atm T.full) in
let h = compute_hash v a `False `False in
......@@ -207,7 +201,7 @@ struct
| `False -> ()
| _ -> b (); Format.fprintf ppf "@[~%a@] & @[(%a)@]" f x (print f) n)
let pp_print = print X.dump
let pp_print = print X.dump
let print ?(f=X.dump) = function
| `True -> assert false (* [] a bdd cannot be of this type *)
......@@ -327,23 +321,10 @@ struct
| `Split (_,`Atm x1, `True,`False,`False), `Split (_,`Atm x2, `True,`False,`False) ->
split (`Atm (T.cup x1 x2)) `True `False `False
| `Split (_,`Atm x1, `False,`False,`True), `Split (_,`Atm x2, `False,`False,`True) ->
assert false
(*
split (`Atm (T.cup (T.diff T.full x1) (T.diff T.full x2))) `True `False `False
*)
| `Split (_,`Atm x1, `True,`False,`False), `Split (_,`Atm x2, `False,`False,`True) ->
assert false
(*
split (`Atm (T.cup x1 (T.diff T.full x2))) `True `False `False
*)
| `Split (_,`Atm x1, `False,`False,`True), `Split (_,`Atm x2, `False,`False,`True)
| `Split (_,`Atm x1, `True,`False,`False), `Split (_,`Atm x2, `False,`False,`True)
| `Split (_,`Atm x1, `False,`False,`True), `Split (_,`Atm x2, `True,`False,`False) ->
assert false
(*
split (`Atm (T.cup (T.diff T.full x1) x2)) `True `False `False
*)
| `Split (_,x1, p1,i1,n1), `Split (_,x2, p2,i2,n2) ->
let c = X.compare x1 x2 in
......
......@@ -66,7 +66,6 @@ end
let mk ?fresh ?variance id =
`Var (make_id ?fresh ?variance id)
let fresh : ?pre: string -> ?variance:[ `None| `Both | `ContraVariant | `Covariant ] -> unit -> [> var ] =
let counter = ref 0 in
fun ?(pre="_fresh_") -> fun ?variance -> fun _ ->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment