Commit graph

122 commits

Author SHA1 Message Date
Leonardo de Moura
6272408f12 Add format tests
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-22 08:20:42 -07:00
Leonardo de Moura
3c5f993191 Fix bugs in options module. Add more tests.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-22 08:08:55 -07:00
Leonardo de Moura
eb4315baab Add small trick to improve pretty printer performance. Now, deep.lean takes 0.140secs to be processed.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-21 22:54:58 -07:00
Leonardo de Moura
56d2d2a112 Improve pretty printer performance for deep formulas and formats with long lines. Add example that demonstrates performance problem (before: 13 secs, after: 1 sec).
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-21 22:45:48 -07:00
Leonardo de Moura
31460aa5b8 Add option declarations. Add Help.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-21 17:02:09 -07:00
Leonardo de Moura
ce470f57db Add set options to lean_parser. Add support for disabling unicode output. Use channels in lean_parser.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-21 12:42:55 -07:00
Leonardo de Moura
6f36611010 Fix clang++ error
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-20 20:16:02 -07:00
Leonardo de Moura
3f5a2a83cc Add methods for setting options. Add string output channel.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-20 20:16:02 -07:00
Leonardo de Moura
4fa2468a85 Add output_channel and state abstractions
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-20 20:16:02 -07:00
Leonardo de Moura
f6ea9fca7d Remove interrupt.cpp. We changed the way we will handle interruptions in Lean.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-19 20:05:56 -07:00
Leonardo de Moura
b964edfb3e Add interrupt method to type checker.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-19 20:05:56 -07:00
Leonardo de Moura
eba4172a0c Remove verbosity.cpp, verbosity message channel should not be a global.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-19 20:05:56 -07:00
Leonardo de Moura
de80db3985 Add support for pretty printing Dags. Find unused prefix for naming shared expressions.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-19 12:04:40 -07:00
Leonardo de Moura
90ad0ba3b3 Add is_prefix_of for hierarchical names
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-19 11:43:46 -07:00
Leonardo de Moura
65b4845fbc Add more tests to improve coverage. Fix bug in mpz.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-18 00:28:50 -07:00
Leonardo de Moura
6edae938b7 Improve list iterator
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-17 11:31:36 -07:00
Leonardo de Moura
c41b3dc4d8 Add kernel_exceptions. The idea is to avoid expression formatting in the kernel. It also allows different frontends to display the error messages is a different way.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-16 12:51:12 -07:00
Leonardo de Moura
790d4a4447 Move pretty printer to frontend. Add support for mixfix pretty printing
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-15 19:02:28 -07:00
Leonardo de Moura
5395ced0e5 Improve comments
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-15 19:02:28 -07:00
Leonardo de Moura
e9106f7512 Delete obsolete function continue_on_violation
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-15 19:02:28 -07:00
Leonardo de Moura
577256fedc Add highlight_keyword, highlight_builtin, highlight_command for consistent formatting
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-15 19:02:28 -07:00
Soonho Kong
a6f3122146 Fix cygwin error caused by the use of thread_local in numerics/float class 2013-08-15 13:49:15 -07:00
Soonho Kong
eb29a67395 Fix mpfp::operator^= to resolve operator overloading problem 2013-08-14 23:49:26 -07:00
Leonardo de Moura
2d74ff5fe0 Cache results of the normalizer. Add example that demonstrates the exponential performance improvement.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-14 23:18:50 -07:00
Leonardo de Moura
f604be760d Add helper function for maps.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-14 18:17:18 -07:00
Leonardo de Moura
913fd14549 Add operator== to list
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-14 18:17:18 -07:00
Soonho Kong
43b25a0231 Add operator<(mpq, double) to mpq 2013-08-14 13:45:29 -07:00
Soonho Kong
70f383eb82 Add unary minus operator overloadings to mpq & mpfp 2013-08-14 00:01:03 -07:00
Soonho Kong
5f143f164e Fix numeric_traits<mpfp>::pi constants 2013-08-13 20:09:06 -07:00
Soonho Kong
02900e2c83 Add abs/floor/ceil to double/float/mpq/mpfp 2013-08-13 20:09:06 -07:00
Leonardo de Moura
392b347f53 Add expr_formatter and expr_locator. Add better error messages. Improve simple printer.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-13 19:16:40 -07:00
Leonardo de Moura
3bcbdf7c7b Add options to customize formatter
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-13 16:19:30 -07:00
Leonardo de Moura
11a9cac5d6 Refactor kernel objects
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-13 15:13:54 -07:00
Leonardo de Moura
00c06839a4 Fix scanner. Add scanner tests. Add itera to list::iterator. Add parser_exce.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-13 10:55:41 -07:00
Leonardo de Moura
0a4e03efc5 Remove option name::separator, it can't be configured during runtime
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-13 08:18:01 -07:00
Leonardo de Moura
963afa4861 Add missing files
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-13 07:07:14 -07:00
Leonardo de Moura
2ea7479ee9 Move sexpr/format/options to util/sexpr (reason: circular dependency between util and numerics lib), now numerics depend on util, and sexpr depends on numerics and util. Add scanner to frontend.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-13 03:40:51 -07:00
Soonho Kong
e123dd8e58 Use numeric_traits<mpfp>::get_mpfp_rnd() as a default rounding mode in mpfp operations 2013-08-13 00:35:14 -07:00
Leonardo de Moura
50cf3e42f1 Add operator_info
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-12 19:12:44 -07:00
Leonardo de Moura
fb56869aae Fix cygwin problem.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-12 15:22:08 -07:00
Soonho Kong
71e10a0336 Add missing initialization of numeric_traits<mpfp>::rnd 2013-08-12 14:58:17 -07:00
Leonardo de Moura
2ad9c89684 Fix memory leak in mpfp. Add mpfp finalizer to avoid Valgrind warnings.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-12 11:36:15 -07:00
Soonho Kong
99df36f747 Add missing header <numeric> to format.h 2013-08-12 10:58:07 -07:00
Leonardo de Moura
e07830d0f5 Fix nasty crash that only happens when using cygwin.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-11 14:35:58 -07:00
Leonardo de Moura
7ebaac62a8 Add scoped_map. Cache type checker results.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-10 19:27:56 -07:00
Leonardo de Moura
19440bc103 Fix clang warning
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-10 16:58:15 -07:00
Leonardo de Moura
f79c0d3546 Add support for cygwin
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-10 14:21:13 -07:00
Leonardo de Moura
3d9f9a12d1 Enable automatic coercion from 'char const *' to hierachical name
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-10 14:21:13 -07:00
Leonardo de Moura
c6d0afcc40 Rename sexpr eqp to is_eqp
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-10 14:21:13 -07:00
Soonho Kong
375bc817cc Add more to mpfp 2013-08-09 22:41:07 -07:00