Commit Graph

9022 Commits

Author SHA1 Message Date
reuk a5c8a5fabd Fix include order in goto-symex 2017-07-17 09:55:09 +01:00
reuk 70b352c30e Fix include order in goto-programs 2017-07-17 09:55:08 +01:00
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
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 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
Michael Tautschnig a4945f35a6 Reset unwinding counters when leaving a loop at the loop head
Constant propagation and simplification may determine that a loop cannot be
unrolled further. This is determined at the loop head, which is a forward goto
in case of for or while (but not do-while) loops. Before this patch, forward
gotos would never cause loop counters to be reset. In nested loops, the inner
loop(s) would thus have their unwinding counts added to previous (complete) loop
executions.
2017-07-03 16:42:37 +01:00
Peter Schrammel 428507bc44 Generalise filter_by_diff to output lines between warnings 2017-07-03 16:20:35 +01:00
Peter Schrammel 9714e12920 Rename linter filter script 2017-07-03 16:20:17 +01:00
Michael Tautschnig 34a476fa33 dump-c: Replace --use-system-headers by --no-system-headers
The user-friendly default now is to produce #include statements for C library
functions; this can be disabled using --no-system-headers.
2017-07-03 15:24:36 +01:00
Daniel Kroening eac8e2c6fd Merge pull request #1009 from thk123/bugfix/arrays-structs-null-pointers
Fix for arrays containing structs will null pointers
2017-07-03 15:08:00 +01:00