Commit graph

249 commits

Author SHA1 Message Date
Soonho Kong
c96a6982a0 Add <ctime> header for time() in pdeque/pvector tests 2013-09-13 20:42:49 -07:00
Soonho Kong
eda25e77a4 Use time(0) as an initial seed for rand_r() in pvector/pdeque tests 2013-09-13 20:28:15 -07:00
Soonho Kong
bc60b47295 Apply coding style 2013-09-13 18:48:09 -07:00
Leonardo de Moura
8c735f1daa Use consistent coding style for spaces after ','
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-13 12:49:03 -07:00
Leonardo de Moura
573ec5ccc2 Rename import_all. The idea is to use consistent name for library files.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-13 09:06:46 -07:00
Leonardo de Moura
070c87bef0 Rename arith library files
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-13 08:55:09 -07:00
Soonho Kong
5c3866cd71 Use fullpath in #include directives, add missing STL headers 2013-09-13 03:35:29 -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
Leonardo de Moura
26097475fd Use fullpath in #include directives.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-12 20:04:10 -07:00
Leonardo de Moura
c655e9fe7b Move sexpr_funcs to sexpr_fn. Using consistent file name conventions.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-12 18:27:46 -07:00
Leonardo de Moura
2e990ef7d3 Fix warnings
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-12 14:02:40 -07:00
Leonardo de Moura
bc69e7803f Add support for writing a[i] = v instead of a.set(i, v) in the pdeque class.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-12 11:18:26 -07:00
Leonardo de Moura
74b8a4f0ac Add support for writing a[i] = v instead of a.set(i, v) in the pvector class.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-12 11:12:02 -07:00
Leonardo de Moura
f972cc9aae Fix bugs in pvector. Improve test driver
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-12 11:01:40 -07:00
Leonardo de Moura
55ff49d2d5 Replace queue.h with pdeque.h
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-12 10:09:54 -07:00
Leonardo de Moura
cd5e45bae2 Reduce pvector delta_cell quota on reads. Add example that demonstrates why this is needed.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-12 08:28:24 -07:00
Soonho Kong
5858c9d5e0 Update tests/util/list.cpp to suppress a g++ warning 2013-09-12 01:39:04 -07:00
Leonardo de Moura
f7196e05ff Add 'persistent' vectors. We should use the same approach for queues.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-11 19:48:55 -07:00
Leonardo de Moura
ef0e0ad382 Add (optional) performance tests
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-11 19:48:55 -07:00
Leonardo de Moura
37498f9fb8 Add persistent queues
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-11 19:48:54 -07:00
Leonardo de Moura
3657320edb Add basic list functions
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-11 19:48:54 -07:00
Soonho Kong
3505ed8adb Use suppressions file to ignore certain valgrind warnings 2013-09-10 15:37:09 -07:00
Leonardo de Moura
6fe86ffefd Fix initialized memory error reported by Valgrind. Disable 2 tests that produce memory leaks due to a bug in g++.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-10 13:51:02 -07:00
Leonardo de Moura
1cee392483 Add light_checker: module for extracting the type of (fully elaborated) expressions. It is much faster than type_checker, which infers the type but also check whether the input is type correct or not.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-07 22:33:18 -07:00
Leonardo de Moura
33c4b44b2b Encapsulate context implementation. The current implementantion based on lists may be a performance problem in the future, and we should be able to change it without affecting the whole code base.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-07 11:15:11 -07:00
Leonardo de Moura
c674bb3790 Add castlib as an independent library
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-06 23:40:47 -07:00
Leonardo de Moura
7a9d53d0d7 Refactor arith libraries
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-06 23:19:47 -07:00
Leonardo de Moura
2459c4ae7c Add (optional) type to let declarations
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-06 10:06:26 -07:00
Leonardo de Moura
87d3961158 Improve elaborator error messages
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-04 16:36:58 -07:00
Leonardo de Moura
e955c054ca Modify type checker. Now, it only accepts builtin values that have been declared in the environment. The idea is to be able to track which classes of builtin values have been used in a given environment. We want to be able to quantify the size of the trusted code base for a particular development.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-04 08:30:04 -07:00
Leonardo de Moura
9f64e2b14b Fix another cdash warning
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-04 04:43:55 -07:00
Leonardo de Moura
6f3fa63ccb Add missing test
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-03 14:51:34 -07:00
Leonardo de Moura
a154f4e439 Modify Set command in the default lean frontend. Now, the lean prefix (for lean default frontend specific options) is optional when we are in the lean front-end.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-03 11:07:28 -07:00
Leonardo de Moura
a341643335 Fix unit tests for Windows
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-03 10:44:51 -07:00
Leonardo de Moura
544229e5d3 Create pp::unicode option. The idea is to be able to disable unicode characters, but still be able to use mixfix notation.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-03 10:11:45 -07:00
Leonardo de Moura
fd44ec8d79 Improve application type mismatch error messages
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-02 18:28:12 -07:00
Leonardo de Moura
b483d0dc45 Replace Int::sub and Real::sub with definitions
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-02 16:31:30 -07:00
Leonardo de Moura
0a67679afb Add natural numbers. Fix how coercions and overloads interact (switch to approach used in C++). Add notation for natural and integer arithmetic. Rename m and u universe variables to M and U.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-02 12:24:29 -07:00
Leonardo de Moura
db88920f81 Rename normalize and type_check to normalizer and type_checker (using a consistent naming convention)
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-02 08:43:38 -07:00
Leonardo de Moura
e8c09015ad Move elaborator to lean default frontend. It is getting too specific
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-01 18:22:24 -07:00
Leonardo de Moura
61a8fd16db Remove unnecessary files
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-01 14:57:08 -07:00
Leonardo de Moura
9d9f9797e4 Improve elaborator interface. Now, the metavariables are created inside the elaborator. The elaborator-user only needs to create placeholders. Motivaton: the placeholders are meaningful independently of the elaborator. On the other hand, the metavariables depend on the elaborator state.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-31 17:11:06 -07:00
Leonardo de Moura
2aac94f2e6 Refactor elaborator using new metavar library.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-30 01:25:06 -07:00
Leonardo de Moura
682df7699d Fix is_convertible propositions => type
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-30 01:24:06 -07:00
Leonardo de Moura
1f6943e3a4 Add head_reduce_mmv (reduction function modulo metavariables)
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-29 14:15:17 -07:00
Leonardo de Moura
2cf9ca9345 Add metavariable utilities. They will be used to refactor the elaborator.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-29 13:49:22 -07:00
Leonardo de Moura
01e4b4b7fe Add postprocessor functional object to the replace_fn template. Add unit-test that demonstrates how to build a replacer that builds a trace. The trace associates new expressions with the old ones that were used to create it.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-28 10:47:19 -07:00
Leonardo de Moura
cdab19b88c Simplify the elaborator
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-27 20:39:38 -07:00
Leonardo de Moura
8dacd97801 Remove obsolete commands. 2013-08-27 16:03:45 -07:00
Leonardo de Moura
85daaea8ce Rename get_exs in oper to get_deno
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-27 09:49:48 -07:00