All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
editors/vscode/CHANGES.md and editors/vscode/CONTRIBUTING.md.A tactic replacing the current goal by n new goals must be followed by n proof scripts enclosed in curly brackets. For instance, instead of writing induction; /* case 0 */ t1; ..; tm; /* case s */ q1; ..; qn, we must now write induction {t1; ..; tm} {q1; ..; qn}.
Exception for tactics not really changing the current goal like "have": /* proof of u */ have h: t; /* proof of t */ t1; ..; tm; /* proof of u continued */ q1; ..; qn must now be written have h: t {t1; ..; tm}; q1; ..; qn.
Other modifications in the grammar:
[a:Set] instead of {a:Set}.$f.[x] instead of $f[x].focus command is removed since it breaks structuration.%S by \"%s\"is_keyword from lexer to prettypackage.ml from common/ to parsing/Config.map_dir field type to (Path.t * string) list, Library.add_mapping type to Path.t * string -> unit and Compile.compile argument lm type to Path.t * string--record-time (2021-11-30)_LLet by calling mk_LLetEval.pure_eq_modulo in Infer and Unif (fix #693)C-c C-k and C-c C-r for killing and reconnecting to the LSP serverrw_patt (2021-04-07)The types Term.rw_patt and Syntax.p_rw_patt_aux are merged into a single polymorphic type Syntax.rw_patt.
Several functions are exposed,
Parsing.Scope.rule_of_pre_rule: converts a pre rewriting rule into a rewriting rule,Handle.Command.handle: now processes proof data,Handle.Command.get_proof_data: is the old handle,Handle.Compile.compile_with: allows to provide a command handler to compile modulesterm.mli and turn the term type into a private type so that term constructors are not exported anymore (they are available for pattern-matching though). For constructing terms, one now needs to use the provided construction functions mk_Vari for Vari, mk_Appl for Appl, etc.LibTerm to Term, in particular get_args, add_args and cmp_term.sym_tree into sym_dtree.rhs as (term_env, term) Bindlib.mbinder instead of (term_env, term) Bindlib.mbinder * int so that the old rhs needs to be replaced by rhs * int in a few places.haveapplyassume not needed before reflexivity anymoreassume checks that identifiers are distinctsolve: simplify goals afterwardslibTerm: permute arguments of unbind_name, and add add_args_map and unbind2_namesyntax: add check_notin and check_distinctmisc/listings.tex into misc/lambdapi.tex and misc/example.texinductive to strictly-positive inductive types (2021-04-02)./tools/ -> ./misc./src/core/tree_types.ml -> ./src/core/tree_type.mlscope.ml from Core to Parsing (2021-03-30)Escape.add_prefix and Escape.add_suffix allow to correctly extend potentially escaped identifiersscope.ml from Core to Parsingscope.ml:
scope_term_with_params is introduced: it is similar to scope_term but does not check that top-level bound variables are used_Meta_Type is moved to env.ml as fresh_meta_typecommand.ml:
scope_term_with_params and check that parameters are indeed usedget_implicitness moved to syntax.ml as get_impl_termSyntax.get_impl_params_listpp_var instead of Bindlib.name_ofnew_tvar = Bindlib.new_var mkfree (2021-03-26)generalize, and rename tactic simpl into simplify (2021-03-25)lambdapi.opam is moved to dune-project and the former is generated using dune build @install.opam prefix using dune.have (2021-03-24)simpl <id> for unfolding a specific symbol only (2021-03-22)and slightly improve Ctxt.def_of
inverse.ml the computation of the inverse image of a term wrt an injective function (no unification rule is needed anymore in common examples, fix #342)Infer.make_prod into Infer.set_to_prodadmit into admittedadmitted: admit the initial goal instead of the remaining goals (when the proof is an opaque definition)admit from command.ml to tactic.mladmit (fix #380) As a consequence, tactics can change the signature state now."print_meta_args"(current_sign()).sign_path by current_path()set keyword (2021-03-04)set infix ... "<string>" := <qid> is replaced by set notation <qid> infix ...set prefix ... "<string>" := <qid> is replaced by set notation <qid> prefix ...set quantifier <qid> is replaced by set notation <qid> quantifierprint_meta_type is renamed into print_meta_typesLibTerm.expl_args is renamed into remove_impl_argskey_counter renamed into meta_counterMeta.name does not return a ?-prefixed string anymorequery.mlenv.ml: add functions for generating fresh metavariable terms (factorizes some code in scope.ml and tactics.ml)Sign.inductive renamed into ind_datarewrite.ml now take a goal_typ as argumenttactic.mlp_type and p_pattP_Impl into P_Arro, and P_tac_intro into P_tac_assumesig_stateFile renamings and splittings:
lpLexer -> escape, lpLexerconsole -> base, extra, debug, error, consolemodule -> filename, path, librarycliconf -> configinstall_cmd -> installinit_cmd -> initescape.ml and fix printingtests/ok_ko.ml to allow sub-directories in tests/OK/ or tests/KO/File renamings:
terms -> termbasics -> libTermtactics -> tacticqueries -> querystubs -> realpathfiles -> modulehandle -> commandCore library divided into the following sub-libraries:
Common that contains shared basic files (pos, console, module and package)Parsing that contains everything related to parsing (syntax, pretty, lexers and parser)Handle that uses Core to type check commands and modules (contains query, tactic, command, compile, inductive, rewrite, proof and why3_tactic)Tool that provides miscellaneous tools that use Core (external, hrs, xtc, tree_graphviz, sr)Replace Earley by Menhir, Pratter and Sedlex
Syntax modifications:
/* ... */.;.λx y z: nat, ... with multiple variables is not authorised anymore, but λ(x y z: nat), ... is, as well as λ x : N, t with a single variable.In unification rules, the right hand-side must now be enclosed between square brackets, so
set unif_rule $x + $y ≡ 0 ↪ $x ≡ 0; $y ≡ 0becomes
set unif_rule $x + $y ≡ 0 ↪ [ $x ≡ 0; $y ≡ 0 ];set declared has been removed.λx is now a valid identifier. Hence, expression λx, t isn't valid, but λ x, t is. `f x, t represents f (λ x, t) (and a fortiori f {T} (λ x, t)).assert always takes a turnstile (or vdash) to specify a (even empty) context, so the syntax is assert ⊢ t: A;- in the rewrite tactic has been replaced by the keyword left.Code modifications:
pp_hint is renamed to notation and moved to sign.ml.pp_hint) are kept in a SymMap, which allowed to simplify some code in sig_state.ml and sign.ml.p_terms do not have P_BinO and P_UnaO constructors anymore.changes in the syntax:
sequential keyword for symbol declarations--keep-rule-order option$F is shorthand for $F[]fail (2020-05-26)Allow users to match on product Πx: t, u and on the domain of binders.
Introduction of unification rules, taken from http://www.cs.unibo.it/~asperti/PAPERS/tphol09.pdf. A unification rule can be set with
set unif_rule t ≡ u ↪ v ≡ w, x ≡ y→ is replaced by ↪ in rewriting rules,& is replaced by $ for pattern variables in rewriting rules,rule ... and ... becomes rule ... with ...,⇒ is replaced by → for implication, and∀ is replaced by Π for the dependent product typeAdding let-bindings to the terms structure.
whnf, hnf, snf &c.) are called with a context.let in the concrete syntax.Stdlib instead of Pervasives (enforced by sanity checks).stdlib-shims to provide Stdlib on older version of OCaml.lambdapi lsp.--no-warning option (fixes #296).Simplification of the decision tree structure
Introducing protected and private symbols.
Introducing the why3 tactic to call external provers.
First major release of Lambdapi. It introduces:
First release of Lambdapi.