Commit Graph

20015 Commits

Author SHA1 Message Date
Daniel Poetzl f94ba36daa Remove entries about library code from lcov coverage file
Previously coverage data about header files from the C++ library (in /usr) was
included in the lcov coverage report. We want to exclude these files as we are
only interested in coverage of cprover code and excluding library code also
gives a more accurate percentage of overall coverage.
2019-08-05 20:50:36 +01:00
Daniel Poetzl 9ed67738c1 Fix up environment variables in codebuild codecov cmake build
Correctly set the environment variables VCS_COMMIT_ID and VCS_PULL_REQUEST which
are used by the codecov bash script to commit coverage data to codecov and
associate it with the correct commit/PR.
2019-08-05 20:50:36 +01:00
Daniel Poetzl 3cdee5283d Simplify codecov make and cmake configuration
Do not apt install unneeded packages, and commit coverage data even when the
build was not initiated by github.
2019-08-05 20:49:19 +01:00
Michael Tautschnig 0a990c7b7e
Merge pull request #4782 from pkesseli/bugfix/remove-legacy-id
Remove unused local variable
2019-08-05 19:40:36 +01:00
Michael Tautschnig 6e9cb39b5a
Merge pull request #4969 from tautschnig/quantifier-renaming
goto-symex must not lift lets with bound variables
2019-08-05 18:45:55 +01:00
Pascal Kesseli 07ad7cd49b Remove unused local variable
Unused legacy `main_identifier` can be removed.
2019-08-05 19:40:34 +02:00
Michael Tautschnig 602e2e8db9
Merge pull request #4953 from JohnDumbell/jd/feature/string_refine_memory_explosion
Stop sharing removal on refine-strings expression walk
2019-08-05 09:23:14 +01:00
Michael Tautschnig 2e22f5ceef
Merge pull request #4934 from diffblue/get_quantifier_var_min_signature
use optionalt in get_quantifier_var_max/min
2019-08-05 07:43:19 +01:00
Michael Tautschnig 6a59317e57
Merge pull request #4981 from diffblue/simplify-opX
fix exprt::opX accesses in simplifier
2019-08-04 19:56:34 +01:00
Daniel Kroening c4240b45e4 fix exprt::opX accesses in simplifier
This improves type safety.
2019-08-04 18:41:26 +01:00
Michael Tautschnig 5e870d9b81
Merge pull request #4889 from diffblue/non-symbol-function-applications
applying functions that aren't symbols
2019-08-04 17:22:07 +01:00
Michael Tautschnig 784be6f719
Merge pull request #4946 from xbauch/fix/snapshot-source-location
Fix snapshot harness source location initialisation
2019-08-04 17:18:54 +01:00
Michael Tautschnig fcc49040ec
Merge pull request #4935 from diffblue/ACSL-quantifier
ACSL quantifiers
2019-08-04 16:43:04 +01:00
Michael Tautschnig c7bc62fd59 goto-symex must not lift lets with bound variables
Lifting lets may add equations to the formula, which would then use
symbols before they had been declared. Thus do not lift lets occurring
within exits/forall expressions.

While at it, also make sure declarations introduced by resolved
quantifiers yield a corresponding "dead" statement to be symbolically
executed.
2019-08-04 15:36:02 +00:00
Daniel Kroening 715498271f use optionalt in get_quantifier_var_max/min
This is better signalling for the 'does not apply' case, and better typing
(constant_exprt instead of exprt) in case the a min/max is found.
2019-08-04 16:12:42 +01:00
Daniel Kroening b20cf69e6b
Merge pull request #4963 from diffblue/analyses-opX
fix exprt::opX accesses in analyses
2019-08-04 08:19:42 +01:00
Chris Smowton f3291f3318
Merge pull request #4979 from smowton/smowton/admin/disable-broken-test
Disable test snapshot-harness/dynamic-array-int
2019-08-02 20:30:12 +01:00
Nathan Phillips e956cba6d4
Merge pull request #4980 from NathanJPhillips/cleanup/expose-get_all_generic_parameters
Made get_all_generic_parameters a non-private function
2019-08-02 19:05:45 +01:00
Nathan Phillips d3f55b5af8 Made get_all_generic_parameters a non-private function 2019-08-02 18:19:09 +01:00
Chris Smowton 8c555f98f0 Disable test snapshot-harness/dynamic-array-int
This test is known to pass or fail depending on compiler / library version
due to variations in unordered_map/set ordering.

See https://github.com/diffblue/cbmc/issues/4978
2019-08-02 16:44:22 +01:00
Daniel Poetzl cf7b9bf666
Merge pull request #4974 from danpoe/feature/find-covering-tests
Script to find regression tests that cover given source lines
2019-08-01 19:40:47 +01:00
Daniel Poetzl 75fe74b5dd Script to find regression tests that cover given source lines
An intended use case is to find regression tests that need to be adapted when a
loss of coverage in some files is observed when a new feature is merged.

