Commit Graph

9082 Commits

Author SHA1 Message Date
reuk 0c05ad4233 Fix include order in goto-instrument 2017-07-17 09:55:08 +01:00
reuk 4f0dc2d0aa Fix include order in goto-diff 2017-07-17 09:55:08 +01:00
reuk d5191a7707 Fix include order in goto-cc 2017-07-17 09:55:03 +01:00
reuk c4c0deac9f Fix include order in goto-analyzer 2017-07-16 20:35:27 +01:00
reuk 1ccd30e37a Fix include order in cpp 2017-07-16 20:35:27 +01:00
reuk fbc4dcb55d Fix include order in clobber 2017-07-16 20:35:27 +01:00
reuk bec4da6bf2 Fix include order in cbmc 2017-07-16 20:35:27 +01:00
reuk 5a1eb42308 Fix include order in assembler 2017-07-16 20:35:27 +01:00
reuk caec1dbc92 Fix include order in ansi-c 2017-07-16 20:35:27 +01:00
reuk a55ff13294 Fix include order in analyses 2017-07-16 20:35:27 +01:00
Daniel Kroening 71e973ca67 Merge pull request #1052 from reuk/coding-standard-fix
Fixup coding standard formatting and spelling
2017-07-15 16:28:18 +01:00
Daniel Kroening 1b2a765de1 Merge pull request #1089 from mgudemann/feature/graph_topological_sort
Add Kahn's algorithm to graph.h
2017-07-15 16:08:34 +01:00
Daniel Kroening 10b48f5f95 Merge pull request #1099 from tautschnig/mult-constant-prop
Do not constant propagate multiplication unconditionally
2017-07-15 16:07:23 +01:00
Daniel Kroening ee1e5b0fd4 Merge pull request #1060 from owen-jones-diffblue/doc/fix-typos
Doc/fix typos
2017-07-15 16:05:18 +01:00
Daniel Kroening a38c1c4dc3 Merge pull request #1092 from karkhaz/kk-native-objcopy
Use native objcopy when linking with GCC
2017-07-15 15:59:24 +01:00
Daniel Kroening d36c0d06a1 Merge pull request #1080 from peterschrammel/travis-check-doxygen
Report doxygen warnings on travis
2017-07-15 15:58:45 +01:00
Daniel Kroening 5ec6012e53 Merge pull request #1081 from DanielNeville/danielneville/bugfix/tvt_or_const
tvt's || operator is not marked as const
2017-07-15 15:57:47 +01:00
Daniel Kroening 4b6e63e7a7 Merge pull request #1107 from karkhaz/kk-print-gcc-cmdline
[goto-cc] Print gcc command line before running it
2017-07-15 15:56:54 +01:00
Daniel Kroening a2b73e0156 Merge pull request #1095 from karkhaz/kk-missing-arches
[goto-gcc] Add arch flags for x86_64, power, hppa
2017-07-15 15:56:06 +01:00
Daniel Kroening 723261b7ed Merge pull request #1109 from tautschnig/goto-gcc-fixes
Improve goto-gcc/-as compatibility with GCC
2017-07-15 15:54:20 +01:00
Daniel Kroening b2358bc3ea added assertions to miniBDD 2017-07-15 15:16:37 +01:00
Michael Tautschnig b272c62903 goto-as: handle input from stdin
`goto-as -Qy - -o bla.o` would previously fail with 1) an uninterpreted
option "-Qy" and 2) "Failed to open input source -". As stdin is
properly redirected to a file by goto_cc_cmdlinet, this file should be
used (and -Qy should be ignored).
2017-07-15 11:31:37 +01:00
Michael Tautschnig 585a290493 Use native --version output in goto-gcc
Follow-up/fixes "goto-{gcc,bcc,ld} -v should not print version info
twice"
2017-07-15 11:31:37 +01:00
Michael Tautschnig 515ee7f247 goto-gcc: Reproduce GCC's exit code when output is /dev/null
Follow-up to a24a4a781033c

Command-lines such as
goto-gcc -lnoSUCHlibrary -nostdlib -shared -o /dev/null foo.c
must yield a non-zero exit code.
2017-07-15 11:31:37 +01:00
Daniel Kroening d63d2c7a9c Merge pull request #1116 from tautschnig/fix-1115
Do not assign to objects that have gone out of scope
2017-07-13 13:17:08 +01:00
Lukasz A.J. Wrona a0550b54ab Adapt perl script to handle multiple .desc files
Changes test.pl to name output *.out files after *.desc instead
of *.class files. Also updates failed-test-printer.pl to work with
those new *.out files and multiple *.desc files.
2017-07-13 12:37:43 +01:00
Pascal Kesseli 427194c626 Allow anonymous namespaces
Only give warnings for namespaces with actual names, in accordance with
ad41375353.
This enables the use of anonymous namespaces without warnings.

Fixes: #932
2017-07-12 15:36:32 +02:00
Daniel Kroening 16eb98c4fb Merge pull request #1072 from tautschnig/goto-diff-fix
goto-diff: deleted functions cannot be found in goto_model2
2017-07-12 10:22:22 +01:00
Michael Tautschnig 369f077d2e Do not assign to objects that have gone out of scope
Pointer dereferencing may yield objects that have meanwhile gone out of scope.
Assigning to them is unnecessary, and performing a merge on those would yield
inconsistent equations (as witnessed by the included regression test).

Filtering out the merge in phi nodes is not easily possible as there are several
cases where it is permissible that only one of the states entering the phi node
has an (L1) object, such as declarations only seen in one branch.

