Commit graph

78 commits

Author SHA1 Message Date
Leonardo de Moura
fe09e99fef chore: disable attribute features that are not currently being used 2020-01-08 15:49:55 -08:00
Leonardo de Moura
c4d974eb89 feat: allow attributes to be applied before elaboration
This is useful when the attribute may influence the elaboration of the declaration.
2019-11-13 15:40:19 -08:00
Leonardo de Moura
a5c97e21bf chore(library/init/lean): export as C functions 2019-08-16 20:15:30 -07:00
Leonardo de Moura
a02443d23d chore(frontends/lean): fun x, e ==> fun x => e 2019-07-02 13:22:11 -07:00
Leonardo de Moura
557dd16864 chore(library,frontends/lean): remove old attribute manager 2019-06-27 14:01:34 -07:00
Leonardo de Moura
4e444a283d feat(library/class): switch to Lean implementation 2019-06-27 13:51:09 -07:00
Leonardo de Moura
16d423dab6 feat(frontends/lean): switch to [extern] implemented in Lean
This commit also changes how we represent attribute parameters as
Syntax objects.
2019-06-26 10:57:33 -07:00
Leonardo de Moura
2e01ac508a feat(library/init/lean/syntax): primitives for creating and testing string and nat literals 2019-06-25 10:39:23 -07:00
Leonardo de Moura
e0ddacfd3e feat(library/init/lean/attributes,frontends/lean): allow attributes to specify when they should be applied 2019-06-20 09:17:03 -07:00
Leonardo de Moura
e86e6af049 feat(library/init/lean/attributes): add applicationTime field and remove unnecessary parameters 2019-06-20 08:48:26 -07:00
Leonardo de Moura
2b453de299 fix(frontends/lean/decl_attributes): remove mdata 2019-06-18 15:25:34 -07:00
Leonardo de Moura
50f8d232c3 feat(frontends/lean/decl_attributes): add expr_to_syntax 2019-06-18 15:17:46 -07:00
Leonardo de Moura
0553d60dbf feat(library/compiler/util): switch to new attributes implemented in Lean 2019-06-06 15:40:39 -07:00
Leonardo de Moura
2a557b1bbd feat(frontends/lean/decl_attributes): connect old frontend to new attribute manager 2019-06-06 10:43:09 -07:00
Leonardo de Moura
95b3ad69f9 chore(frontends/lean): remove parsing_only and prio from old attribute parser
This is a preparation for adding new attribute manager to the old frontend.
2019-06-05 15:01:03 -07:00
Leonardo de Moura
9d9f546ad8 refactor(util/sexpr): move options and option_declarations to util 2019-05-16 14:37:24 -07:00
Leonardo de Moura
fd487d8db7 chore(*): remove old VM 2019-05-08 15:15:44 -07:00
Sebastian Ullrich
4c357dfbd6 fix(frontends/lean/decl_attributes): fix attribute parsing in old frontend 2019-02-15 12:13:45 -08:00
Sebastian Ullrich
a6ac98966a refactor(library/attribute_manager): parse attribute data from pexpr instead of abstract_parser 2019-02-15 12:13:45 -08:00
Leonardo de Moura
f41e4dac72 fix(frontends/lean): must set m_gen_code = false for auxiliary declarations of extern declarations
We cannot check the `[extern]` attribute because the auxiliary
declarations are compiled before we even define the main declaration
and set the attribute.
We should consider a better design in the future where we first define
all auxiliary and main definitions, then set the attributes, and then
compile the code.

