Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Traces article implementation #183

Merged
merged 367 commits into from
Apr 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
367 commits
Select commit Hold shift + click to select a range
2524117
Remove ask variables from sync implementations
sim642 Jan 26, 2021
fefa0e5
Remove unnecessary global init condition in base event
sim642 Jan 26, 2021
0556e9f
Add boilerplate for MinePriv
sim642 Jan 27, 2021
6f4cef7
Add possible MinePriv global domains
sim642 Jan 27, 2021
07ac877
Implement Mine weak interferences
sim642 Jan 27, 2021
e8a3c9f
Activate mutex analysis in some tests
sim642 Jan 27, 2021
71bafa2
Implement Mine sync interferences
sim642 Jan 27, 2021
e209d53
Update annotations in some tests
sim642 Jan 27, 2021
11daa5b
Add MinePriv.lock TODO
sim642 Jan 27, 2021
8bcecd6
Add versions of 13/24 where MinePriv seems to be imprecise
sim642 Jan 27, 2021
7740285
Add Vesal's version of 13/24 where mutex-oplus and mutex-meet are mor…
sim642 Jan 28, 2021
77c7632
Add global init workarounds to thread id and lockset queries
sim642 Jan 28, 2021
ee19f45
Fix most osek tests with MinePriv by delegating CurrentLockset query
sim642 Jan 28, 2021
3f110c9
Fix 31/06 with MinePriv by enabling threadflag analysis to avoid mult…
sim642 Jan 28, 2021
9748489
Remove thread component from MinePriv
sim642 Jan 28, 2021
bd6fd95
Extract mutex_global and mutex_addr_to_varinfo to MutexGlobals
sim642 Jan 28, 2021
194217a
Optimize MinePriv sync influence lookup by mutex
sim642 Jan 28, 2021
97bf438
Remove lockset TODO from MinePriv.lock
sim642 Jan 28, 2021
984afcc
Remove unnecessary MinePriv.enter_multithreaded
sim642 Jan 28, 2021
168f47c
Fix MinePriv thread return
sim642 Jan 28, 2021
b703af1
Replace `Return sync in combine with `Normal/`Join sync
sim642 Jan 28, 2021
2779a1e
Specialize other thread return syncs
sim642 Jan 28, 2021
58afd24
Simplify NoPriv
sim642 Jan 29, 2021
5cb4fab
Extract sync in FromSpec
sim642 Jan 29, 2021
5ff2255
Make test script actually kill timeout Goblints
sim642 Jan 29, 2021
8780da8
Document gobopt environment variable in update_suite
sim642 Jan 29, 2021
e7cb689
Add example where mutex-oplus and mutex-meet differ
sim642 Jan 29, 2021
a129bc7
Add cleaned up example where mine and mutex-* differ
sim642 Jan 29, 2021
ec481b7
Add example where mine, mutex-oplus and mutex-meet differ
sim642 Jan 29, 2021
1d994f5
Simplify 13/32 to single global
sim642 Jan 29, 2021
dfeaa08
Remove now somehow unnecessary empty mutex B section from 13/32
sim642 Jan 29, 2021
16c5392
Fix 13/32 to fail Mine even with thread ID partitioning
sim642 Jan 29, 2021
421139c
Add assert fail/success comments to 13/32
sim642 Jan 29, 2021
3db35d1
Add check_read_unprotected parameter to PerGlobalPriv
sim642 Jan 29, 2021
3bfdbdf
Fix earlyglobs for MinePriv
sim642 Jan 29, 2021
8706823
Fix SV-COMP atomics for MinePriv
sim642 Jan 29, 2021
90b90c4
Remove unused ThreadId.global_init_thread
sim642 Jan 29, 2021
f6766ea
Re-add weak influence thread ID to MinePriv, move version w/o to Mine…
sim642 Jan 29, 2021
42c99ad
Add timing to PrivParam
sim642 Feb 2, 2021
cdb7ded
Add timing to CPA
sim642 Feb 3, 2021
3102209
Optimize CPA.equal
sim642 Feb 3, 2021
8d72216
Optimize CPA.hash
sim642 Feb 3, 2021
534461f
Enforce MapDomain module signatures
sim642 Feb 3, 2021
ee950d5
Extract map hash calculation optimization to functor
sim642 Feb 3, 2021
55587d4
Add TODO about OptHash functor performance regression
sim642 Feb 3, 2021
54d84f6
Add MapDomain.Hashcons functor
sim642 Feb 4, 2021
f8dd4b2
Decompose OptHash to HashCached
sim642 Feb 4, 2021
369a1b0
Simplify HashCached.to_yojson
sim642 Feb 4, 2021
c7ca576
Simplify HashCached.pretty_f
sim642 Feb 4, 2021
4829278
Deduplicate MapDomain.Hashcons
sim642 Feb 4, 2021
05a8720
Add TODOs to privatizations to update to paper changes
sim642 Feb 8, 2021
2e3c169
Extract common Mine functions to MinePrivBase
sim642 Feb 8, 2021
f65b4eb
Generalize PrivParam.lock from CPA to BaseComponents
sim642 Feb 9, 2021
6784cb2
Replace PrivParam.sync ctx argument with separate arguments for consi…
sim642 Feb 9, 2021
38fac9e
Move privatization modules to basePriv.ml
sim642 Feb 9, 2021
5687bbe
Move Priv selection to BasePriv
sim642 Feb 9, 2021
352c5b8
Initialize precious_globs using AfterConfig
sim642 Feb 9, 2021
e02fbc8
Add baseUtil.mli
sim642 Feb 9, 2021
50a7e29
Rename BasePriv.PrivParam to BasePriv.S
sim642 Feb 9, 2021
9354a09
Add basePriv.mli
sim642 Feb 9, 2021
cd879f1
Update PerGlobalPriv.write_global to paper update
sim642 Feb 9, 2021
3a035f3
Extract CPA timing to MapDomain.Timed
sim642 Feb 12, 2021
742d3a0
Disable CPA timing
sim642 Feb 12, 2021
f322b16
Rename StatsPriv -> TimedPriv
sim642 Feb 12, 2021
f2f1b27
Merge branch 'traces' into traces-cpa-optimize
sim642 Feb 12, 2021
f8c3827
Generalize privatization local domain component
sim642 Feb 15, 2021
6dcf9db
Rename cached -> priv in BaseComponents
sim642 Feb 17, 2021
6a3751e
Move CachedVars from BaseDomain to BasePriv
sim642 Feb 17, 2021
9c89a07
Fix forgotten CachedVars usage in BaseComponents
sim642 Feb 17, 2021
bde5a9c
Fix missing CVars module alias
sim642 Feb 17, 2021
f4dec5e
Remove unnecessary typing in StatsPriv
sim642 Feb 17, 2021
dd28a81
Extract rich varinfo management to RichVarinfo
sim642 Feb 17, 2021
dea10b5
Add Mine with W set implementation
sim642 Feb 25, 2021
a63a170
Add mine-W to privatization option description
sim642 Feb 25, 2021
d292ae0
Add Mine with lazy reading implementation
sim642 Feb 26, 2021
e0f3bf7
Fix initialization in MineLazyPriv
sim642 Mar 2, 2021
722580e
Update MineLazyPriv with set of set of mutex
sim642 Mar 3, 2021
afd3fd4
Use Hoare in MineLazyPriv.L
sim642 Mar 3, 2021
156547b
Add Mine with lockset history implementation
sim642 Mar 3, 2021
943c92e
Fix thread returns for MineHistoryPriv
sim642 Mar 3, 2021
684ce39
Simplify MineHistoryPriv.enter_multithreaded by implicit empty P set
sim642 Mar 3, 2021
afccddd
Simplify MineHistoryPriv initializers by reversing P order
sim642 Mar 3, 2021
4ae227e
Comment out unnecessary part of MineLazy
sim642 Mar 5, 2021
33f3f88
Remove V from MineHistoryPriv
sim642 Mar 5, 2021
3a5ee7d
Rename MineHistoryPriv -> PerGlobalHistoryPriv
sim642 Mar 5, 2021
f0a8aa2
Change PerGlobalHistoryPriv to use Hoare in W
sim642 Mar 5, 2021
2998bdb
Add MinePerGlobalPriv as combination of MineLazyPriv and PerGlobalHis…
sim642 Mar 5, 2021
0989cdf
Remove unnecessary part of MineLazyPriv.read_global
sim642 Mar 5, 2021
d6b9ba3
Add P-based V check to PerGlobalHistoryPriv
sim642 Mar 9, 2021
7806c19
Add P-based V check to MinePerGlobalPriv
sim642 Mar 9, 2021
11bcd8c
Extract common precise privatization domains
sim642 Mar 9, 2021
2073240
Extract simulated V mem check to P
sim642 Mar 9, 2021
94557d3
Add traces v-matters example
sim642 Mar 10, 2021
dc90c04
Remove V and L removal from MineLazyPriv and MinePerGlobalPriv
sim642 Mar 10, 2021
c4dcdb3
Add traces mine++-L-needs-to-be-um example
sim642 Mar 11, 2021
8b2c7cb
Add traces examples
sim642 Mar 11, 2021
e30322e
Update traces mine++-L-needs-to-be-um example
sim642 Mar 11, 2021
910569f
Weaken SV-COMP atomics privatization test requirements
sim642 Mar 17, 2021
9d4102d
Add regression test for SV-COMP atomics soundness
sim642 Mar 18, 2021
e7b5110
Fix SV-COMP atomics unsoundness in most new privatizations
sim642 Mar 18, 2021
b2ddb10
Fix SV-COMP atomic in MustBeProtectedBy and MayBePublicWithout querie…
sim642 Mar 18, 2021
6e02478
Fix SV-COMP atomics unsoundness in mutex privatizations
sim642 Mar 18, 2021
5aa4248
Fix global-history and mine-global unsoundness due to missed side eff…
sim642 Mar 18, 2021
fe87ae5
Merge branch 'master' into traces
sim642 Mar 22, 2021
648b974
Add very basic Priv.read_global precision dumping
sim642 Mar 23, 2021
7d94f80
Add Marshal-based n-way privatization precision comparison
sim642 Mar 23, 2021
44c1292
Add aggregation to privPrecCompare
sim642 Mar 23, 2021
c7fa637
Add TODO about unknown functions invalidating more globals with some …
sim642 Mar 23, 2021
c2e87af
Merge branch 'master' into traces
sim642 Mar 23, 2021
2f092ae
Add example where unknown function call global invalidation is unsound
sim642 Mar 24, 2021
f514377
Fix unsound unknown function call global invalidation
sim642 Mar 24, 2021
fa2fce3
Rename ugglyImperativeHack -> current_file
sim642 Mar 24, 2021
4349136
Improve large privPrecCompare output
sim642 Mar 24, 2021
6e4a6f6
Fix useless PathSensitive2.D.pretty_diff
sim642 Mar 25, 2021
11f0a02
Add combine tracing
sim642 Mar 25, 2021
0563c89
Add minimal pfscan regression test due to combine problem
sim642 Mar 25, 2021
028b95e
Fix verify failture on pfscan with global privatization
sim642 Mar 25, 2021
768b37e
Fix argument naming in base combine
sim642 Mar 25, 2021
807af59
Clean up base combine
sim642 Mar 25, 2021
89d1d61
Add script that combines exp.priv-prec-dump goblint runs with privPre…
sim642 Mar 25, 2021
e3d8abb
Add privPrecCompare/ to .gitignore
sim642 Mar 25, 2021
1aeae46
Use pretty_diff correctly in privPrecCompare based on leq
sim642 Mar 26, 2021
016fdca
Fix MapTop.pretty_diff not matching MapTop.leq
sim642 Mar 26, 2021
ac1218d
Remove excessive newline from MutexGlobals.mutex_addr_to_varinfo warning
sim642 Mar 26, 2021
e4b91cf
Add regression tests for refining protected globals
sim642 Mar 26, 2021
a16f118
Fix invariant on protected globals with most privatizations
sim642 Mar 26, 2021
220cad0
Fix base invariant on globals when only one binop side refines
sim642 Mar 26, 2021
7d59189
Add regression tests for refining protected globals in loop
sim642 Mar 30, 2021
b1ba090
Replace meet in invariant with state-passing
sim642 Mar 31, 2021
aa2cf66
Remove even previously inconsistent Deadcode handling in invariant
sim642 Mar 31, 2021
ca56468
Add regression tests where mine-W is more precise than mine-lazy
sim642 Apr 1, 2021
28c25f8
Add further simplification of 13/51
sim642 Apr 1, 2021
6d889b9
Replace S with dom(L) in mine-lazy write
sim642 Apr 1, 2021
4b1946c
Add partial generic Priv tracing
sim642 Apr 1, 2021
e2092c9
Add regression tests where global is more precise than global-history…
sim642 Apr 1, 2021
915db9a
Add regression tests where global is more precise than global-history…
sim642 Apr 5, 2021
c81e936
Add more priv tracing
sim642 Apr 5, 2021
c2f4a07
Make global-history distribute global initialization
sim642 Apr 5, 2021
0bce008
Add option exp.priv-distr-init
sim642 Apr 5, 2021
1014b5f
Add manual test where mine-W is more precise than mine-lazy due to ex…
sim642 Apr 5, 2021
7e117cc
Use typed tops instead of supertop for extern global inits
sim642 Apr 5, 2021
0a0606f
Replace filename ordering with given ordering in privPrecCompare
sim642 Apr 5, 2021
9d026cc
Add name strings to privPrecCompare dumps
sim642 Apr 5, 2021
be22d2f
Add regression test (based on ctrace_comb) where singlethreaded mode …
sim642 Apr 5, 2021
6bd012b
Fix singlethreaded unlock with mine-lazy
sim642 Apr 5, 2021
d6ef7ce
Fix arguments with spaces in privPrecCompare
sim642 Apr 5, 2021
c31f43b
Add regression test where singlethreaded mode lock is before entering…
sim642 Apr 5, 2021
8ab303c
Add usleep to libraryFunctions
sim642 Apr 6, 2021
266da15
Collect thread spawns instead of doing them immediately (issue #148)
sim642 Nov 30, 2020
5fc9fca
Fix threadenter crash on multiple paths (issue #148)
sim642 Nov 30, 2020
e2cd05e
Add regression test where mine-lazy used to crash due to multiple paths
sim642 Apr 6, 2021
ae1a27e
Make mine-global also distribute global initialization like global-hi…
sim642 Apr 6, 2021
da2d673
Merge branch 'traces' into traces-cpa-optimize
sim642 Apr 6, 2021
91e47c0
Add privPrecCompare script for creduce
sim642 Apr 7, 2021
da01149
Add regression tests where allfuns/otherfun causes global init issues…
sim642 Apr 7, 2021
8051f23
Fix otherfun global init with new privatizations (except mine-W)
sim642 Apr 7, 2021
25f6c53
Fix allfuns with global priv
sim642 Apr 7, 2021
a6d0a0b
Merge pull request #164 from goblint/traces-cpa-optimize
sim642 Apr 8, 2021
e91bdb4
Fix first thread's ID in global variable with mine-W priv
sim642 Apr 9, 2021
3d9b41e
Add manual test cases where mutex analysis should record special set …
sim642 Apr 9, 2021
0b4d052
Fix mutex not recording thread ID lval access from singlethreaded
sim642 Apr 9, 2021
997ccf2
Add more XML escaping for kernel string escapes
sim642 Apr 12, 2021
b93a159
Optimize XML escaping of kernel string escapes
sim642 Apr 12, 2021
83f04c5
Add function definition check to privPrecCompare-creduce
sim642 Apr 12, 2021
4efe75c
Merge branch 'master' into traces
sim642 Apr 12, 2021
eab3627
Add conf file for traces benchmarking
sim642 Apr 12, 2021
19cb759
Fix RawBools indentation
sim642 Apr 12, 2021
b5520e5
Remove unnecessary quotes from RawBools printing
sim642 Apr 12, 2021
7ebb788
Handle __builtin_unreachable as dead code
sim642 Apr 12, 2021
31f9bc0
Add invalidate warnings
sim642 Apr 12, 2021
bee4659
Add more invalidate warnings
sim642 Apr 13, 2021
dc3d1ba
Add use_special warning
sim642 Apr 13, 2021
d257e58
Remove SV-COMP adutux use_specials
sim642 Apr 13, 2021
28f3cb0
Add SV-COMP malloc wrappers to traces conf
sim642 Apr 13, 2021
63e7dcb
Use traces conf for privPrecCompare-creduce
sim642 Apr 13, 2021
6f9942d
Add option sem.builtin_unreachable.dead_code
sim642 Apr 13, 2021
75b5892
Rename exp.unknown_funs_spawn to sem.unknown_function.spawn
sim642 Apr 13, 2021
06ea247
Add option sem.unknown_function.invalidate.globals
sim642 Apr 13, 2021
10e33b7
Add sem.unknown_function to traces conf
sim642 Apr 13, 2021
d88cd0a
Add workaround to make free not spawn
sim642 Apr 13, 2021
1e11c90
Make mine-lazy also distribute global initialization like mine-global
sim642 Apr 13, 2021
ff06f35
Disable priv-distr-init by default for precision but keep enabled for…
sim642 Apr 13, 2021
445a464
Fix unnecessary threadreturn propagation in CPA
sim642 Apr 14, 2021
6170880
Load dumps once in privPrecCompare
sim642 Apr 14, 2021
d1da8c7
Add precision counters to privPrecCompare
sim642 Apr 14, 2021
07a316d
Add live lines output
sim642 Apr 14, 2021
67251fb
Add threadenter to Priv
sim642 Apr 14, 2021
cae44b6
Add base threadenter hack for global inits
sim642 Apr 14, 2021
4d66d6d
Fix mine-W enter_multithreaded publishing too much and failing regres…
sim642 Apr 14, 2021
1aacf47
Make default mine-W unnecessarily side effect global inits
sim642 Apr 15, 2021
08c134c
Disable interval in traces conf
sim642 Apr 15, 2021
5ef62e5
Extract common Priv.threadenter implementations
sim642 Apr 15, 2021
2edc0c5
Use P in PerGlobalPriv
sim642 Apr 15, 2021
76599b0
Add helper functions to PerGlobalPriv.G
sim642 Apr 15, 2021
f141675
Clean up MineWPriv
sim642 Apr 15, 2021
cc1b559
Clean up MineLazyPriv
sim642 Apr 15, 2021
f60cf8c
Clean up PerGlobalHistoryPriv
sim642 Apr 15, 2021
7bdf092
Clean up MineGlobalPriv
sim642 Apr 15, 2021
4768968
Add V back to MineGlobalPriv
sim642 Apr 15, 2021
669e6ff
Extract LockCenteredGBase from MineWPriv and MineLazyPriv
sim642 Apr 16, 2021
97cd2fc
Extract WriteCenteredGBase from PerGlobalHistoryPriv and MineGlobalPriv
sim642 Apr 16, 2021
f65feb9
Extract AbstractLockCenteredGBase from LockCenteredGBase and WriteCen…
sim642 Apr 16, 2021
c5f35df
Use LockCenteredGBase for MinePriv and MineNoThreadPriv
sim642 Apr 16, 2021
729295a
Change NewPrivBase -> Protection
sim642 Apr 16, 2021
cc1ac13
Move CachedVars near usage
sim642 Apr 16, 2021
57b9a2d
Extract SetDomain.Reverse
sim642 Apr 16, 2021
e769cd5
Rename CachedVars -> MustVars
sim642 Apr 16, 2021
22f9ae0
Split MutexGlobals to implicit and explicit
sim642 Apr 16, 2021
8998cf0
Extract Locksets from MinePrivBase
sim642 Apr 16, 2021
676769a
Extract MineNaivePrivBase from MinePrivBase
sim642 Apr 16, 2021
1e066b6
Split PreciseDomains to LockCenteredD and WriteCenteredD
sim642 Apr 16, 2021
b809396
Make P.find return alternative top representation
sim642 Apr 16, 2021
2469b32
Update module names in failwith strings
sim642 Apr 16, 2021
21e9b6b
Use global-vesal privatization for OIL
sim642 Apr 16, 2021
cf022d4
Make global-read default privatization
sim642 Apr 16, 2021
ce8c33a
Mark precise privatization tests TODO to make global-read pass
sim642 Apr 16, 2021
5de540d
Mark widening privatization tests TODO to make precise pass
sim642 Apr 16, 2021
66be738
Mark Mine init privatization test TODO to make others pass
sim642 Apr 16, 2021
35e7bab
Disable domain testing of now-broken HoareMap
sim642 Apr 16, 2021
1c0fd42
Add text file with expected regression test results with alternative …
sim642 Apr 16, 2021
53efb01
Make regression test script skip non-directories
sim642 Apr 16, 2021
7518783
Remove duplicate assignment of earlyglobs
sim642 Apr 16, 2021
5ec58ad
Add failing test without threadescape
michael-schwarz Apr 19, 2021
2eee28e
Use structural equality for vstorage consistently
sim642 Apr 19, 2021
3130b91
Fix unsoundness when thread escape analysis is disabled
sim642 Apr 19, 2021
412225e
Enable escape analysis in remaining regression tests
sim642 Apr 19, 2021
ba6d1b3
Rename currentStatement -> current_statement for consistency
sim642 Apr 19, 2021
18ae85a
typo
michael-schwarz Apr 19, 2021
91b8c2e
Rename global privatization to protection
sim642 Apr 19, 2021
eafc64c
Rename mine-lazy privatization to lock
sim642 Apr 19, 2021
cd81237
Rename global-history privatization to write
sim642 Apr 19, 2021
643d8a0
Rename mine-global privatization to write+lock
sim642 Apr 19, 2021
a9c9fa5
Rename global-vesal privatization to protection-vesal
sim642 Apr 19, 2021
a4a3ba4
Rename old privatization to protection-old
sim642 Apr 19, 2021
3a620ab
Revert "Enable escape analysis in remaining regression tests"
sim642 Apr 19, 2021
a99364c
Revert "Fix unsoundness when thread escape analysis is disabled"
sim642 Apr 19, 2021
4b0fa27
Revert "Add failing test without threadescape"
sim642 Apr 19, 2021
63c7d29
Remove commented out open in Events
sim642 Apr 19, 2021
a073cbe
Document threadenter and threadspawn
sim642 Apr 19, 2021
c1a81f8
Fix OldPrivBase.lock argument name cpa -> st
sim642 Apr 19, 2021
8c22f1c
Remove outdated and commented out WriteCenteredD.P.mem_V
sim642 Apr 19, 2021
d8d2edc
Fix DomFunctor comment
sim642 Apr 19, 2021
6f3586d
Rename mine-W-init privatization to mine-W-noinit
sim642 Apr 19, 2021
27579be
Rename NoPriv -> NonePriv to match option value
sim642 Apr 19, 2021
6873489
Merge branch 'traces-rename' into traces
sim642 Apr 19, 2021
2732bd8
Remove outdated TODO in LockCenteredPriv.unlock
sim642 Apr 20, 2021
40e5b13
Add comment about WriteCenteredD.P order
sim642 Apr 20, 2021
12fc71f
Remove unnecessary Priv.is_private
sim642 Apr 20, 2021
a425bdf
Merge branch 'master' into traces
sim642 Apr 20, 2021
d1e0e4a
Merge branch 'master' into traces
sim642 Apr 20, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,5 @@ goblint.bc.js
*.orig

sv-comp/goblint.zip

privPrecCompare*/
43 changes: 43 additions & 0 deletions conf/traces.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"ana": {
"int": {
"def_exc": true,
"interval": false,
"enums": true
}
},
"sem": {
"unknown_function": {
"invalidate": {
"globals": false
},
"spawn": true
},
"builtin_unreachable": {
"dead_code": true
}
},
"exp": {
"priv-distr-init": false,
"malloc": {
"wrappers": [
"kmalloc",
"__kmalloc",
"usb_alloc_urb",
"__builtin_alloca",
"kzalloc",

"ldv_malloc",

"kzalloc_node",
"ldv_zalloc",
"kmalloc_array",
"kcalloc",

"ldv_xmalloc",
"ldv_xzalloc",
"ldv_calloc"
]
}
}
}
32 changes: 32 additions & 0 deletions scripts/privPrecCompare-creduce.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

# creduce ./scripts/privPrecCompare-creduce.sh ./pfscan_comb.c

set -e

gcc -c -Werror=implicit-function-declaration ./tegra20.c

GOBLINTDIR="/home/simmo/dev/goblint/sv-comp/goblint"
# OPTS="./pfscan_comb.c --enable custom_libc"
OPTS="./tegra20.c --conf $GOBLINTDIR/conf/traces.json --enable ana.sv-comp.functions"
# PRIVS=(protection protection-read write mine-W lock write+lock)
PRIVS=(protection write)
INTERESTING="protection more precise than write"
OUTDIR="privPrecCompare-creduce"


mkdir -p $OUTDIR

for PRIV in "${PRIVS[@]}"; do
echo $PRIV
PRIVDUMP="$OUTDIR/$PRIV"
LOG="$OUTDIR/$PRIV.log"
rm -f $PRIVDUMP
$GOBLINTDIR/goblint --sets exp.privatization $PRIV --sets exp.priv-prec-dump $PRIVDUMP $OPTS -v --enable dbg.debug &> $LOG
grep -F "Function definition missing" $LOG && exit 1
done

PRIVDUMPS=("${PRIVS[*]/#/$OUTDIR/}") # why [*] here?
$GOBLINTDIR/_build/default/src/privPrecCompare.exe $PRIVDUMPS 2>&1 | tee "$OUTDIR/compare.txt"

grep -F "$INTERESTING" "$OUTDIR/compare.txt"
17 changes: 17 additions & 0 deletions scripts/privPrecCompare.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

# ./scripts/privPrecCompare.sh ../goblint-bench/pthread/pfscan_comb.c --enable custom_libc

PRIVS=(protection protection-read write mine-W lock write+lock)
OUTDIR="privPrecCompare"

mkdir -p $OUTDIR

for PRIV in "${PRIVS[@]}"; do
echo $PRIV
PRIVDUMP="$OUTDIR/$PRIV"
./goblint --sets exp.privatization $PRIV --sets exp.priv-prec-dump $PRIVDUMP "$@"
done

PRIVDUMPS=("${PRIVS[*]/#/$OUTDIR/}") # why [*] here?
./_build/default/src/privPrecCompare.exe $PRIVDUMPS 2>&1 | tee "$OUTDIR/compare.txt"
5 changes: 4 additions & 1 deletion scripts/update_suite.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env ruby

# gobopt environment variable can be used to override goblint defaults and PARAMs

require 'find'
require 'fileutils'
require 'timeout'
Expand Down Expand Up @@ -116,6 +118,7 @@ def to_s
next unless thegroup.nil? or groupname == thegroup or # group x = only group x
(thegroup.start_with?"-" and groupname != thegroup[1..-1]) # group -x = all groups but x
grouppath = File.expand_path(d, testfiles)
next unless File.directory?(grouppath)
group = Dir.open(grouppath)
group.sort.each do |f|
next if File.basename(f)[0] == ?.
Expand Down Expand Up @@ -230,7 +233,7 @@ def to_s
pgid = Process.getpgid(pid)
puts "\t #{id} reached timeout of #{timeout}s!".red + " Killing pgid #{pgid}..."
timedout.push id
Process.kill('INT', -1*pgid)
Process.kill('KILL', -1*pgid)
p.ok = false
return p
end
Expand Down
15 changes: 8 additions & 7 deletions src/analyses/arinc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ module Functions = struct
else
match List.last args with
| AddrOf lv ->
Some (fun set ->
Some (
let ret = if GobConfig.get_bool "ana.arinc.assume_success" then ret_success else if List.mem fname with_timeout then ret_any else ret_no_timeout in
let v = vd ret in
debug_doc @@ Pretty.dprintf "effect of %s: set %a to %a" fname d_lval lv ValueDomain.Compound.pretty v;
set lv v
[(lv, v)]
)
| _ -> None
end

module Spec : Analyses.Spec =
module Spec : Analyses.MCPSpec =
struct
include Analyses.DefaultSpec

Expand Down Expand Up @@ -260,7 +260,8 @@ struct
(* M.debug_each @@ "BODY " ^ f.svar.vname ^" @ "^ string_of_int (!Tracing.current_loc).line; *)
(* if not (is_single ctx || !Goblintutil.global_initialization || fst (ctx.global part_mode_var)) then raise Analyses.Deadcode; *)
(* checkPredBot ctx.local "body" f.svar [] *)
let base_context = Base.Main.context_cpa @@ Obj.obj @@ List.assoc "base" ctx.presub in
let module BaseMain = (val Base.get_main ()) in
let base_context = BaseMain.context_cpa @@ Obj.obj @@ List.assoc "base" ctx.presub in
let context_hash = Hashtbl.hash (base_context, ctx.local.pid) in
{ ctx.local with ctx = Ctx.of_int (Int64.of_int context_hash) }

Expand Down Expand Up @@ -662,10 +663,10 @@ struct
) tasks
in
let f_d = snd (Tasks.choose tasks_f) in
{ f_d with pre = d.pre }
[{ f_d with pre = d.pre }]

let threadspawn ctx lval f args fctx = D.bot ()
let threadspawn ctx lval f args fctx = ctx.local
end

let _ =
MCP.register_analysis ~dep:["base"] (module Spec : Spec)
MCP.register_analysis ~dep:["base"] (module Spec : MCPSpec)
Loading