Commit Graph

1707 Commits

Author SHA1 Message Date
Daniel Kroening 1c1d3c2574 remove path-symex and the symex tool 2017-09-14 17:03:25 +01:00
thk123 4bdd9c4ed6 Corrected regression makefile
The makefile was pointing at the wrong directory, which somehow didn't
cause a CI failure, this corrects that. In doing so realised that the
test was slightly inaccurate, so resolved this issue as well.
2017-09-14 11:22:05 +01:00
Thomas Kiley e54c0e9dcb Merge pull request #338 from thk123/bug/function-flag-on-goto-program
Cause a regeneration of the _start method if a --function is provided
2017-09-14 10:15:40 +01:00
reuk a46ad62985 Regenerate malformed binary blobs 2017-09-13 21:57:33 +01:00
Peter Schrammel 3ede81b963 Merge pull request #1293 from reuk/cmake-develop
Add CMakeLists alongside existing makefiles
2017-09-13 15:17:52 +01:00
thk123 e37d3d5fc0 Disable failing test in the symex directory 2017-09-13 14:52:03 +01:00
thk123 15b89fcf15 Weaked the tests for pointer-function-parameters
As we now regenerate the entry point, variable names have changed. This
means these tests don't fail for this.
2017-09-13 14:52:03 +01:00
thk123 1ccd1a2c86 Add support for using the --function flag to goto-analyze and symex
symex and goto-analyze (through the goto_modelt class) now support
setting the --function flag on precompiled .gb files.

Refactored out the function flag and its help function to
rebuild_goto_start_functions.

Used this extracted flag in goto-analyze, symex and CBMC.

Added tests that check both goto-analyze and symex when ran with the
--function flag actually generate the correct _start function. Also
added tests for when it isn't a precompiled binary. Added these new
folders to the overal test suite
2017-09-13 14:52:03 +01:00
thk123 71e6800e36 Added regression test for using --function on a GOTO program
Ensure that despite the prescence of a main method being compiled as the
entry point, we can still override it using --function in CBMC.
2017-09-13 13:37:04 +01:00
Peter Schrammel d45325cb94 Merge pull request #1378 from thk123/bugfix/fix-symex-appveyor
Bugfix/fix symex appveyor
2017-09-13 13:35:43 +01:00
thk123 af8d46f6f3 Reverting manually commited fixes 2017-09-13 10:32:28 +01:00
thk123 e73a884e26 Attempt to fix the symex appveyor build
Starting off by just making the Makefile look the same
2017-09-13 10:30:57 +01:00
Pascal Kesseli 0496142cd7 Account for replaced functions in exceptions_map
Invariant in `uncaught_exceptions_analysist::output` expects all
functions in the GOTO model to be present in the exceptions_map.
However, functions like __CPROVER_assert(...) get replaced by explicit
GOTO instructions and will not occur as function calls, thus not be in
the map.  This fix addresses this issue, which only occurs in a debug
output produced with -DDEBUG.
2017-09-13 11:15:01 +02:00
Daniel Kroening 2816b80de5 revert symex regression until Appvoyer works 2017-09-13 09:54:21 +01:00
Daniel Kroening 5d2d07bc00 enable symex regression testing 2017-09-12 13:01:35 +01:00
Daniel Kroening 430218f9cf option is now --trace 2017-09-12 10:46:29 +01:00
Daniel Kroening 211355d39f comments on test 2017-09-12 10:46:29 +01:00
Daniel Kroening 8fc714dfc1 use __CPROVER_assert 2017-09-12 10:46:29 +01:00
reuk f6e49683c9 Enable running tests from CMake 2017-09-11 14:29:12 +01:00
Michael Tautschnig 08a4077c10 Make the child process that failed to execvp exit
Previously the zombie child would continue on the same code path as the forking
parent. Hence one would see spurious "Remove failed" message as the zombie
child would try to perform the same file removal as the parent.
2017-09-08 09:39:11 +01:00
Michael Tautschnig 4928f69867 Diagnostic output if run/execve fails 2017-09-08 09:25:13 +01:00
Michael Tautschnig 5863a75aad Merge pull request #1333 from tautschnig/remove-c_sizeof
Remove c_sizeof and fix bugs that surfaced
2017-09-08 08:21:03 +01:00
Chris Smowton 1c8d81a681 Merge pull request #1356 from smowton/smowton/feature/test_pl_add_dry_run
Add dry-run mode to test.pl
2017-09-07 15:54:49 +01:00
Chris Smowton 296349c7e3 Add dry-run mode to test.pl
This gives [OK] status for tests that will be run and [SKIPPED] otherwise. Useful
for tools that want to inspect tests that ran / will run.
2017-09-07 12:35:46 +01:00
Michael Tautschnig 3613ebca0a When possible, update array types before typechecking initializer
This fixes a bug in compiling a Linux kernel driver.
2017-09-07 12:01:58 +01:00
Michael Tautschnig 3273bf5b97 Fix type casts from initializer lists to arrays of unspecified size 2017-09-07 12:01:58 +01:00
Michael Tautschnig 1fa569fd17 sizeof(*(void*)) is sizeof(char) 2017-09-07 12:01:58 +01:00
Daniel Kroening 8425bf4bb5 Merge pull request #970 from diffblue/pointers-with-width
Pointers get a width
2017-09-07 08:49:23 +01:00
Daniel Kroening f72b7fce2f pointer_typet now requires a width 2017-09-06 18:10:54 +01:00
Michael Tautschnig 24be89c7bb fixup! simplify \'not exists\' to the form of \'forall not\' 2017-09-06 13:49:59 +01:00
Michael Tautschnig 191f371980 fixup! a right place to implement the quantifier handling. 2017-09-06 13:49:59 +01:00
Michael Tautschnig d5db0bc087 fixup! added a test case for combination use of forall/exists/not. 2017-09-06 13:49:59 +01:00
Michael Tautschnig fd5692102c fixup! Fix and run cbmc-cover tests 2017-09-06 13:49:59 +01:00
Michael Tautschnig 59c882b408 Merge pull request #1294 from diffblue/goto-gcc-fix
fix verbosity in goto-gcc
2017-09-05 08:12:05 +01:00
Michael Tautschnig dd5adf7880 Properly prepare goto model for (reachability) slice
1. remove_returns must always be called after removing function pointers.
2. reachability_slice requires function pointer removal.
2017-09-04 17:06:30 +01:00
Daniel Kroening 433e139fea Fix verbosity in goto-gcc 2017-09-04 15:10:32 +01:00
Michael Tautschnig 3947228301 Do not overwrite non-zero return codes
Failure in calling the native compiler must not be masked by a later successful
call to "remove". Follow-up fix to 2655d9861.
2017-09-04 14:35:38 +01:00
Kareem Khazem 85521b0263
goto-gcc reads definitions from linker scripts
goto-gcc now runs the ls_parse.py script whenever the target codebase is
being compiled with a custom linker script (specified with the -T
option). goto-gcc then synthesizes the linker script definitions that
ls_parse reported, and adds them to the goto-program as if those
definitions were defined in the target C program rather than the linker
script.

