Commit Graph

1234 Commits

Author SHA1 Message Date
Daniel Kroening 8161f100fd make some --cover tests easier to pass 2017-02-22 11:48:07 +00:00
Daniel Kroening 0e2f389b27 Merge pull request #376 from tautschnig/lint-cleanup
Code cleanup to increase cpplint-cleanliness
2017-02-17 16:53:33 +00:00
Michael Tautschnig 27d8c44605 Move loop accelaration regression test handler to suitable place 2017-02-14 18:59:20 +00:00
thk123 9b052c200f Modified tests to pass without using grep
Now directly test individual lines with perls regex matching rather than
calling out to grep. Some changes were required:

- escape (,  ) if we want to match them
- unescape (, ) if we want to use them as regex bracket groups
- escape +, $ if we want to use them as actual characters
- unescape + to use as a regex +
2017-02-14 17:29:15 +00:00
thk123 ebe4a7fe54 Revert "If not multi line, use old grep system"
This reverts commit 7cdc14100e.
2017-02-14 10:56:16 +00:00
thk123 a172ce0fe1 If we run test.pl with -K we check the known bugs fail
Added this step to the test-script makefile as this has behaviour that
should fail the test (since it is testing the test.pl)
2017-02-13 17:08:47 +00:00
thk123 7cdc14100e If not multi line, use old grep system
To ensure existing tests continue to behave consistently, we continue to
use the external grep if the multi-line flag is not present.
2017-02-13 17:08:44 +00:00
thk123 eba97a0a41 Made the Perl script not using grep
Includes tests for excluded lines and multi lines.

Includes tests that the test runner should fail, these are set as KNOWNBUG
so we can run the regressions folder.

We also don't print out when grep options activated as  no chance of doing
by accident as very clearly different to any other syntax. The printing
messes up the formatting of the output so better to not have it.

Added test script to the Makefile

Also ordered the tests into alphabetical orde.r
2017-02-13 17:08:13 +00:00
Daniel Kroening 6e94c414e2 Merge pull request #312 from tautschnig/dirty-variables
Treat local dirty variables as shared ones
2017-02-09 21:40:18 +00:00
Daniel Kroening 12c051b323 Merge pull request #517 from diffblue/gcc-errors2
gcc-style error messages
2017-02-09 21:38:45 +00:00
Daniel Kroening 0d86b46c10 gcc-style error messages 2017-02-09 17:04:34 +00:00
Daniel Kroening 66ece0560a Merge pull request #518 from lucasccordeiro/regression-full-slice
fixed test description of slice02; Closes #515
2017-02-09 10:57:03 +00:00
Daniel Kroening 0b8b1bc4a0 Merge pull request #503 from mgudemann/fix_remove_static_init_non_java_functions
ignore non-Java files in enum static init unwind
2017-02-09 10:50:04 +00:00
Lucas Cordeiro 0e93141663 fixed test description of slice02
Signed-off-by: Lucas Cordeiro <lucasccordeiro@gmail.com>
2017-02-09 10:15:28 +00:00
Daniel Kroening 12a79ab195 Merge pull request #511 from danpoe/loop-unwinding-fix
Fix adjustment of goto targets in the loop unwinder
2017-02-08 19:13:33 +00:00
Daniel Kroening 6cffb453c1 Merge pull request #479 from lucasccordeiro/regression-full-slice
Added regression tests for checking the full-slice option
2017-02-08 19:12:13 +00:00
Daniel Poetzl 1dee876c50 Fix adjustment of goto targets in the loop unwinder 2017-02-07 19:17:33 +00:00
Peter Schrammel 8c31951365 Merge pull request #404 from smowton/shorten_virtual_dispatch_tables
Shorten virtual dispatch tables
2017-02-07 15:53:40 +00:00
Lucas Cordeiro e823d4b889 moved full-slice test cases from cbmc to goto-instrument
Signed-off-by: Lucas Cordeiro <lucasccordeiro@gmail.com>
2017-02-06 16:01:08 +00:00
Matthias Güdemann 26f0976f72 ignore non-Java files in enum static init unwind
To correctly unwind static inits of Java enums, one first has to check whether
the function is actually a Java function. This patch also adds a first
regression test for static loop unwinding.

Fixes: b49a7fc3a3
2017-02-06 14:03:42 +01:00
Peter Schrammel ba874a44dc Merge pull request #339 from smowton/improve_array_bounds_checks
Improve array bounds checks
2017-02-05 13:38:16 +00:00
Daniel Kroening 53d89b13b8 Merge pull request #490 from smowton/use_remove_instanceof
Use remove instanceof
2017-02-03 21:32:03 +00:00
Pascal Kesseli 3e40add6c7 Removed zip package
Removed temporary zip file.
2017-02-03 13:21:22 +00:00
Chris Smowton be331e5fdb Add instanceof test cases
The first five of these are split up pieces of the existing
instanceof1, and the final two are new.

