Commit Graph

45 Commits

Author SHA1 Message Date
Lukasz A.J. Wrona 7949cac5f7 Add project(CBMC) to CMakeLists
Suppresses a "missing project" warning. Each CBMC project should have a project tag.
2019-10-14 15:10:00 +01:00
Owen Mansel-Chan 598273a9ff
Merge pull request #5041 from owen-mc-diffblue/owen/add-build-option-to-enable-profiling
[TG-9173] Add build option to enable profiling
2019-08-30 15:42:57 +01:00
Owen 437e532f6f Add option to enable profiling
For profiling, -pg must be used for the compilation and the linking
steps. (-g must be used as well, so it should be a debug or
relwithdebinfo build)
2019-08-30 10:47:37 +01:00
Owen 0894e96ec2 Tidy up cmake commands for coverage
These commands are equivalent
2019-08-27 10:12:30 +01:00
Matthias Weiss b900edc734 Integrate STL parser into CBMC executable
Includes a basic Statement List language interface (although without any
typechecking yet) as well as modifications to some Makefiles and
cbmc_languages.cpp. Use the --show-parse-tree option when parsing a .awl file
to see the project's output.
2019-05-31 16:40:00 +01:00
Yumi Bagge a780511db1 Add goto-harness dependency and unify format 2019-05-30 22:06:16 +01:00
Hannes Steffenhagen 856aa5c201 Make memory analyzer optional
We were doing this in multiple places, this should make it a bit easier to keep
set properties consistent among different places.

Ideally we could eventually move away from mentioning targets from modules here
on the top level (and instead have each module call cprover_default_properties)
but this isn't done in this commit.

Because memory analyzer depends on GDB being present and further uses platform
specific functionality at the moment it had some ifdef functionality to disable
itself.

This made the code a bit more complicated than it needed to be, and also lead to
the code effectively building defunct executables. This removes these ifdefs and
instead excludes memory-analyzer (and related tests) from the build unless
requested (via WITH_MEMORY_ANALYZER environment variable or CMake option
depending on whether it is a Make or CMake build respectively).

Also force building memory-analyzer on Linux and test it there by
default (unless explicitly unset). Behaviour on other platforms should be
preserved.
2019-05-16 11:56:04 +01:00
Malte Mues 767a3858a7 Add Makefiles enabeling memory-analyzer and tests 2019-05-16 11:17:20 +01:00
Hannes Steffenhagen da5fd4508c Add symtab2gb to enable linking of .json_symtab files
Right now we have the `goto-cc` tool to create goto binaries from C
files and link goto binaries together. This adds a similar type of
"linker" tool for the symtab language.

I had considered extending 'goto-cc' to handle symtab files as well,
however goto-cc (quite reasonably) makes some C-specific assumptions
about its input files, and I'd figured rather than working around that
it'd be easier to just have a simple command line tool to invoke
`goto_convert` and `link_goto_model` (which, in the end, is all we want
to do for json_symtabs).
2019-05-14 15:30:29 +01:00
Michael Tautschnig 5e1c7bf0cc Add -Wswitch-enum to default GCC/Clang build options
This is now consistent with the warnings that Visual Studio would generate,
which warns about missing enum cases in switch/case even when a default: is
present.
2019-04-30 23:55:26 +00:00
Romain Brenguier b79624836f Build Cudd at the cmake configuration phase
This makes Cudd be configured and build at the configuration phase. This
simplifies a bit the logic for dependencies of cudd and cudd-cplusplus
targets.
This is the only way I found to make Ninja build flawlessly.
2019-03-22 13:24:25 +00:00
Kareem Khazem 562fad22ee
Make JBMC build optional with cmake
This commit adds an option to CMake, `WITH_JBMC`, that controls whether
the jbmc directory will be built. It is switched on by default,
preserving the current behaviour.

The motivation is to make it as easy as possible for users to get
started with CBMC, especially users who are only interested in the C
front-end and are on Windows, where installing the JDK and Maven is a
painful exercise.

Also updated `COMPILING.md` to note that you can pass `-DWITH_JBMC=OFF`
to cmake to avoid building jbmc.
2019-03-14 07:05:57 -07:00
Romain Brenguier f1a1bb75d2 Add CUDD to CMake
CMake instructions to download Cudd when the CMAKE_USE_CUDD parameter is
set to true.
2019-02-01 06:48:55 +00:00
Michael Tautschnig ab6abf856a CMake builds: avoid NDEBUG in RelWithDebInfo builds
Just like is done for Release builds, NDEBUG shouldn't be set for RelWithDebInfo
builds either. Although we are trying to move away from straight "assert" and
use invariants instead, we a) haven't completed this yet and b) imported code
such as optional.hpp continues to use "assert."
2019-01-26 13:03:23 +00:00
Hannes Steffenhagen 30cb51c22a Add stub for new goto-harness tool
This adds a new executable called goto-harness. Right now it doesn't actually do
anything, but ultimately its purpose will be to generate "harness" functions for
goto-programs - i.e. given some specification, it'll generate a function
suitable as a cbmc entry point function that implements that specification.