For example, when improving the constant propagator to propagate more
operations, some existing tests that were intended to test the constraint
encoding of those operations might then be solved via constant propagation.
Thus, the existing tests need to be adapted to use non-constants as inputs.
2019-08-01 18:05:59 +01:00
Chris Smowton 5d2e8b9ffb
Merge pull request #4971 from diffblue/make-prefix-filter-const
Make prefix filter operator const [TG-8603]
2019-08-01 10:28:56 +02:00
Peter Schrammel 64c16fab13 Make prefix filter operator const 2019-07-31 22:04:33 +01:00
Pascal Kesseli 7b23476525
Merge pull request #4955 from MatWise/feature/stl-module-name
STL frontend: Cut quotes from module names
2019-07-31 19:39:51 +02:00
Matthias Weiss 053eab0504 Remove quotes around STL module names
This commit introduces an extra state to the STL scanner in order to
detect if the current identifier is a module name. If it is, the
surrounding quotes are cut. The quotes are syntactically required but do
not contribute to the module names being unique, therefore cutting them
is allowed. Doing so simplifies both the user and the language
interface. Existing regression tests were changed in a way that all
directly refer to the default entry point which was introduced by a
past commit. One test, Function_Call2, is now responsible for checking
the --function flag.
2019-07-31 17:21:52 +01:00
Pascal Kesseli c494b9c282
Merge pull request #4954 from MatWise/feature/stl-from-expression
STL frontend: expr2stl conversion
2019-07-31 17:49:32 +02:00
Daniel Kroening 458c3c2a41
Update src/analyses/local_may_alias.cpp
Co-Authored-By: owen-jones-diffblue <owen.jones@diffblue.com>
2019-07-31 15:24:31 +01:00
Daniel Kroening 20adceee63
Merge pull request #4962 from diffblue/goto-symex-opX
fix exprt::opX accesses in goto-symex
2019-07-31 15:23:44 +01:00
Nathan Phillips 639b864f35
Merge pull request #4929 from NathanJPhillips/bugfix/generic_parameter_specialization_map
Fix generic_parameter_specialization_map in the presence of non-symmetric generic recursion [TG-7815]
2019-07-31 13:47:24 +01:00
hannes-steffenhagen-diffblue d2fb690a8d
Merge pull request #4964 from hannes-steffenhagen-diffblue/fix/trace-decl-initializers
Symex trace: show implicit value associated with composite declarations
2019-07-31 10:56:58 +01:00
Nathan Phillips 186adb8aee Make explicit type parameters shadow implicit ones with the same names
Fixes problem where outer class type parameters take precedence over inner class ones
Previously field would be given the type of the argument assigned to A::T, not B::T.
class A<T> { class B<T> { T field; } }?
2019-07-31 10:34:36 +01:00
Nathan Phillips 8fe86eef51 Change naming of implicit type parameters for inner classes
Previously they duplicated the names for the type parameters of the outer classes
2019-07-31 10:34:36 +01:00
Nathan Phillips de5b6e90ea Change data storage for generic_parameter_specialization_mapt
This fixes the problem where we tried to unwind stacks in step that are not related, e.g. when a third generic class refers to two mutually recursive generic classes
Instead stacks are created per scope (generic context) and unwound individually
Also fixes problem where self-recursion isn't handled properly
Add test that would have triggered invariant in get_recursively_instantiated_type
2019-07-31 10:34:35 +01:00
Nathan Phillips 75cbba1a32 Invert the iterator check to reduce cognitive load caused by extended block scope 2019-07-31 10:34:35 +01:00
Nathan Phillips 3ca7510718 Use type_try_dynamic_cast 2019-07-31 10:34:35 +01:00
Nathan Phillips e513d0242b Give separate REQUIRE statements for each element in list
This will produce better error messages when tests fail.
2019-07-31 10:34:35 +01:00
Nathan Phillips a1e35d8df3 Validate config is initialised when a member_offset_expr is constructed
This will save time hunting for the cause of problems when unit tests don't initialise the config.
2019-07-31 10:34:35 +01:00
Nathan Phillips b0319b8759 Update class type before assigning to class_symbol.type
Previously the code relied on the fact that class_type is a reference to class_symbol.type and so after a new type got copied assigned into class_symbol.type, class_type became a reference to the new value.
2019-07-31 10:34:35 +01:00
Nathan Phillips 2939616ee7 Extract get_final_name_component/get_without_final_name_component 2019-07-31 10:34:35 +01:00
Nathan Phillips db37e0f3b1 Use == instead of compare == 0 2019-07-31 10:34:35 +01:00
Nathan Phillips fabd8636c9 Rename replacement_parameter_it 2019-07-31 10:34:35 +01:00
Nathan Phillips 1981bddbdd Use faster character version of rfind 2019-07-31 10:34:35 +01:00
Nathan Phillips 541e667c5f Use std::next to allow variable that isn't changed to be const 2019-07-31 10:34:35 +01:00
Nathan Phillips 871994ed77 Fix indentation 2019-07-31 10:34:35 +01:00
Nathan Phillips 7aa6d2309e Spacing
Add space between pre-checks and action
Remove space between abbreviations and their usage
2019-07-31 10:34:35 +01:00
Nathan Phillips a483c86884 Remove duplicated brackets 2019-07-31 10:34:35 +01:00
Nathan Phillips bbf403ed47 Remove const modifier that doesn't do anything 2019-07-31 10:34:35 +01:00
Nathan Phillips fed9fd8ef5 Remove prefix underscore 2019-07-31 10:34:35 +01:00
Nathan Phillips b005f02429 Indent TODO continuation lines 2019-07-31 10:34:35 +01:00