This solves a problem where the values of some C variables are
inaccessible from CBMC because those variables are defined in the linker
script rather than the C codebase. It also solves the problem of CBMC
not knowing what memory regions are accessible to the C program, again
because the memory regions are declared to be valid in the linker
script.

This commit also introduces three tests for this functionality.

This commit also fixes a small bug in ls_parse.py that made it reject
some valid linker scripts.
2017-09-04 11:39:32 +01:00
Kareem Khazem ede380f94a
goto-gcc removes CPROVER macros for native gcc
Input programs containing __CPROVER_assume, __CPROVER_assert etc. can
now be compiled with goto-gcc as well as goto-cc. Previously, the
system compiler would complain about missing function bodies for all of
these CPROVER macros.
2017-09-04 08:25:42 +01:00
Daniel Kroening 165ec479bc Test alignment of unions 2017-09-02 09:38:55 +01:00
Daniel Kroening 6c56f1981e Do not attempt to compute union sizes when not required
Packed unions/structs without alignment specification may use fields of
dynamic size. It is then unnecessary to compute their full size as it
would never be used anyway.
2017-09-02 09:38:55 +01:00
Peter Schrammel 052c14984c Merge pull request #1255 from peterschrammel/bugfix/java-unambiguous-basic-blocks
Improve bytecode-instrumentability of basic blocks
2017-09-01 18:04:46 +01:00
Michael Tautschnig e8e16770a5 dump-c: output a generated environment via --harness
dump-c previously would not print __CPROVER__start code as this is deemed
tool-internal. With increasing support for test-harness construction, the
harness code may be of interest to users, who may wish to tweak and use re-use
it.
2017-09-01 14:22:50 +01:00
Peter Schrammel b6ef688a41 Fix and run cbmc-cover tests 2017-09-01 13:58:12 +01:00
Peter Schrammel e54bc4765e Tests for unique java bytecode instrumentation selection 2017-09-01 13:58:12 +01:00
Michael Tautschnig 4be7685978 Do not add an "l" prefix to double constants when double==long double 2017-09-01 11:03:53 +01:00
Romain Brenguier 9a8c063036 Setting string-max-length for several tests
Cbmc can potentialy run out of memory if no maximum string length is
set. This happens more often with the new version of check axioms
because a concretization step is made to be more precise in the check.
2017-08-29 10:28:04 +01:00
Peter Schrammel 225e257b76 Merge pull request #1239 from reuk/virtual-function-unwinding
Add test showing infinite unwinding
2017-08-23 20:33:22 +01:00
Peter Schrammel a4f29adced Regression tests for pointer-to-member conversion 2017-08-23 12:15:22 +01:00
reuk a4fa59c773 Add test showing infinite unwinding
Implements changes suggested by @thk123.
2017-08-23 09:26:46 +01:00