Enrico Tassi [Mon, 15 Jun 2009 16:22:18 +0000 (16:22 +0000)]
EXPERIMENTAL COMMIT (by CSC,actuall :-)
This commit partially implements (in NCicLibrary) serialization for NG.
It creates several .matita/matita/.../foo.ng files that are ocaml dumps
of closures (NRstatus.refiner_status -> NRstatus.refiner_status) to be applied
to the current status.
The test tests/ng_includeB.ma shows how unification hints are preserved.
TODO:
a) decompilation is implemented in NCicLibrary, but not called anywhere
b) serialization of objects (and "query" db (and old to new cache??)) not
implemented yet
c) objects are removed from the library, but not from the environment!
Enrico Tassi [Mon, 15 Jun 2009 11:04:24 +0000 (11:04 +0000)]
huge commit regarding the grafite_status:
- in the ng_status component it embeds the lexicon status
- the lexicon status is not passed around alone anymore
- coercions/hints for the ng system are no longer imperative
(are in the e (for external) status of the tac_status
- ng_refiner does not take in input a look_for_coercions function
but an aggregate type "rdb" comprising hints and coercions
(and empty one is passed to disable hints/coercions)
functionalities losses:
- old (generated) hint are no longer translated on the fly
- old coercions are translated in a best effort way
(no universes calculation)
Enrico Tassi [Mon, 15 Jun 2009 09:36:46 +0000 (09:36 +0000)]
tacticals are really tactics now, they have an AST at the same level of
tactics. Parser/engine fixed accordingly. This allowed a better TPTP
exportation
denes [Thu, 11 Jun 2009 22:52:38 +0000 (22:52 +0000)]
Active goals are now demodulated after selecting a positive clause.
Implemented OrderedSet for passive clauses.
Selection is now based on weight (fairness condition to be added).
Ferruccio Guidi [Thu, 11 Jun 2009 12:59:35 +0000 (12:59 +0000)]
- some depend files fixed
- 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 :))
Ferruccio Guidi [Wed, 10 Jun 2009 20:19:42 +0000 (20:19 +0000)]
- library/list/list.ma: unused code commented
- proceduralClassify type argument are no longer critical: let's see how it goes
- acic2Procedural: the inline parameter Debug now works
- procedural2: we remove the conversions before first order relexivities (exp. to avoid conversion to []=[] in list/list.ma [does not work because []=[] in an open term since the equality type is unspecified]). so we we strengthen reflexivity (see below)
- setoids: now reflexivity is retried after whd if it fails in the first place.
- grafiteAst: detection of convertible rewrites is now optional and activated with the inline parameter "cr". nat/factorial2 is very slow without rewrites
transcript: we now avoid the generation of dupplicated inlines (mistakely generated by the grafite parser [this can not be avoided without a better syntax for .ma scripts])
now list/list.ma is fully reconstructed :)
nat/factorial2.ma takes long to be produced 22m31. Some conversion is slowing the process. nat/bertrand.ma also: we are waiting for it now :(
Ferruccio Guidi [Tue, 9 Jun 2009 17:22:52 +0000 (17:22 +0000)]
- Procedural: more support for the Debug inline option (does not work yet)
- transcript: now we can process a given subset so the source files
- termContentPres: bugfix in the syntax of letrec, a space was missing :(
now nat/generic_iter_p.ma is fully reconstructed :) (thx Claudio)
Temporary (and partially broken) patch for Ferruccio: I duplicate
\Pi abstractions in let ... rec definitions in order to make the system
infer the same names. However, it could be infer a -> in place of a \forall.
This commit restores the ids_to_father_ids table.
However, after the implementation, I sort of realized that maybe this table
is useless, after all.
Thus I am gonna do my commit and immediately revert it (just to keep the
code in SVN in case of need).
Ferruccio Guidi [Fri, 5 Jun 2009 22:18:01 +0000 (22:18 +0000)]
- Procedural convertible rewrites in the conclusion are now detected and replaced by change
- grafiteAst: semantics of the Include flag changed: now true means normal include, New Inline flags Coercions, Comments (activated) Debug (not yet)
- library: eq_plus_Zplus moved from Z/times to Z/plus
now Z/plus.ma Z/times.ma are fully reconstructed :)
1) the home button of CicBrowser now works also for NG
2) implemented simple (i.e. no natural language) rendering of NG constants.
Inductive types and (co)recursive definitions are still missing.
The kernel _must_ check the correctness of the height since the reduction
machine never tries to reduce terms whose height is 0. Thus, if the
declared height is 0, the height is no longer an optimization!
Ferruccio Guidi [Thu, 4 Jun 2009 18:35:24 +0000 (18:35 +0000)]
- doubleTypeInference: we check for unreferenced letins in the inferred type also after beta-reduction because beta-reduction can cause unreferenced letins
- procedural: bugfix in the use of inner types, the expected type was sometimes used in place of the inferred type; context cleaning is now disabled because the clear tactics are not generated; debugging mode is now activated
Ferruccio Guidi [Wed, 3 Jun 2009 20:20:11 +0000 (20:20 +0000)]
- boxPp: added missing spaces
- core_notation: bug fix in the input notation for congruent: we added term 90 after \sub
- library/nat/permutation.ma: added input notation for transpose and fixed term precedence in its output notation
- library/Makefile: compilation of single files re-enabled.
The syntax for compiling file.ma is is "make file.mo" and "make file.mo.opt"
now nat/congruence.ma and nat/permutation.ma are fully reconstructed :)
1) CicNotationPres.render: type changed to make it more general (no
dependency on the Hashtbl) and URI/REFERENCE agnostic.
A compatibility function CicNotationPres.lookup_uri is provided to
easily map the (old) Hashtbl to the (new) lookup function.
2) user interface partially changed to render NG objects in the CicBrowser
and to follow NG hyperlinks
3) New CicNotationPt entries NRef (similar to Uri) and NRefPattern
(similar to UriPattern) to avoid hijacking the old Uris (actually,
uris + xpointers) to also hold new references.
This allows to properly implement notation (for NG) and to properly
handle hyperlinks.
4) all remaining Warnings for unused variables fixed (in some way or
another, hopefully the correct one)
5) GrafiteEngine, NQed: the height of an object is now recomputed just
before putting it in the environment. This fixes all the bugs related
to reduction.
6) GrafiteParser/LexiconEngine: both old URIs and new references are now
allowed in NG terms and in notations
7) ng_cic_content: rendering functions now return an "id |-> reference" table
to correctly implement MathML hrefs
8) NReference: new compare function
9) NCicUntrusted: new height_of_obj_kind function (to be used in GrafiteEngine)
10) OCic2NCic: new reference_of_oxuri function to map old uris + xpointers
into new references
11) bug fixed: after the commit by Enrico that starts using the extensible
PTS, the old-to-new objects translations used to map Type into "Type" which
was not declared. Type is now mapped into Type[0] and Type (as a "notation")
is now a synonim of Type[0] (only during parsing for now)
12) bug fixed: after the commit by Enrico that cleans up terms for
alpha-conversion and dummy products, the test in NCicTypeChecker that
verifies the consistency of left parameters in constructor --- that used
to do that NOT up to alpha-conversion --- used to fail when dummy products
were found. The test is now relaxed to include alpha-conversion.
13) bug fixed: NCicTypeChecker did not verify that a .dec reference pointed to
an axiom and that a .def reference did not point to an axiom. Fixed.
Ferruccio Guidi [Fri, 29 May 2009 14:26:50 +0000 (14:26 +0000)]
- cicNotationParser: added extra space to TeX control sequences accordind to previous commit of cicNotationLexer
- core_notation: bugfix in the notation for exp
- library/nat/congruence.ma: notation for "congruent" moved to core_notation
Ferruccio Guidi [Thu, 28 May 2009 17:17:29 +0000 (17:17 +0000)]
- cicInspect: relevant nodes count updated: letin nodes are not relevant
- Procedural: reflexivity is now supported
- grafiteAst: boolean flag for include to tag inclusion of a source file. This command is relevant for .ma generation only. [ the source file of a .mma is not included in the generated .ma ]
- cicNotationLexer: unexpanded TeX macro symbols are now encoded with an extra space at the end. This is consistent with the concept of TeX sequence and fixes a bug in the renering of these symbols. The space is needed for reparsing!
Ferruccio Guidi [Wed, 27 May 2009 17:16:31 +0000 (17:16 +0000)]
- Procedural: we specify more unifiers for apply to help higher-order unification
- cicNotationPp: bugfix in the notation for Meta and ImplicitPattern
- transcript: grafite lexer/parser updated
Basic support for interpretations for NG:
1) only interpretations for old objects are used
(i.e. no way yet to declare a new interpretation on a new object)
2) only interpretations for constants (no inductive definitions/constructors)
since we have no faithful embedding of new references into old URIs
3) no support for backtracking (I think)
Ferruccio Guidi [Thu, 21 May 2009 19:04:29 +0000 (19:04 +0000)]
Procedural: we use the expected type rather than the inferred type when we perform a cut to keep the goal in sync with the expected type.
we try to beta-reduce the elimination pattern when it does not match the goal/expected type
now nat/compare.ma and Z/z.ma are fully reconstructed :)
Ferruccio Guidi [Wed, 20 May 2009 20:44:49 +0000 (20:44 +0000)]
we catch the refiner errors in the critical step and fall back to the non-criticall version (this is just for debugging)
bug-fix in elimination recognition euristics
now nat/orders.ma and nat/times.ma are fully reconstructed :)
1) GrafiteAst.NEval => GrafiteAst.NReduce
2) new tactic "nnormalize" implemented
3) "ngeneralize" now uses "wanted" when no term is selected
(so that it is possible to use ngeneralize to move an
hypothesis down)
4) new syntax for non punctuational tinycals was missing
1) new tactic normalize (low-level function implemented in
nCicTacReduction)
2) the select tactic used to generate fresh metavariables by unifying the
"wanted" part of the pattern in a root where "wanted" did not occur.
Those metavariables are now removed in that case
1) order of processing of case branches reverted (to generate metas in
left-to-right order)
2) metas generated by eat_prods are now re-ordered so that they occur
in left-to-right order