cc @kha
2019-02-12 17:52:06 -08:00
Sebastian Ullrich
c1534fd476 feat(frontends/lean/vm_elaborator): [recursor] arguments 2019-01-17 19:57:00 +01:00
Leonardo de Moura
990fbe3c30 feat(library/compiler): provide options to vm_compile 2018-09-30 08:50:40 -07:00
Leonardo de Moura
130b419371 chore(frontends/lean): remove break_at_pos support
We have already removed auto-completion support.
This change allowed me to remove another old_type_checker dependency.
2018-09-07 08:34:19 -07:00
Leonardo de Moura
3c521960c8 chore(library/class): remove attribute tracking symbols 2018-09-05 18:42:19 -07:00
Leonardo de Moura
c08a3bc557 refactor(library/typed_expr): move typed_expr to frontends/lean 2018-04-09 15:25:40 -07:00
Sebastian Ullrich
51aabb9b65 feat(frontends/lean/decl_attributes): allow user attributes on inductive types 2017-09-05 23:14:34 +02:00
Leonardo de Moura
603bbe5987 fix(*): gcc 7 linking errors 2017-05-31 16:35:09 -07:00
Leonardo de Moura
62c24f9bb5 chore(*): remove pos_num and num from stdlib 2017-05-25 18:24:16 -07:00
Leonardo de Moura
55fee26b36 feat(library/class): add attribute for tracking symbols occurring in instances of type classes
For more information see:
https://github.com/leanprover/lean/wiki/Refactoring-structures
The new attribute [algebra] implements the [algebraic_class] described
in the page above.
2017-05-01 18:02:30 -07:00
Gabriel Ebner
5fdc737dfc feat(library/tactic): store name of current declaration in tactic_state 2017-01-28 08:27:19 +01:00
Sebastian Ullrich
b04df04120 feat(frontends/lean): rework and simplify completion parsing, enabling completion of empty prefixes 2017-01-10 12:25:33 +01:00
Sebastian Ullrich
26e2aeec7a feat(frontends/lean,shell): complete attributes 2017-01-06 14:02:31 -08:00
Leonardo de Moura
95ffdca3f7 feat(frontends/lean/decl_attributes): add 'default_priority' attribute 2016-10-01 13:27:08 -07:00
Leonardo de Moura
49cffc0b20 feat(frontends/lean): add compact notation for setting attributes suggested by Sebastian 2016-09-24 15:45:06 -07:00
Leonardo de Moura
03e4fd1038 feat(frontends/lean,library): cleanup instance cmd, and use 'meta instance' 2016-09-24 12:33:25 -07:00
Leonardo de Moura
f00e6c0a96 feat(frontends/lean): anonymous instances
The instance name is synthesized automatically.
2016-09-23 13:34:34 -07:00
Leonardo de Moura
6bfd4eb9cf feat(frontends/lean): add 'instance' keyword 2016-09-23 12:19:05 -07:00
Sebastian Ullrich
cee5bfd983 feat(frontends/lean/decl_attributes): disallow persistent attribute removal 2016-08-23 14:09:35 -07:00
Sebastian Ullrich
abd040589f feat(frontends/lean/decl_attributes, library/attribute_manager): implement attribute removal 2016-08-23 14:09:35 -07:00
Sebastian Ullrich
ca8be3857c feat(library/user_attribute): add user-defined attributes and make attribute_manager environment-aware 2016-08-18 12:56:44 -07:00
Daniel Selsam
a9b01991c2 feat(frontends/lean/inductive_cmd): new frontend for the inductive cmd
Conflicts:
	src/frontends/lean/CMakeLists.txt
	src/frontends/lean/structure_cmd.h
2016-08-17 07:34:03 -07:00
Sebastian Ullrich
a2659cdaa5 feat(frontends/lean/decl_attributes): add [attr1, attr2] syntax 2016-08-16 13:49:03 -07:00
Sebastian Ullrich
cb6a6b642e refactor(library/attribute_manager): remove attribute tokens and use name for attribute names 2016-08-16 13:49:03 -07:00
Sebastian Ullrich
34e00cd5a2 refactor(library/attribute_manger): simplify: make every attribute prioritizable 2016-08-16 13:49:02 -07:00
Sebastian Ullrich
e0e8a3aff2 refactor(library/abbreviation): make parsing_only a real attribute 2016-08-12 15:36:12 -07:00
Leonardo de Moura
48f7731675 chore(frontends/lean/decl_attributes): fix 'make style' warnings 2016-08-05 17:25:37 -07:00
Sebastian Ullrich
15595c0061 refactor(library/attribute_manager): delegate parameter parsing and printing to attribute class 2016-08-05 17:16:04 -07:00
Sebastian Ullrich
c4edad0372 feat(frontends/lean, library): remove attribute and metaclass scoping
All data is now part of either a global, permanent scope or a local,
temporary one
2016-07-29 23:44:21 -04:00
Sebastian Ullrich
661fafc940 refactor(frontends/lean): replace different attribute classes with single scoped_ext 2016-07-29 18:51:23 -04:00
Leonardo de Moura
54f2c0f254 feat(library/blast/forward): inst_simp should use the left-hand-side as a pattern (if none is provided by the user)
The motivation is to reduce the number of instances generated by ematching.

For example, given

   inv_inv:  forall a, (a⁻¹)⁻¹ = a

the new heuristic uses ((a⁻¹)⁻¹) as the pattern.
This matches the intuition that inv_inv should be used a simplification
rule.

The default pattern inference procedure would use (a⁻¹). This is bad
because it generates an infinite chain of instances whenever there is a
term (a⁻¹) in the proof state.
By using (a⁻¹), we get
   (a⁻¹)⁻¹ = a
Now that we have (a⁻¹)⁻¹, we can match again and generate
   ((a⁻¹)⁻¹)⁻¹ = a⁻¹
and so on
2015-12-31 20:20:39 -08:00