- matitacLib: we peform a garbage collection after compiling every file instead of just .mma (let's see the times)
- transcript: support for "cr" inline param completed
- procedural: now record are supported
the records of logic/cprop_coonectives.ma are now reconstructed :)
logic higher_order_defs list nat Z Q are now fully reconstructed :))
| Some fl -> fl
| None -> aux attrs
+let rec is_record = function
+ | [] -> None
+ | `Class (`Record fields) :: _ -> Some fields
+ | _ :: tl -> is_record tl
+
let proc_obj ?(info="") proc_proof sorts params context = function
| C.AConstant (_, _, s, Some v, t, [], attrs) ->
begin match get_flavour sorts params context v attrs with
| C.AConstant (_, _, s, None, t, [], attrs) ->
[T.Statement (`Axiom, Some s, t, None, "")]
| C.AInductiveDefinition (_, types, [], lpsno, attrs) ->
- [T.Inductive (types, lpsno, "")]
+ begin match is_record attrs with
+ | None -> [T.Inductive (types, lpsno, "")]
+ | Some fs -> [T.Record (types, lpsno, fs, "")]
+ end
| _ ->
failwith "not a theorem, definition, axiom or inductive type"
F.fprintf frm "\\Elim{%a}{%a}{}{}{%a}" xat v xat t xl l
| T.Cut (r, w, _) :: T.Branch ([l1; [T.Id _]], _) :: l2 ->
F.fprintf frm "\\Cut{%a}{%a}{%a}{%a}" xx r xat w xl l1 xl l2
+ | T.Record _ :: _ -> assert false
| T.Inductive _ :: _ -> assert false
| T.Id _ :: _ -> assert false
| T.Clear _ :: _ -> assert false
type body = C.annterm option
type types = C.anninductiveType list
type lpsno = int
+type fields = (string * bool * int) list
type step = Note of note
+ | Record of types * lpsno * fields * note
| Inductive of types * lpsno * note
| Statement of flavour * name * what * body * note
| Qed of note
let mk_thnote str a =
if str = "" then a else mk_note "" :: mk_note str :: a
-let mk_inductive types lpsno =
+let mk_pre_inductive types lpsno =
let map1 (lps1, cons) (name, arity) =
let lps2, arity = strip_lps lpsno arity in
merge_lps lps1 lps2, (name, arity) :: cons
in
let map3 (name, xw) = arel_of_name name, xw in
let rev_lps, rev_types = List.fold_left map2 ([], []) types in
- let lpars, types = List.rev_map map3 rev_lps, List.rev rev_types in
+ List.rev_map map3 rev_lps, List.rev rev_types
+
+let mk_inductive types lpsno =
+ let lpars, types = mk_pre_inductive types lpsno in
let obj = N.Inductive (lpars, types) in
G.Executable (floc, G.Command (floc, G.Obj (floc, obj)))
+let mk_record types lpsno fields =
+ match mk_pre_inductive types lpsno with
+ | lpars, [name, _, ty, [_, cty]] ->
+ let map (fields, cty) (name, coercion, arity) =
+ match cty with
+ | C.AProd (_, _, w, t) ->
+ (name, w, coercion, arity) :: fields, t
+ | _ ->
+ assert false
+ in
+ let rev_fields, _ = List.fold_left map ([], cty) fields in
+ let fields = List.rev rev_fields in
+ let obj = N.Record (lpars, name, ty, fields) in
+ G.Executable (floc, G.Command (floc, G.Obj (floc, obj)))
+ | _ -> assert false
+
let mk_statement flavour name t v =
let name = match name with Some name -> name | None -> assert false in
let obj = N.Theorem (flavour, name, t, v) in
let rec render_step sep a = function
| Note s -> mk_notenote s a
| Statement (f, n, t, v, s) -> mk_statement f n t v :: mk_thnote s a
- | Inductive (lps, ts, s) -> mk_inductive lps ts :: mk_thnote s a
+ | Inductive (ts, lps, s) -> mk_inductive ts lps :: mk_thnote s a
+ | Record (ts, lps, fs, s) -> mk_record ts lps fs :: mk_thnote s a
| Qed s -> mk_qed :: mk_tacnote s a
| Exact (t, s) -> mk_exact t sep :: mk_tacnote s a
| Id s -> mk_id sep :: mk_tacnote s a
let rec count_node a = function
| Note _
+ | Record _
| Inductive _
| Statement _
| Qed _
| Note s
| Statement (_, _, _, _, s)
| Inductive (_, _, s)
+ | Record (_, _, _, s)
| Qed s
| Exact (_, s)
| Id s
type body = Cic.annterm option
type types = Cic.anninductiveType list
type lpsno = int
+type fields = (string * bool * int) list
type step = Note of note
+ | Record of types * lpsno * fields * note
| Inductive of types * lpsno * note
| Statement of flavour * name * what * body * note
| Qed of note
let get_iparams st name =
let debug debug = GA.IPDebug debug in
let map = function
+ | "comments" -> GA.IPComments
| "nodefaults" -> GA.IPNoDefaults
| "coercions" -> GA.IPCoercions
- | "comments" -> GA.IPComments
+ | "cr" -> GA.IPCR
| s ->
try Scanf.sscanf s "debug-%u" debug with
| Scanf.Scan_failure _
-componentsConf.cmi:
-hExtlib.cmi:
-hMarshal.cmi:
-patternMatcher.cmi:
-hLog.cmi:
-trie.cmi:
-hTopoSort.cmi:
-refCounter.cmi:
-graphvizPp.cmi:
componentsConf.cmo: componentsConf.cmi
componentsConf.cmx: componentsConf.cmi
hExtlib.cmo: hExtlib.cmi
-ncic2astMatcher.cmi:
-nTermCicContent.cmi:
ncic2astMatcher.cmo: ncic2astMatcher.cmi
ncic2astMatcher.cmx: ncic2astMatcher.cmi
nTermCicContent.cmo: ncic2astMatcher.cmi nTermCicContent.cmi
-ncic2astMatcher.cmi:
-nTermCicContent.cmi:
ncic2astMatcher.cmo: ncic2astMatcher.cmi
ncic2astMatcher.cmx: ncic2astMatcher.cmi
nTermCicContent.cmo: ncic2astMatcher.cmi nTermCicContent.cmi
-terms.cmi:
pp.cmi: terms.cmi
foSubst.cmi: terms.cmi
orderings.cmi: terms.cmi
superposition.cmi: terms.cmi index.cmi
nCicBlob.cmi: terms.cmi
cicBlob.cmi: terms.cmi
-paramod.cmi:
terms.cmo: terms.cmi
terms.cmx: terms.cmi
pp.cmo: terms.cmi pp.cmi
nCicBlob.cmx: terms.cmx foUtils.cmx nCicBlob.cmi
cicBlob.cmo: terms.cmi cicBlob.cmi
cicBlob.cmx: terms.cmx cicBlob.cmi
-paramod.cmo: superposition.cmi pp.cmi nCicBlob.cmi index.cmi foUtils.cmi \
- foUnif.cmi paramod.cmi
-paramod.cmx: superposition.cmx pp.cmx nCicBlob.cmx index.cmx foUtils.cmx \
- foUnif.cmx paramod.cmi
+paramod.cmo: terms.cmi superposition.cmi pp.cmi nCicBlob.cmi index.cmi \
+ foUtils.cmi foUnif.cmi paramod.cmi
+paramod.cmx: terms.cmx superposition.cmx pp.cmx nCicBlob.cmx index.cmx \
+ foUtils.cmx foUnif.cmx paramod.cmi
-terms.cmi:
pp.cmi: terms.cmi
foSubst.cmi: terms.cmi
orderings.cmi: terms.cmi
superposition.cmi: terms.cmi index.cmi
nCicBlob.cmi: terms.cmi
cicBlob.cmi: terms.cmi
-paramod.cmi:
terms.cmo: terms.cmi
terms.cmx: terms.cmi
pp.cmo: terms.cmi pp.cmi
nCicBlob.cmx: terms.cmx foUtils.cmx nCicBlob.cmi
cicBlob.cmo: terms.cmi cicBlob.cmi
cicBlob.cmx: terms.cmx cicBlob.cmi
-paramod.cmo: superposition.cmi pp.cmi nCicBlob.cmi index.cmi foUtils.cmi \
- foUnif.cmi paramod.cmi
-paramod.cmx: superposition.cmx pp.cmx nCicBlob.cmx index.cmx foUtils.cmx \
- foUnif.cmx paramod.cmi
+paramod.cmo: terms.cmi superposition.cmi pp.cmi nCicBlob.cmi index.cmi \
+ foUtils.cmi foUnif.cmi paramod.cmi
+paramod.cmx: terms.cmx superposition.cmx pp.cmx nCicBlob.cmx index.cmx \
+ foUtils.cmx foUnif.cmx paramod.cmi
applyTransformation.cmx matitaAutoGui.cmi
matitaclean.cmo: matitaMisc.cmi matitaInit.cmi matitaclean.cmi
matitaclean.cmx: matitaMisc.cmx matitaInit.cmx matitaclean.cmi
-matitacLib.cmo: matitaExcPp.cmi matitaEngine.cmi buildTimeConf.cmx \
- applyTransformation.cmi matitacLib.cmi
-matitacLib.cmx: matitaExcPp.cmx matitaEngine.cmx buildTimeConf.cmx \
- applyTransformation.cmx matitacLib.cmi
+matitacLib.cmo: matitaMisc.cmi matitaExcPp.cmi matitaEngine.cmi \
+ buildTimeConf.cmx applyTransformation.cmi matitacLib.cmi
+matitacLib.cmx: matitaMisc.cmx matitaExcPp.cmx matitaEngine.cmx \
+ buildTimeConf.cmx applyTransformation.cmx matitacLib.cmi
matitac.cmo: matitadep.cmi matitaclean.cmi matitacLib.cmi matitaWiki.cmx \
matitaMisc.cmi matitaInit.cmi
matitac.cmx: matitadep.cmx matitaclean.cmx matitacLib.cmx matitaWiki.cmx \
<key name="output_type">procedural</key>
<key name="heading_lines">14</key>
<key name="theory_file"></key>
- <key name="inline">* debug-2</key>
+ <key name="inline">* debug-6</key>
<key name="inline">logic/equality/symmetric_eq nodefaults</key>
<key name="inline">logic/equality/transitive_eq nodefaults</key>
<key name="inline">logic/equality/eq_elim_r nodefaults</key>
<key name="inline">logic/equality/eq_f nodefaults</key>
<key name="inline">logic/equality/eq_f' nodefaults</key>
- <key name="inline">Z/plus/eq_plus_Zplus nocoercions</key>
+ <key name="inline">Z/plus/eq_plus_Zplus coercions</key>
+ <key name="inline">Z/times/Ztimes_Zplus_pos_neg_pos cr</key>
</section>
</helm_registry>
<keyword>coercions</keyword>
<keyword>comments</keyword>
<keyword>debug</keyword>
+ <keyword>cr</keyword>
</keyword-list>
<keyword-list _name = "Whelp Macro" style = "Others 3"
Printf.printf "rm %s\n" generated; flush stdout; r
end
else
- compile ignore options fname
+ compact (compile ignore options fname)
;;
let load_deps_file = Librarian.load_deps_file;;