about summary refs log tree commit diff homepage
AgeCommit message (Collapse)Author
2017-07-21Release notes for 1.4.0 v1.4.0 1.4.xCristian Cadar
2017-07-20Switching version to 1.4.0Cristian Cadar
2017-07-20Merge pull request #657 from delcypher/vectorized_instructionsCristian Cadar
Implement basic support for vectorized instructions.
2017-07-20Replace assertions of types on LLVM instructions in the Executor with aDan Liew
pass that checks these assertions. This improves several things. * This pass provides more friendly messages than assertions in that it just emits a warning and carries on checking the rest of the instructions. * The takes the checks outside of the Executor's hot path and so avoids checking the same instruction multiple times. Now each instruction is only checked once just before execution starts. The disadvantage of this approach is the check for invariants we expect to hold have been pulled far away from where we expect them to hold. After discussion with @ccadar and @MartinNowack it was decided we will take this hit to readability for better performance and simpler code in the Executor.
2017-07-20Merge pull request #673 from jirislaby/llvm40_WallTimerMartinNowack
Core: TimingSolver, use WallTimer
2017-07-20Core: TimingSolver, use TimerStatIncrementerJiri Slaby
Do not opencode what we already have in TimerStatIncrementer. This simplifies the code a lot and makes transition to LLVM 4.0 a lot easier. Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2017-07-20Merge pull request #704 from ccadar/TreeStreamAndrea Mattavelli
Fixes bug in TreeStreamWriter::write reported by @gladtbx in #562. A…
2017-07-19Added some unit tests for TreeStream: one testing some basic behaviour, the ↵Cristian Cadar
other a regression test for #562
2017-07-19Implement basic support for vectorized instructions.Dan Liew
We use LLVM's Scalarizer pass to remove most vectorized code so that the Executor only needs to support the InsertElement and ExtractElement instructions. This pass was not available in LLVM 3.4 so to support that LLVM version the pass has been back ported. To check that the Executor is not receiving vector operand types that it can't handle assertions have been added. There are a few limitations to this implementation. * The InsertElement and ExtractElement index cannot be symbolic. * There is no support for LLVM < 3.4.
2017-07-19Fixes bug in TreeStreamWriter::write reported by @gladtbx in #562. Also ↵Cristian Cadar
removes commented out code from that function.
2017-07-18Use assembly line for printing debug informationMartin Nowack
Instead of using an id, use the assembly line number executed
2017-07-18Merge pull request #672 from jirislaby/llvm40_static_castsAndrea Mattavelli
llvm: get rid of static_casts from iterators
2017-07-17Merge pull request #700 from andreamattavelli/fix_travis_macosCristian Cadar
Added caching of Homebrew downloads
2017-07-16Added caching of Homebrew downloadsAndrea Mattavelli
2017-07-08Corrected comment of Z3Solver classAndrew Santosa
2017-06-16move module loading into external functionJörg Thalheim
- having an explicit function which is defined for multiple llvm versions separately increases readability. - also: error handling was simplified - Personal motivation: being able to use this functionality in unit tests fixes #561 related to #656
2017-06-16llvm37: introduce type for PassManagerJiri Slaby
In LLVM 3.7, PassManager was moved to the legacy:: namespace. Introduce a type for it and use it in the code. Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2017-06-16Added location info for external calls and improved a message.Cristian Cadar
2017-06-15Merge pull request #680 from jirislaby/llvm37_dilocCristian Cadar
llvm37: do not copy DILocation to getDSPIPath
2017-06-15llvm37: do not copy DILocation to getDSPIPathJiri Slaby
DILocation is not copyable in LLVM 3.7. So, pass it as reference and make it const given we do not write to it. Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2017-06-15llvm: get rid of static_casts from iteratorsJiri Slaby
In commit b7a6aec4eeb4 (convert iterators using static_cast), I switched all implicit casts to static_cast. It turned out that llvm 4.0 banned casting via static_cast. See e.g. 1e2bc42eb988 in the llvm repo what they do. So similarly to the above commit, change all the casts of iterators to "&*" which is what they do in LLVM. Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2017-06-12llvm: don't use clEnumValEnd for LLVM 4.0Jiri Slaby
It became unnecessary when defining options and mainly undefined. So introduce KLEE_LLVM_CL_VAL_END as suggested by @delcypher. Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2017-06-08Merge pull request #675 from ccadar/varargsAndrea Mattavelli
Fixed typos in comments related to vararg support.
2017-06-08Merge pull request #667 from andreamattavelli/fix_macos_varargCristian Cadar
Removing flaky test Vararg.c from Darwin build until we find a proper…
2017-06-08Fixed typos in comments related to vararg support.Cristian Cadar
2017-06-07Prevent test failure when realloc fails in test/Feature/Realloc.cAndrew Santosa
2017-06-07llvm: rename ExitOnError to OptExitOnErrorJiri Slaby
ExitOnError collides with llvm::ExitOnError from LLVM 4: tools/klee/main.cpp:430:23: error: reference to 'ExitOnError' is ambiguous if (errorMessage && ExitOnError) { ^ /usr/include/llvm/Support/Error.h:938:7: note: candidate found by name lookup is 'llvm::ExitOnError' class ExitOnError { ^ klee/tools/klee/main.cpp:141:3: note: candidate found by name lookup is '(anonymous namespace)::ExitOnError' ExitOnError("exit-on-error", ^ 1 error generated. Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2017-06-05Merge pull request #665 from delcypher/fix_long_double_gcc7Andrea Mattavelli
Fix test failure on systems with libstdc++ corresponding to gcc7.
2017-06-05Removing flaky test Vararg.c from Darwin build until we find a proper fixAndrea Mattavelli
2017-06-05Fix test failure on systems with libstdc++ corresponding to gcc7.Dan Liew
This fixes #664. As reported by @jirislaby the `test/Feature/LongDouble.cpp` test fails to compile with Clang 3.4 due to new changes the libstdc++ headers. This ends up giving errors like ``` In file included from /home/abuild/rpmbuild/BUILD/klee-1.3.0+20170409/test/Feature/LongDouble.cpp:12: In file included from /usr/bin/../lib64/gcc/x86_64-suse-linux/7/../../../../include/c++/7/cstdlib:77: /usr/bin/../lib64/gcc/x86_64-suse-linux/7/../../../../include/c++/7/bits/std_abs.h:101:3: error: unknown type name '__float128' __float128 ^ /usr/bin/../lib64/gcc/x86_64-suse-linux/7/../../../../include/c++/7/bits/std_abs.h:102:7: error: unknown type name '__float128' abs(__float128 __x) ^ 2 errors generated. ``` Clang 4.0 seems fine with this source file so the problem has already been addressed upstream so we don't need to file a bug. We just need to move to a newer LLVM version to fix this properly! To work around this the test has been made into a C program rather than a C++ program to avoid including the C++ headers. The program wasn't using any important C++ features anyway so this seems like a sensible change.
2017-06-02hide backend solver declarations from public includeHoang M. Le
2017-06-02replace handleMetaSMT() with klee::createMetaSMTSolver() and move it into ↵Hoang M. Le
MetaSMTSolver.cpp so that the backend headers only need to be included once there
2017-06-01[Z3] Remove unused include.Dan Liew
2017-06-01[Z3] Add `-debug-z3-verbosity=<N>` option which behaves like Z3's `-v:<N>` ↵Dan Liew
option. This lets us see what Z3 is doing execution (e.g. which tactic is being applied) which is very useful for debugging.
2017-06-01[Z3] Switch from `Z3_mk_simple_solver()` to `Z3_mk_solver()`.Dan Liew
My discussions [1] with the Z3 team have revealed that `Z3_mk_simple_solver()` is the wrong solver to use. That solver basically runs the `simplify` tactic and then the `smt` tactic. This by-passes Z3's attempt to probe for different logics and apply its own specialized tactic. Using `Z3_mk_solver()` should be closer to the behaviour of the Z3 binary. This partially addresses #653. We still need to try rolling our own custom tactic. [1] https://github.com/Z3Prover/z3/issues/1035
2017-06-01[Z3] In `getConstraintLog()` use a separate builder from that of theDan Liew
solver. This is to avoid tampering with the cache of the builder the solver is using.
2017-06-01[Z3] Implement API logging.Dan Liew
Add `-debug-z3-log-api-interaction` option to allow Z3 API calls to be logged to a file. The files logged by this option can be replayed by the `z3` binary (using its `-log` option). This is incredibly useful because it allows to exactly replay Z3's behaviour outside of KLEE.
2017-06-01[Z3] Add option to manually validate Z3 models.Dan Liew
This can be enabled by passing the command line option `-debug-z3-validate-models`. Although Z3 has a global parameter `model_validate` (off by default) I don't trust it so do the validation manually. This also means we can potentially do validation on a per Z3Solver instance basis rather than globally. When failing to validate a Z3 model the solver state and model are dumped to standard error.
2017-06-01[Z3] Add the `-debug-z3-dump-queries=<path>` command line option. ThisDan Liew
is useful for getting access to the constraints being stored in the Z3 solver in the SMT-LIBv2.5 format.
2017-06-01Refactor file opening code out of `main.cpp` and intoDan Liew
`klee_open_output_file()` function so that it can be used by the Z3Solver.
2017-06-01[Z3] Move the `dump()` methods of the Z3NodeHandle<> specializationsDan Liew
into `Z3Builder.cpp` so they can be called from in gdb.
2017-06-01[Z3] Add assertions in Z3 builder to catch underflow with bad widths.Dan Liew
2017-06-01[Z3] Support another solver failure reason that Z3 might give. I'm goingDan Liew
to guess it means timeout but I'm not 100% sure about this.
2017-05-30Merge pull request #655 from Mic92/loggingCristian Cadar
Fixed some KLEE messages and added build to .gitignore
2017-05-26gitignore buildJörg Thalheim
2017-05-24Rearchitect ExternalDispatcherDan Liew
Previous changes for LLVM 3.6 using the MCJIT were incredibly hacky. Those changes required creating and destroying the ExternalDispatcher for every call to an external function. This is really bad * It's very poor design. The Executor should not need to know about the internal implementation details of the ExternalDispatcher. * It's likely very inefficient to keep creating and destroying the external dispatcher. The new code does several things. * Moves all of the implementation details into a `ExternalDispatcherImpl` class so that implementation details are not exposed in `ExternalDispatcher.h`. * When using the MCJIT a module is compiled for every (instruction, function) tuple. This is necessary because the MCJIT compiles whole modules at a time and once a module is compiled it cannot be modified and re-compiled. Doing this means we get to reuse already generated code for call sites which hopefully will reduce the overhead of repeatedly executing the same call site. A consequence of this change is that now the dispatcher function name needs to be unique across all modules. To do this we just append the module name because we guarantee that the module name is unique by construction. The code has also been clang-formatted.
2017-05-24travis CI: add LLVM 3.5 and 3.6 testsJiri Slaby
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2017-05-24llvm: make KLEE compile against LLVM 3.5 and 3.6Richard Trembecký
Based on work by @ccadeptic23 and @delcypher. Formatting fixed by @snf. Fix compiler warning by @martijnthe. Further fixes by @mchalupa. Refactored, so that changes can be reviewed -- no massive changes in whitespace and in the surrounding code. Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2017-05-24Remove redundant KLEE prefix while loggingJörg Thalheim
2017-05-23[TravisCI] Try to unbreak the build against upstream STP.Dan Liew
It seems there are have been quite a few changes upstream that change the way CMake is invoked. There doesn't seem to be any good reason for doing this.