The first three (testing array and primitive classids) don't
work at present; those dealing with ordinary reference types (3-7)
do.
2017-02-03 10:34:42 +00:00
Peter Schrammel def72f4fe2 Merge pull request #474 from thk123/bug/const-struct-symbols
Keep track of qualifiers for structs and unions
2017-02-03 10:23:30 +00:00
Chris Smowton 48f03aa5d6 Add test for vtable abbreviation
Also amend virtual6 whose expected results are now
slightly different.
2017-02-02 12:51:33 +00:00
Chris Smowton 260c8ec993 Make test more tolerant of formatting differences
Side-effect of the virtual function table abbreviation code was
to give a callsite a more expressive source_location than before.
2017-02-02 12:51:33 +00:00
Michael Tautschnig 867f748b13 Limit dereferencing checks to actual access size
For member accesses, access to other components need not be valid as
shown in the included regression test Malloc23.

Also do not require --bounds-check for full dereferencing checks.

Fixes #219.
2017-02-01 10:36:32 +00:00
Chris Smowton 0f53d144f2 Check static array bounds of dynamic objects
Previously checking against malloc bounds and against statically-bounded arrays (e.g. int[2]) were mutually exclusive. This enables the static array bounds check even for dynamic objects.

Fixes #239.
2017-02-01 10:26:42 +00:00
Daniel Kroening 63f91825bb Merge pull request #461 from tautschnig/build-system
Support vpath builds and use them for coverage measurement
2017-01-31 17:22:50 +00:00
Daniel Kroening 73635f0cb7 Merge pull request #447 from tautschnig/no-gen_zero
Remove gen_zero/gen_one
2017-01-31 00:02:51 +00:00
Daniel Kroening 46e0b9f06b Merge pull request #403 from smowton/find_scopes_for_anonymous_variables
Find scopes for anonymous variables
2017-01-31 00:00:42 +00:00
Pascal Kesseli 7a6cec1dd0 Added check for div by zero in CEGIS control rational back end.
Rational back-end was liable to div by zero in its GOTO programs at
various precision. Fixed this using an explicit check.
2017-01-30 14:54:25 +00:00
Lucas Cordeiro 3613ef9293 Added regression tests for full-slice option
Added 18 tests cases extracted from the literature
on program slicing in order to test the full-slice option
2017-01-27 13:51:54 +00:00
Michael Tautschnig cf06f353d1 cbmc-java: Print details of errors in regression tests
This is the same as various other directories already do.
2017-01-27 10:50:49 +00:00
thk123 0befb9d384 Added tests for different cases
Added cases for union types, for anonymous structs and for volatile
variables (as opposed to const variables). Also added test for verifying
the dump C output
2017-01-27 10:48:50 +00:00
thk123 286a19dca1 Correcting test and adding to the suite
The known bug related to this issue was checking the output was wrong,
so made it check the correct output. Since it is now fixed, swapped it
from KNOWNBUG to CORE.
2017-01-27 10:48:49 +00:00
Michael Tautschnig 5c29567cd5 Use vpath builds for coverage measurement
This avoids full clean & recompile on each run.
2017-01-25 22:06:46 +00:00
Michael Tautschnig f56466c65d Treat local dirty variables as shared ones
Also make goto_symex_statet decide what is shared, no needless (and now
broken) wrapper functions.
2017-01-25 21:10:32 +00:00
Matthias Güdemann 669a5b0bb5 adapt NullPointer2 regression test 2017-01-25 21:32:45 +01:00
Matthias Güdemann f36dcae70f adapt NullPointer[1-4] regression tests 2017-01-25 21:15:04 +01:00
Chris Smowton dc0b1fa75f Add address space size limit regression test 2017-01-25 11:48:53 +00:00
Daniel Kroening f488acdc5c Merge pull request #393 from smowton/improve_remove_virtual_functions_master
Improve remove virtual functions
2017-01-24 20:42:11 +00:00
Chris Smowton b3b268313a Add test for anonymous local scoping
This creates three source-level variables that are
notionally live for the whole function, but then uses
the function's dominator tree information to show that
they actually have disjoint scopes. Similarly the
temporary used to hold a new instance between creation
and assignment to a local variable should be given
a bounded scope.
2017-01-24 13:50:54 +00:00
Daniel Kroening c13164c909 Merge pull request #468 from tautschnig/jar-tests
Make JAR/zip support optional in regression tests
2017-01-23 18:00:14 +00:00
Michael Tautschnig 77d4119612 Make JAR/zip support optional in regression tests
With cbmc-java regression tests enabled by default, the absence of
optional JAR/zip file support should not cause regression tests to fail.
2017-01-23 17:34:27 +00:00
Pascal Kesseli e07ed1bc33 Fixed nondet returns in benchmark
Benchmark contained unused, nondet return values which caused an assertion
violation in remove_returns.cpp.
2017-01-23 17:06:38 +00:00
Pascal Kesseli 06942bbf24 Fixed CEGIS control vector solution nondet
Nondet was added too late in _start, leading to a new nondet solution at
each CEGIS counterexample loop iteration. The bug was not present in the
verification phase, hence any solution produced by this was still sound.
However, this severely affects CEGIS' ability to find adequate solutions
and worst case leads to a "same counterexample" assertion violation.
2017-01-23 16:04:45 +00:00
Chris Smowton ab066ea2dc Enable Java regression tests
The primary `make test` goal now also runs the cbmc-java
test subdirectory.
2017-01-23 15:11:15 +00:00
Chris Smowton deebd01636 Fix package_friendly1 test
This used to check for an interface method getting added
as a goto function, which doesn't happen anymore.
2017-01-23 15:11:15 +00:00