Commit graph

1860 commits

Author SHA1 Message Date
Leonardo de Moura
02f621aa45 test(lazy_list): add more tests
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-29 14:38:35 -07:00
Soonho Kong
80c282d0a3 chore(travis): do not use c++filt on Linux builds
There is a bug in c++filt on Linux. For instance,

    c++filt -t 355687428096000

causes a segmentation fault.
2013-09-29 13:27:32 -07:00
Leonardo de Moura
3c8dff9085 feat(lazy_list): implement ML-like lazy lists
We will use lazy lists to represent the set of solutions produced by the elaborator. The elaborator plugins will also use lazy lists.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-29 12:35:26 -07:00
Soonho Kong
58e2ec331c chore(travis): use c++filt to handle demangled c++ names 2013-09-28 23:38:22 -07:00
Soonho Kong
841a1fb20c fix(debug): print type in lean_assert, print bool correctly
- use typeinfo to print out a type of value when an assertion fails.
   need to use "c++filt --types" to demangle names for non-basic types.
 - use std::boolalpha and std::noboolalpha to control the printed values
   for "true" and "false"
2013-09-28 23:38:21 -07:00
Soonho Kong
4602dfd209 test(util/numerics): more tests to improve coverage 2013-09-28 23:38:17 -07:00
Soonho Kong
d3c2d2da5f doc(automatic_builds): add how to prevent a build on Travis-ci
[skip ci]
2013-09-28 13:40:41 -07:00
Soonho Kong
d48ec2ddfa chore(travis): fix git-commit-msg extraction
[skip-ci]
2013-09-28 13:33:13 -07:00
Soonho Kong
fb3635a9ef test(util/numerics/mpbp): add more tests for improving coverage 2013-09-28 01:01:52 -07:00
Soonho Kong
6519d4bb0f chore(memcheck.supp): generalize TCmalloc_Bug2 pattern
to suppress a warning from MSR 32bit build
[skip-ci]
2013-09-27 19:16:02 -07:00
Soonho Kong
db6e0ce319 chore(travis): set stack size as unlimited before run valgrind 2013-09-27 19:05:23 -07:00
Soonho Kong
f1407d501a chore(travis): fix testcov problem 2013-09-27 17:56:33 -07:00
Soonho Kong
0ce089b942 chore(travis): push all linux builds to cdash 2013-09-27 17:56:33 -07:00
Soonho Kong
3527babfee chore(travis): use consistent build name
- have build name is in the form of
       "<BRANCH>_<CXX_COMPILER>_<BUILD_TYPE>(_TC)?"
   to have consistency over time.
 - have "Generator" field in cdash XMLs which is in the form of
        "<GIT_COMMIT>###<GIT_SUBJECT>"
   it will be displayed as a small mouseover-text.
2013-09-27 12:22:44 -07:00
Soonho Kong
0065d69e0a chore(build): put --coverage CXX_FLAGS for TESTCOV build 2013-09-27 10:24:31 -07:00
Leonardo de Moura
d2667d56c0 test(lean/parser): add more tests for improving coverage
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-27 09:59:50 -07:00
Leonardo de Moura
0ff69d28f3 test(lean/scanner): add more tests for improving coverage
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-27 09:59:50 -07:00
Leonardo de Moura
6fc177056e refactor(tests/frontends/lean): use consistent name convention for file names
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-27 09:59:50 -07:00
Soonho Kong
29664ea088 doc(coverage): add instructions for lcov-1.10
[skip-ci]
2013-09-27 09:27:37 -07:00
Soonho Kong
6a0d211d54 test(fo_match): add more unittests
[skip ci]
2013-09-27 01:53:42 -07:00
Soonho Kong
285495313b refactor(rewrite): use scoped_map as a type of substitution 2013-09-27 01:45:22 -07:00
Soonho Kong
1d4a1b68f5 refactor(fo_match): use scoped_map 2013-09-27 01:44:05 -07:00
Soonho Kong
6307beedc9 feat(scoped_map): add operator<< to scoped_map for debugging 2013-09-27 01:42:11 -07:00
Soonho Kong
a05b6b476e fix(testcov): install lcov and include testcov only when it's on 2013-09-26 22:24:24 -07:00
Soonho Kong
6abb7bf2ff chore(testcov): add missing CodeCoverage.cmake 2013-09-26 21:26:52 -07:00
Soonho Kong
11ce300b1d doc(coverage): update instructions for code coverage
[skip ci]
2013-09-26 20:51:59 -07:00
Soonho Kong
3a5a565594 feat(splay_map): add operator<< to splay_map for debugging 2013-09-26 20:44:20 -07:00
Soonho Kong
5e5087b0a3 chore(testcov): add compile target "cov" to run code-coverage locally
- need to run cmake with "-DTESTCOV=ON" and "-DCMAKE_BUILD_TYPE=Debug"
 - type "make/ninja cov"
 - open "coverage/index.html" to check the code coverage