Fixes: #1115
2017-07-11 21:04:15 +01:00
Kareem Khazem 58f6dde12c [docs 5/5] Convert CBMC Guide to Markdown
The CBMC Guide (previously a TeX file) is now part of the Doxygen
codebase.
2017-07-10 12:48:38 +01:00
Kareem Khazem d86ede0f4b [docs 4/5] Add CBMC hacking tutorial
A practical tutorial on getting started with CProver development is
added and linked to from the front page. The tutorial contains an
overview of the codebase and a few preliminary programming exercises,
intended to give would-be CProver contributors an introduction to the
key data structures used throughout the codebase.
2017-07-10 12:47:49 +01:00
Kareem Khazem 3a58226cf4 [docs 3/5] Add per-directory high-level docs
This commit introduces a module.md file for several CProver directories.
Each of these is turned into a page under the Modules section in the
generated Doxygen documentation.

The intention is that developers wishing to contribute to one specific
aspect of CProver can get a high-level architectural overview of a
particular directory; the documentation describes the input to and
output from that directory, and introduces the main classes or entry
points.

By way of a "table of contents," the file cbmc/module.md contains a
diagram describing how each of the directories is invoked by CBMC in
order, and the nodes of the diagram hyperlink to the appropriate
documentation. The intention is that developers wishing to contribute to
CBMC as a whole can understand the entire process, from source files to
bug reports and counterexample production.

This documentation is derived from Mark Tuttle's notes on a talk given
by Michael Tautschnig.
2017-07-10 12:45:56 +01:00
Kareem Khazem f5be7f1190 [docs 2/5] Remove empty module group documentation
Doxygen module groups that did not contain any documentation are removed
from the codebase. There are still a few module groups remaining, which
do contain useful content. This commit declutters the Doxygen Modules
section in preparation for a commit introducing per-directory module
documentation.
2017-07-10 12:42:46 +01:00
Kareem Khazem c9144dca3d [docs 1/5] Port existing HTML manual to doxygen
* The existing HTML documentation under doc/html-manual has been
  converted to Markdown. This was done automatically using Pandoc, plus
  some manual work to give identifiers to sections and changing internal
  links to point to those sections with \ref.

* The Doxygen front page now contains some content: a link to the
  doxygen-ated HTML manual, and a note about the API documentation. The
  intention here is that the entire Doxygen site could be hosted
  publicly, serving both users of and contributors to CBMC from a single
  site.

* The doxyfile is updated to enable these changes.
2017-07-10 12:42:37 +01:00
Kareem Khazem de356a0730 [goto-cc] Print gcc command line before running it 2017-07-07 14:37:34 +01:00
Michael Tautschnig 2cb56f643b Do not constant propagate multiplication unconditionally
The previous code was a non-trivial expression always returning true.

Fixes: #351
2017-07-06 15:57:34 +01:00
Kareem Khazem 0043abf9d6 [goto-gcc] Add arch flags for x86_64, power, hppa
goto-gcc now selects the correct architecture when x86_64, power, or
HP-PA specific flags are passed to -mtune, -march or -mcpu.
2017-07-06 10:15:40 +01:00
Peter Schrammel c9acbeee91 Report doxygen warnings on travis 2017-07-06 07:19:55 +01:00
Peter Schrammel 4cd6c0cf80 Enable doxygen warnings for undocumented parameters 2017-07-06 07:19:55 +01:00
Peter Schrammel ebb745ff75 Extend run_diff to doxygen 2017-07-06 07:19:55 +01:00
Matthias Güdemann de657ed109 Add Kahn's algorithm to graph.h 2017-07-05 14:24:32 +02:00
Kareem Khazem f9664aa948 Use native objcopy when linking with GCC
goto-cc calls objcopy with a native prefix if GCC is being used to link
several object files, and the name of the compiler begins with some
native prefix (like arm-none-eabi-gcc).

Previously, goto-cc would only prepend a native prefix to objcopy if the
linker command had a native prefix. This commit causes goto-cc to work
on codebases that use GCC rather than LD to link, and that use a
cross-compiler with a native-prefixed name.
2017-07-05 11:41:19 +01:00
Daniel Kroening 32b68ced26 Merge pull request #988 from tautschnig/fix-unwind-count
Reset unwinding counters when leaving a loop at the loop head
2017-07-04 18:01:15 +01:00
Daniel Neville 9ad6bc27d2 tvt's || operator is not marked as const, despite it being safe to mark it as such, and all other similar methods being marked as const. This commit marks the method as const. 2017-07-04 13:48:59 +01:00
Michael Tautschnig 21afd2f173 Initialise loop counters at loop entry
The previous approach would reset loop counters when reaching an unwinding
bound, which was broken as shown by newly added regression tests.
2017-07-03 18:47:41 +01:00
Daniel Kroening c7ce527327 Merge pull request #858 from tautschnig/dump-c-typedef
Fix dump-c output involving typedef names
2017-07-03 17:49:49 +01:00
Daniel Kroening 7ef0091a0f Merge pull request #999 from tautschnig/fix-taint
Repair custom_bitvector_analysist
2017-07-03 17:49:09 +01:00
Michael Tautschnig 5fc1ca689e Partly revert to try out more beautiful approach 2017-07-03 17:16:38 +01:00
Peter Schrammel 64a3ab5b64 Rename run_lint to run_diff 2017-07-03 17:10:23 +01:00
Peter Schrammel 7af068eb2e Generalise run_lint to run with different tools 2017-07-03 17:09:42 +01:00