Guest User

Untitled

a guest
Dec 18th, 2014
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
OCaml 2.60 KB | None | 0 0
  1. File "src/Theory/FNITheory.ml", line 3, characters 103-597:
  2. Error: Signature mismatch:
  3.        ...
  4.        In module T.Var:
  5.        Type declarations do not match:
  6.          type t = TheoryUtils.Make_Term(Var)(TT).Var.t
  7.        is not included in
  8.          type t = Var.t
  9.  
  10.  
  11.  
  12.  
  13.  
  14. (* TheoryInterface.mli *)
  15.  
  16. open Types
  17.  
  18. (** Theory interface *)
  19.  
  20. module type THEORY_TERM = Hashtbl.HashedType
  21.  
  22. module type TERM = sig
  23.   module Var : Variable.S
  24.   module TT : THEORY_TERM
  25.   include Hashtbl.HashedType with type t = (Var.t, TT.t) term
  26. end
  27.  
  28. module type THEORY_ATOM = Hashtbl.HashedType
  29.  
  30. module type ATOM = sig
  31.   module T : TERM
  32.   module TA : THEORY_ATOM
  33.   include Variable.S with type t = (T.t, TA.t) atom
  34. end
  35.  
  36. module type THEORY = sig
  37.   module Var : Variable.S
  38.   module TT : THEORY_TERM
  39.   module T : TERM with module Var = Var and module TT = TT
  40.   module TA : THEORY_ATOM
  41.   module A : ATOM with module T = T and module TA = TA
  42.   module Val : Valuation.S with module A = A
  43.   val sat : Val.t -> bool
  44. end
  45.  
  46. module type S = THEORY
  47.  
  48.  
  49.  
  50.  
  51.  
  52. (* TheoryUtils.ml *)
  53.  
  54. open Types
  55.  
  56. module Make_Term (Var : Variable.S) (TT : TheoryInterface.THEORY_TERM) : TheoryInterface.TERM = struct
  57.   module Var = Var
  58.   module TT = TT
  59.   type t = (Var.t, TT.t) term
  60.   let equal x y =
  61.     match x, y with
  62.     | Variable _, Term _ -> false
  63.     | Term _, Variable _ -> false
  64.     | Variable v1, Variable v2 -> Var.equal v1 v2
  65.     | Term t1, Term t2 -> TT.equal t1 t2
  66.   let hash = Hashtbl.hash
  67. end
  68.  
  69. module Make_Atom (T : TheoryInterface.TERM) (TA : TheoryInterface.THEORY_ATOM) : TheoryInterface.ATOM = struct
  70.   module T = T
  71.   module TA = TA
  72.   type t = (T.t, TA.t) atom
  73.   let to_string _ = failwith "TODO"
  74.   let equal x y = true(*
  75.     match x, y with
  76.     | Equal _, Atom _ -> false
  77.     | Atom _, Equal _ -> false
  78.     | Equal (x1, y2), Equal (x2, y2) -> T.equal x1 x2 && T.equal y1 y2
  79.     | Atom a1, Atom a2 -> TA.equal a1 a2*)
  80.   let hash = Hashtbl.hash
  81. end
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89. (* FNITheory.ml *)
  90.  
  91. open TheoryUtils
  92.  
  93. module Make (Var : Variable.S) (ValFunct : functor(X:Variable.S) -> Valuation.S) : TheoryInterface.S = struct
  94.   (** Variable *)
  95.   module Var = Var
  96.  
  97.   (** Theory term *)
  98.   module TT = struct
  99.     type t = unit (* TODO *)
  100.     let equal = (=)
  101.     let hash = Hashtbl.hash
  102.   end
  103.  
  104.   (** Term *)
  105.   module T = Make_Term (Var) (TT)
  106.  
  107.   (** Theory atom *)
  108.   module TA = struct
  109.     type t = unit (* TODO *)
  110.     let equal = (=)
  111.     let hash = Hashtbl.hash
  112.   end
  113.  
  114.   (** Atom *)
  115.   module A = Make_Atom (T) (TA)
  116.  
  117.   (** Valuation *)
  118.   module Val = ValFunct (A)
  119.  
  120.  
  121.   let sat _ = failwith "TODO" (* TODO clement *)
  122. end
Advertisement
Add Comment
Please, Sign In to add comment