2013-09-26 20:28:52 -07:00
Leonardo de Moura
9d8ff0eadb test(mpz): add unit tests for mpz
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-26 20:01:39 -07:00
Leonardo de Moura
5cce74d116 test(library): add tests for improving coverage
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-26 19:43:10 -07:00
Soonho Kong
60157aa92a fix(splay_map): add 'const' to coersion operator of ref class
[skip ci]
2013-09-26 19:09:37 -07:00
Leonardo de Moura
54e63fd4de feat(splay_tree): add fold and for_each templates for splay_tree and splay_map
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-26 18:18:20 -07:00
Leonardo de Moura
1aca1d2d77 refactor(list): improve append function
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-26 18:18:20 -07:00
Leonardo de Moura
24c173a519 feat(debug): add assert_ne (not equal) macro
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-26 18:18:20 -07:00
Leonardo de Moura
d7ed1560a9 feat(name_generator): add name_generator for unique names modulo a prefix
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-26 18:18:06 -07:00
Leonardo de Moura
e5d312dc18 fix(kernel): the hash code of expressions was not being used to compare them
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-26 08:41:20 -07:00
Leonardo de Moura
19f4554145 test(exception): add tests for improving coverage
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-26 08:35:13 -07:00
Leonardo de Moura
a24dbc3527 test(buffer): add tests for improving coverage
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-26 08:35:13 -07:00
Soonho Kong
bc31322a78 chore(memcheck): add another memcheck.supp entry for tcmalloc bug
suppress a valgrind warning we had on "normalizer" testcase (only with g++-4.8.1)
2013-09-26 00:49:43 -07:00
Soonho Kong
a2a5a77a44 fix(memory): increase memory counters by the actual size of reallocated memory
On OSX, we had a test failure on memory module. The problem was in
the realloc function (line 38):

    void * realloc(void * ptr, size_t sz) {
        size_t old_sz = malloc_size(ptr);
        g_global_memory.dec(old_sz);
        g_global_memory.inc(sz);
        g_thread_memory.dec(old_sz);
        g_thread_memory.inc(sz);
        void * r = realloc_core(ptr, sz);
        if (r || sz == 0)
            return r;
        else
            ...

The size of r could be bigger than sz. For instance,

    |ptr| = 40 but |r| = 48

In the current code, here we only increase counters by 40.
But later when we free it, we decrease them by 48, and this
caused the problem, underflow of an unsigned counter in
g_global_memory.
2013-09-26 00:33:56 -07:00
Leonardo de Moura
4bae715350 fix(memory): disable problematic test when tcmalloc is used
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-25 22:39:49 -07:00
Leonardo de Moura
c00534209a test(splay_map): add tests for improving code coverage
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-25 22:12:49 -07:00
Leonardo de Moura
98b4e09063 refactor(kernel): simplify expr_eq
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-25 22:09:08 -07:00
Leonardo de Moura
23e2f72f42 test(list): add tests for improving code coverage
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-25 22:04:24 -07:00
Leonardo de Moura
db4e5ab0ad feat(expr_lt): improve expr_lt performance by using hash codes, and add more tests
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-25 21:59:58 -07:00
Leonardo de Moura
6477708d78 refactor(debug): improve lean_unreachable(), now we can avoid 'fake' return statements
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-25 21:27:20 -07:00
Leonardo de Moura
a7707dd669 test(bit_tricks): add tests for log2 2013-09-25 20:58:01 -07:00
Leonardo de Moura
44a16cab6a test(exception): add new tests exception and parser_exception
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-25 20:57:53 -07:00
Leonardo de Moura
87e749cd12 test(trace): add unit test for trace module
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-25 20:30:05 -07:00
Leonardo de Moura
e16f45854b refactor(deep_copy): simplify deep_copy implementation, and move unit test to separate file
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-25 20:25:24 -07:00