Planned for now are two types of harnesses: One that takes the name of a
function with parameters and then generates a function that sets up these
parameters and calls the function with them. This is similar to what cbmc does
already, however will allow more flexibility in choosing how exactly these
parameters will be initialised which was deemed out of scope for cbmc. The other
will be able to take a snapshot of a concrete execution of a program, and then
start an analysis from that point.
2019-01-25 17:56:02 +00:00
Michael Tautschnig e3b76c7477 Build coverage reports using CMake
Understanding which code is covered by our tests may in future enable automation
to check whether code modifications are covered by tests.
2019-01-15 12:56:15 +00:00
Michael Tautschnig 28935e6eca
Merge pull request #3409 from tautschnig/big-int-unit-test
Move big-int unit test to unit/ folder and make it a CATCH-style test [blocks: #2452]
2018-12-19 11:45:17 +00:00
Peter Schrammel bac549b50b Move cbmc_solvers as solver_factory to goto-checker module
This is the first step of introducing the goto-checker module
which will hold the language-agnostic BMC classes.
2018-12-17 17:58:29 +00:00
Chris Smowton 86e8356565 Implement JSON symtab language frontend.
Implement JSON symtab language, a new, more generic
language frontend, able to read GOTO programs in JSON
form, from any frontend that generates them. Currently
this stands as the support frontend for our ADA
conversion tool, GNAT2GOTO.
2018-11-21 15:07:50 +00:00
Michael Tautschnig 17d96d7274 Move big-int unit test to unit/ folder and make it a CATCH-style test 2018-11-14 10:58:38 +00:00
Michael Tautschnig bd55a28bf8 Make the remaining (relevant) miniBDD catch-style unit tests 2018-09-18 09:23:44 +00:00
Daniel Kroening ba57a14e1a remove memory-models 2018-08-15 18:48:24 +01:00
Daniel Kroening a1d59d28fc remove clobber 2018-08-15 12:26:28 +01:00
Peter Schrammel b34e951e52 Use submodule to download java-models-library 2018-07-09 21:13:37 +01:00
Daniel Kroening b96c7ba857 move build commands for version.h from common to util/ 2018-07-03 16:20:32 +01:00
Michael Tautschnig e638f72c8f CBMC_VERSION: Use generated include files instead of command-line defines
Also fixes a number of shortcomings of the earlier approach as far as CMake is
concerned:
- Adds --dirty to the git command line (as is done for Makefiles).
- Does not require a rebuild when there are no changes to the version string.
- CBMC release number updates will be reflected and trigger a rebuild (even when
  no other changes have taken place).
2018-06-23 20:41:45 +00:00
Michael Tautschnig 1360f7fcfc CMake refers to Clang on a Mac as AppleClang 2018-06-23 20:41:45 +00:00
Michael Tautschnig 23455af549 Print git revision with all --version outputs
This uses the output of `git-describe --tags --always --dirty` to create a UID
for binaries. This includes last tag, number of commits after last tag,
shortened SHA1 checksum and optional dirty flag for uncommited changes. In case
of tagged commit, only the tag name is used.
2018-06-21 15:42:20 +00:00
Michael Tautschnig 7ca835bac3 Added CBMC_VERSION defines to CMake configuration 2018-06-21 15:42:20 +00:00
Chris Smowton 5235938f0c Restore testing of jbmc 2018-05-23 13:24:49 +01:00
Peter Schrammel e247458371 Add JANALYZER tool 2018-05-20 23:00:03 +01:00
Peter Schrammel 45887539d1 Add JDIFF tool 2018-05-20 23:00:03 +01:00
Peter Schrammel a20f2c1427 Move java_bytecode, jbmc and miniz to jbmc/src 2018-05-20 23:00:03 +01:00
thk123 252c24c893 Migrate old string utils unit tests 2018-04-16 14:18:12 +01:00
Hannes Steffenhagen 67735b5946 Disable deprecation warnings by default 2018-04-12 10:53:12 +01:00
Hannes Steffenhagen 116fffdabf Add DEPRECATED macro to mark deprecated functions and variables 2018-04-10 16:51:13 +01:00
reuk 81e56ccafb Tidy up CMakeLists 2017-11-15 15:55:08 +00:00
reuk 4a1565b25f Enable compile command output 2017-09-17 22:08:59 +01:00
reuk 00e4555ba1 Fix up CMake build (unrelated) 2017-09-13 22:03:57 +01:00
reuk 91684da5ea Clean up CMake files after #1321 2017-09-11 14:29:12 +01:00
reuk 7d4e9b59d0 Make CMake release flags similar to Makefile build 2017-09-11 14:29:12 +01:00
reuk ad486f8c55 Set up glucose externalproject 2017-09-11 14:29:12 +01:00
reuk d953327a4c Enable caching for CMake builds (hopefully) 2017-09-11 14:29:12 +01:00
reuk f6e49683c9 Enable running tests from CMake 2017-09-11 14:29:12 +01:00
reuk 22c2ab9f04 Add CMakeLists 2017-09-11 14:29:12 +01:00