Leonardo de Moura
b5acbb2228
fix(frontends/lean/pp): missing parenthesis around abbreviations
...
fixes #476
2015-03-16 17:12:03 -07:00
Leonardo de Moura
f5811d6092
feat(frontends/lean): hide subterms that do not contain metavariables
...
when generating "unresolved metavariables" error message
closes #473
2015-03-13 12:42:57 -07:00
Leonardo de Moura
60fca7575c
fix(frontends/lean/pp): bugs when pretty printing abbreviations
2015-02-10 19:06:09 -08:00
Leonardo de Moura
43f849bf95
feat(frontends/lean/pp): add support for abbreviations in the pretty printer
...
closes #365
2015-02-10 18:27:02 -08:00
Leonardo de Moura
287a444481
feat(frontends/lean/pp): add option 'pp.numerals'
2014-12-11 17:28:58 -08:00
Leonardo de Moura
320971832d
feat(frontends/lean/pp): add hard-coded pretty printer for nat numerals
2014-12-01 16:07:55 -08:00
Leonardo de Moura
4ec2101b06
feat(frontends/lean): add option 'pp.purify_locals'
2014-11-28 14:49:00 -08:00
Leonardo de Moura
0b8c44a94a
feat(frontends/lean): add option pp.purify_metavars
...
It is true by default. If the user sets it to false, then
the internal metavariable names are used in the pretty printer
2014-11-09 11:04:22 -08:00
Leonardo de Moura
b5e0ded163
feat(frontends/lean): max precedence used by Lean is not max_uint anymore
...
The motivation is to allow users to define notation with higher
precedence than function application.
2014-11-07 07:57:11 -08:00
Leonardo de Moura
2a160508c3
feat(frontends/lean): lean --server
should display meta-variables using the approach used in check command, closes #280
2014-10-30 12:45:41 -07:00
Leonardo de Moura
555d26aa61
feat(frontends/lean/pp): take notation declarations into account when pretty printing
...
TODO: support foldl/foldr and binders
2014-10-19 08:41:29 -07:00
Leonardo de Moura
f863d82e69
fix(frontends/lean/pp): pp was not taking into account new namespace name resolution rules, fixes #216
2014-10-01 11:24:45 -07:00
Leonardo de Moura
29d6bff785
refactor(frontends/lean): explicit initialization/finalization
2014-09-23 10:00:36 -07:00
Leonardo de Moura
8fe7465ade
fix(frontends/lean/pp): when formatting a coercion to function-class
...
that contains implicit arguments
2014-09-20 09:56:46 -07:00
Leonardo de Moura
2d94584816
feat(frontends/lean/pp): add 'pp.beta' option, closes #154
2014-09-09 14:10:20 -07:00
Leonardo de Moura
ee196bbf1a
fix(frontends/lean/pp): pretty printing coercions to functions, fixes #151
2014-09-09 12:49:32 -07:00
Leonardo de Moura
40cd50b1ca
fix(frontends/lean/pp): add necessary '@' when pp.implicit is true, otherwise produced output will not even type check
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-02 17:11:26 -07:00
Leonardo de Moura
be56fcf0bd
fix(frontends/lean/pp): pretty print 'let-expressions', closes #87
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-28 18:20:58 -07:00
Leonardo de Moura
1e80a9dfe9
feat(frontends/lean): avoid exponential blowup when processing let-expressions with a lot of sharing, cleanup show-expression
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-28 16:27:52 -07:00
Leonardo de Moura
4cf3d32e0c
chore(*): create alias for std::pair
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-20 16:46:19 -07:00
Leonardo de Moura
28b7d87f1f
feat(frontends/lean/pp): pretty print numerals
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-14 09:12:22 -07:00
Leonardo de Moura
ba98634a7a
feat(frontends/lean/pp): do not display metavariable arguments by default, add option pp.metavar_args to control whether they are displayed or not
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-31 16:46:16 -07:00
Leonardo de Moura
6e135832d8
feat(frontends/lean/pp): pretty print '@' explict operator
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-29 14:26:27 -07:00
Leonardo de Moura
83d38674c9
feat(kernel/error_msgs): improve cryptic type mismatch error messages where the types may seem identical because key information is being suppressed
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-27 09:41:25 -07:00
Leonardo de Moura
0cdd4a267c
feat(frontends/lean/pp): pretty print 'show' expressions
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-26 21:56:35 -07:00
Leonardo de Moura
60cc9ac8e2
feat(frontends/lean/pp): pretty print 'have' expressions
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-26 21:35:26 -07:00
Leonardo de Moura
811f46e97b
feat(frontends/lean/pp): add option for displaying internal names associated with private declarations
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-25 11:03:54 -07:00
Leonardo de Moura
405e57eb2d
refactor(kernel/formatter): add formatter_factory, and simplify formatter interface
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-10 18:32:00 +01:00
Leonardo de Moura
c13c75b93e
feat(frontends/lean/pp): add option for displaying fully qualified names
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-10 15:55:19 +01:00
Leonardo de Moura
49bc3fffbd
fix(frontends/lean/pp): purify procedure for local names
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-10 14:13:51 +01:00
Leonardo de Moura
43eba857cb
feat(frontends/lean): add let-expr pretty printer, reduce default indentation to 2
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-09 18:47:10 -07:00
Leonardo de Moura
2ef7b9be2f
feat(frontends/lean): add basic pretty printer
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-09 01:12:36 -07:00
Leonardo de Moura
c6af56260e
refactor(frontends/lean): remove dead code
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-15 15:51:41 -07:00
Leonardo de Moura
aee1c6d3f3
feat(kernel): export/import (.olean) binary files
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-28 17:31:35 -08:00
Leonardo de Moura
f97c260b0b
refactor(kernel/environment): add ro_environment
...
The environment object is a "smart-pointer".
Before this commit, the use of "const &" for environment objects was broken.
For example, suppose we have a function f that should not modify the input environment.
Before this commit, its signature would be
void f(environment const & env)
This is broken, f's implementation can easilty convert it to a read-write pointer by using
the copy constructor.
environment rw_env(env);
Now, f can use rw_env to update env.
To fix this issue, we now have ro_environment. It is a shared *const* pointer.
We can convert an environment into a ro_environment, but not the other way around.
ro_environment can also be seen as a form of documentation.
For example, now it is clear that type_inferer is not updating the environment, since its constructor takes a ro_environment.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-12 16:48:34 -08:00
Leonardo de Moura
da613f67a8
refactor(frontends/lean/pp): replace dangerous frontend reference with a weak_ref to the environment
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-08 16:42:12 -08:00
Leonardo de Moura
d843d432d3
refactor(kernel): move printer and formatter objects to the kernel
...
The printer and formatter objects are not trusted code.
We moved them to the kernel to be able to provide them as an argument to the trace objects.
Another motivation is to eliminate the kernel_exception_formatter hack.
With the formatter in the kernel, we can implement the pretty printer for kernel exceptions as a virtual method.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-10-22 08:15:36 -07:00
Leonardo de Moura
4c19cc6957
Rename lean frontend files. The prefix lean_ is not necessary anymore.
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-12 20:09:35 -07:00