disambiguateChoices.cmi: disambiguateTypes.cmi
-cicTextualParser2Pp.cmi: cicTextualParser2Ast.cmi
-cicTextualParser2.cmi: cicTextualParser2Ast.cmi disambiguateTypes.cmi
-disambiguate.cmi: cicTextualParser2Ast.cmi disambiguateTypes.cmi
+cicTextualParser2.cmi: disambiguateTypes.cmi
+disambiguate.cmi: disambiguateTypes.cmi
disambiguateTypes.cmo: disambiguateTypes.cmi
disambiguateTypes.cmx: disambiguateTypes.cmi
disambiguateChoices.cmo: disambiguateTypes.cmi disambiguateChoices.cmi
disambiguateChoices.cmx: disambiguateTypes.cmx disambiguateChoices.cmi
-cicTextualParser2Pp.cmo: cicTextualParser2Ast.cmi cicTextualParser2Pp.cmi
-cicTextualParser2Pp.cmx: cicTextualParser2Ast.cmi cicTextualParser2Pp.cmi
macro.cmo: macro.cmi
macro.cmx: macro.cmi
cicTextualLexer2.cmo: macro.cmi cicTextualLexer2.cmi
cicTextualLexer2.cmx: macro.cmx cicTextualLexer2.cmi
-cicTextualParser2.cmo: cicTextualLexer2.cmi cicTextualParser2Ast.cmi \
- disambiguateChoices.cmi disambiguateTypes.cmi cicTextualParser2.cmi
-cicTextualParser2.cmx: cicTextualLexer2.cmx cicTextualParser2Ast.cmi \
- disambiguateChoices.cmx disambiguateTypes.cmx cicTextualParser2.cmi
-disambiguate.cmo: cicTextualParser2.cmi cicTextualParser2Ast.cmi \
- disambiguateChoices.cmi disambiguateTypes.cmi disambiguate.cmi
-disambiguate.cmx: cicTextualParser2.cmx cicTextualParser2Ast.cmi \
- disambiguateChoices.cmx disambiguateTypes.cmx disambiguate.cmi
-logic_notation.cmo: cicTextualParser2.cmi cicTextualParser2Ast.cmi \
- disambiguateChoices.cmi
-logic_notation.cmx: cicTextualParser2.cmx cicTextualParser2Ast.cmi \
- disambiguateChoices.cmx
-arit_notation.cmo: cicTextualParser2.cmi cicTextualParser2Ast.cmi \
- disambiguateChoices.cmi
-arit_notation.cmx: cicTextualParser2.cmx cicTextualParser2Ast.cmi \
- disambiguateChoices.cmx
+cicTextualParser2.cmo: cicTextualLexer2.cmi disambiguateChoices.cmi \
+ disambiguateTypes.cmi cicTextualParser2.cmi
+cicTextualParser2.cmx: cicTextualLexer2.cmx disambiguateChoices.cmx \
+ disambiguateTypes.cmx cicTextualParser2.cmi
+disambiguate.cmo: cicTextualParser2.cmi disambiguateChoices.cmi \
+ disambiguateTypes.cmi disambiguate.cmi
+disambiguate.cmx: cicTextualParser2.cmx disambiguateChoices.cmx \
+ disambiguateTypes.cmx disambiguate.cmi
+logic_notation.cmo: cicTextualParser2.cmi disambiguateChoices.cmi
+logic_notation.cmx: cicTextualParser2.cmx disambiguateChoices.cmx
+arit_notation.cmo: cicTextualParser2.cmi disambiguateChoices.cmi
+arit_notation.cmx: cicTextualParser2.cmx disambiguateChoices.cmx
tex_notation.cmo: cicTextualParser2.cmi
tex_notation.cmx: cicTextualParser2.cmx
PACKAGE = cic_textual_parser2
-REQUIRES = ulex pxp helm-tactics helm-logger helm-cic_unification camlp4.gramlib
+REQUIRES = \
+ helm-tactics helm-logger helm-cic_unification helm-cic_transformations \
+ ulex pxp camlp4.gramlib
NOTATIONS = logic arit tex
INTERFACE_FILES = \
disambiguateTypes.mli \
disambiguateChoices.mli \
- cicTextualParser2Pp.mli \
macro.mli \
cicTextualLexer2.mli \
cicTextualParser2.mli \
* http://helm.cs.unibo.it/
*)
-open CicTextualParser2Ast
open CicTextualParser2
-(*
-let i = ref max_int
-let get_i () = decr i; !i
-*)
-
EXTEND
term: LEVEL "add"
[
[ t1 = term; SYMBOL "+"; t2 = term ->
- return_term loc (Appl_symbol ("plus", 0, [t1; t2]))
+ return_term loc (CicAst.Appl [CicAst.Symbol ("plus", 0); t1; t2])
| t1 = term; SYMBOL "-"; t2 = term ->
- return_term loc (Appl_symbol ("minus", 0, [t1; t2]))
+ return_term loc (CicAst.Appl [CicAst.Symbol ("minus", 0); t1; t2])
]
];
term: LEVEL "mult"
[
[ t1 = term; SYMBOL "*"; t2 = term ->
- return_term loc (Appl_symbol ("times", 0, [t1; t2]))
+ return_term loc (CicAst.Appl [CicAst.Symbol ("times", 0); t1; t2])
| t1 = term; SYMBOL "/"; t2 = term ->
- return_term loc (Appl_symbol ("div", 0, [t1; t2]))
+ return_term loc (CicAst.Appl [CicAst.Symbol ("div", 0); t1; t2])
]
];
term: LEVEL "inv"
[
[ SYMBOL "-"; t = term ->
- return_term loc (Appl_symbol ("uminus", 0, [t]))
+ return_term loc (CicAst.Appl [CicAst.Symbol ("uminus", 0); t])
]
];
END
let compare = Pervasives.compare
end
-module Domain = Set.Make (OrderedDomain)
+(* module Domain = Set.Make (OrderedDomain) *)
module Environment = Map.Make (OrderedDomain)
type codomain_item =
| Symbol (s, i) -> Printf.sprintf "SYMBOL(%s,%d)" s i
| Num i -> Printf.sprintf "NUM(instance %d)" i
+let string_of_domain dom =
+ String.concat "; " (List.map string_of_domain_item dom)
+(*
let string_of_domain dom =
let buf = Buffer.create 1024 in
Domain.iter
(fun item -> Buffer.add_string buf (string_of_domain_item item ^ "; "))
dom;
Buffer.contents buf
+*)
| Symbol of string * int (* literal, instance num *)
| Num of int (* instance num *)
-module Domain: Set.S with type elt = domain_item
+(* module Domain: Set.S with type elt = domain_item *)
module Environment: Map.S with type key = domain_item
type codomain_item =
end
val string_of_domain_item: domain_item -> string
-val string_of_domain: Domain.t -> string
+val string_of_domain: domain_item list -> string
* http://helm.cs.unibo.it/
*)
-open CicTextualParser2Ast
open CicTextualParser2
EXTEND
term: LEVEL "add"
[
[ t1 = term; SYMBOL <:unicode<lor>> (* ∨ *); t2 = term ->
- return_term loc (Appl_symbol ("or", 0, [t1; t2]))
+ return_term loc (CicAst.Appl [CicAst.Symbol ("or", 0); t1; t2])
]
];
term: LEVEL "mult"
[
[ t1 = term; SYMBOL <:unicode<land>> (* ∧ *); t2 = term ->
- return_term loc (Appl_symbol ("and", 0, [t1; t2]))
+ return_term loc (CicAst.Appl [CicAst.Symbol ("and", 0); t1; t2])
]
];
term: LEVEL "inv"
[
[ SYMBOL <:unicode<lnot>> (* ¬ *); t = term ->
- return_term loc (Appl_symbol ("not", 0, [t])) ]
+ return_term loc (CicAst.Appl [CicAst.Symbol ("not", 0); t])
+ ]
];
END