Andrea Asperti [Wed, 13 May 2009 09:27:34 +0000 (09:27 +0000)]
Signature is computed on the initial goal, once and for all.
Ripristined the filtering on candidates also for non-smart applications
(was too slow on some examples, e.g. in Fsub *
Ferruccio Guidi [Tue, 12 May 2009 19:04:32 +0000 (19:04 +0000)]
- Procedural: we now reconstruct "let H := v in t" with "intros (1) H" when the goal starts with an abbreviation. Clearbody before change in reactivated (to change the inferred type of the abbreviations of sort Prop)
- RELATIONAL: notation fixup
- character: autobatch fixup
- ng_tactics: dependences were not committed correctly
- critical bug fixed in NCicSubstitution.lift:
(0,Irl 0) was lifted to (1,Irl 0)
but later on NCicTypechecker.check_metasenv_consistency assumes the
invariant that the currenct context has length (m+n) if the metavariable
is (m,Irl n). But this invariant is false in the case (m, Irl 0) when m > 0.
- in NCicRefiner there was one line to normalize (m,Irl 0) and (m,Ctx []) to
(0,...). Is it still required after the first patch to the kernel? I suspect
no, thus I put an assert false to check.
Bug fixed: left parameters of constructors were unified before refining them.
Fixed, but the new code typechecks the constructors twice (in order to
re-compute) the sort without the inductive types. Is a more efficient
implementation worth the effort?
1) better implementation of NObj that now calls recursively NQed
to avoid code duplication
2) NQed now calls the kernel to check the object, since add_obj is too
low level for that (this makes a huge difference with the previous
architecture, but will probably break when dealing with undo)
Ferruccio Guidi [Wed, 6 May 2009 18:26:56 +0000 (18:26 +0000)]
- cicUtil: is_sober now detects folded applications
- Procedural: bugfix in pattern generation for elim/rewrite, better debug output, applications are flattened before alpha-conversion to hide a bug of the double type inference :( (it generates folded applications)
- applyTransformation: coercions are shown when rendering a tactic because Procedural is not aware of coercions :(
Ferruccio Guidi [Tue, 5 May 2009 17:23:49 +0000 (17:23 +0000)]
- hExtlib: new function "list_assoc_all"
- procedural: new flag "nodefaults" to turn off "default" based tactics. The `Variant flavour is now activated
- grafiteAst: now inline accepts a list of flags that can be easily extended
current flags are: procedural, nodefaults, depth=n, prefix="string" (untested),
theorem, definition, etc.
- transcript: support for explicitly provided inline flags
Enrico Tassi [Tue, 5 May 2009 16:56:33 +0000 (16:56 +0000)]
- pretty printer made robust in face of list_nth
- bugfixed in generation of aliases in nCicLibrary:
contructor index are 1-based
- refinement of indtypes fixed:
- missing undebujinate added
- index for current indty was in the wrong order
- apply_subst moved to nCicUntrusted
- new iterator for obj_kind
Ferruccio Guidi [Fri, 1 May 2009 16:40:29 +0000 (16:40 +0000)]
- librarian: 3 bugs fixed in the building system:
1) external dependences must be built using the path relative to their baseuri
2) the path of a non-existent .ma generated by a .mma was wrong
3) the compilation status of external dependences must be cached as for the other files in order to avoid looping.
Repetition of failed compilation remains for dependences of external dependences because the the external compilation caches are lost in the building process
When a devel is entered or leaved, its baseuei is printed for reference. This helps to disambiguate the files with the same name (eg original and reconstructed)
We hope that this will not bother the tests collection mechanism.
- core_notation: notation for non-functional exists had the wrong precedence
- procedural/library/Makefile: -onepass was added by mistake: datatypes/bool.ma fails with -onepass because of the ambiguity of the /\ notation
- procedural: bugfix in "Barendregt convention" test
- library/logic/cprop_connectives.ma: reorganized.
notations must immediately follow the definition they refer to (or else another
definition can use them in the reconstructed version of the file)
- core_notation.moo: added a notation for non-functiona 'exists
eta-expansion (not a CIC conversion) should be avoided exp. if the rendered
text must be reparsed (ie. during the reconstruction)
"default" notation facility reactivated in parsing mode since it is not
equivalent to the separated rules (they cover eachother).
The bug is in the rendering mode
- applyTransformation: debugging information added (commented)
logic/cprop_connectives.ma reconstructed and compiled !!
cicNotationUtil: in fresh_name_generator, "\eta" replaced with "eta", which is an identifier
cicNotationPp: debug mode turned off
logic/cprop_connectives.ma: duplicate lines removed
matitaScript: missing "\n\n" added in front of inline output
core_notation.moo: the "default" notation directive has a bug. Commented out.
huge commit in automation:
- tactics:
- all tactics used by auto (apply, applys and thus rewrite)
do handle correctly the subst present in the status
- indexing:
- demodualte_all (and thus solve_rewriting) reimplemented,
faster and more correct
- auto:
- applyS used to apply theorems, remaining goals have a
depth penalty
It is now possible for commands processed by grafiteEngine to either return
uris for an old object or for a new one. This information is only used to
generate preferences.
Lookup_in_library implemented for new objects. Basically, this stupid (??),
inefficient (??) implementation just keeps an associative list that maps names
to URIs and is used to resolve names in the library. This functionality is
provided by ng_kernel/nCicLibrary.
Note: automatic addition of preferences is not there yet.
Thus you need to activate lookup in library to see it working.
It is now possible to declare new aliases using the old syntax
(maybe confusing, but a string is a string). Thus much code becomes
useless in GrafiteDisambiguate. But it will be moved in the next commit
to nCicLibrary to implement the nlookup_in_library function.
- matitacLib: better handling of the callbacks for the dump operation
- applyTransformation: notation disabled when rendering reconstructed inductive types to avoid notation conflict between notation and inductive type syntax
- lexicon/lexiconEngine: better error messages and one callback removed
- termAcicContent: in lookup_interpretations, sorting the returned interpretations is optional and defaults to true (as before)
- disambiguateChoices: in lookup_symbol_by_dsc, the interpretations are not sorted before choosing, sorting them here is a bug because their order is lost so the chosen one is not the most recent
- grafiteParser: better callback functions for the drop feature of matitac, we introduced module name abbreviations for our convenience
- syntax_extensions/.depend: something is wrong with the Makefiles, this .depend is commited every time :(
- Grammar for all obj commands ported to NG (let recs and inductives still need
implementation and raise assert false)
- New feature: every object can be both interactive or not, depending on the
number of metavariables in the metasenv after disambiguation
- New objects are now put in the same namespace as old ones. The creation of
aliases takes care of this by looking for new objects before looking for
old ones. Note: this way the check is done twice, also when mapping
aliases to terms. However, this is temporary code while the two "libraries"
coexist.
Quick&dirty implementation of neqd:
a) nCicLibrary has a new function add_obj to add objects to the storage
(that is, so far, an associative list)
b) new command nqed
c) GrafiteDisambiguate modified so that identifiers are resolved
in the new storage, if possible, before going back to translating
the old library
d) implementation of apply_subst for terms and objects (used during nqed)
Note: these functions are currently in nTacStatus but should be moved
elsewhere
- transcript: we have now two styles of mma's from grafite:
1) each includes its source (minimum choice)
2) each includes the theory file of the source devel (maximim choice)
- matitadep: creation of the theory file is now optional and defaults to no
- procedural/library: we use style 1) above so library/theory is not needed
New command "inverter" used to generate an induction/inversion principle for
inductive types. The syntax is:
inverter name_of_the_principle for name_of_inductive_type param_selection
where param_selection is of the form
(# # # ... #)
where # can be either ? or %. The length of param_selection must match the
number of right parameters of the inverted inductive_type. A % means that the
corresponding parameter will have an inversion hypothesis, while a ? means that
the parameter won't have an inversion hypothesis. Therefore, a selection
(??...?) will generate the traditional elimination principle, while (%%...%)
will generate a full inversion principle.
Induction/inversion principles are useful for treating inductive types such that
some of their right parameters are used uniformly in one or more constructors.
If the inverted parameters are used uniformly in some constructor, the
induction/inversion principle will provide an induction hypothesis for that
branch (while a full inversion, also ranging on non-uniform parameters, would no
provide a useful induction hypothesis).
demodulate takes an extra argument 'all', if present it attempts to solve
the goal demodulating it in any possible way. an extra steps argument may
be used to increase the default maximum number of demodulation steps (1).
pump may also affect the result.
- MatitaMisc: we factorized here the function out_preamble used in matitadep
and MatitacLib
- ApplyTransformation: we moved some "\n" hoping in a better rendering :)
- matitadep: we now generate a "theory" file (dfault name "theory.ma" but can
- MatitaMisc: we factorized here the function out_preamble used in matitadep
and MatitacLib
- ApplyTransformation: we moved some "\n" hoping in a better rendering :)
- matitadep: we now generate a "theory" file (dfault name "theory.ma" but can
be changed via the -theory cmdline option) that includes all the
files of the devel so the devel itself can be included just
including the theory file. To speed up the inclusion process, only
the "top level" files are included (inclusion seems slow anyway)
- procedural/Makefile.common: new entries for single file compilation
- procedural/library: better preamble including library/theory.ma. Now the
devel should be reconstructed with the correct notation
- power_derivative.ma: we definitely do not want 'x' as a keyword in a serious
file. All files including it (for intance its
reconstructed version) can not use 'x' as an identifier.
For now we replaced 'x' with 'X'
- transcript: bug fix in obtaining the list of files to be processed
- init_cache_and_tables rewritten using the automation_cache
- new moo command Select to index an equality
- new command pump to perform some given clause steps on the automation
cache tables
- no more imperative maxmeta in paramodulation:
- paramodulation/* forlds a bag containing it
- auto.ml folds tables, containing a bag
Procedural: we corrected two errors about the handling of mutcase (the "cases"
tactic is now disabled because it does not work well with the
current kernel)
transcript: we immplemented uri substitution in Verbatim items
matitaInit: new option -no-default-includes for omitting the devels included by default (this is to compile procedural/library :) )
procedural/library: bug fix
- Procedural: generation of "exact" is now complete
- relevant tactics are now counted correctly
- PrimitiveTactics: we set exact_tac = apply_tac as in NTactics
- transcript: the grafite parser is now working
the "library" devel is parsed succesfully
- procedural/library: new devel.
Will contain the procedural reconstruction of "library"