-
Notifications
You must be signed in to change notification settings - Fork 84
Lab Course SoSe2025 - Pentagon Domain #1740
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
Open
feniup
wants to merge
209
commits into
goblint:master
Choose a base branch
from
feniup:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 193 commits
Commits
Show all changes
209 commits
Select commit
Hold shift + click to select a range
05b3577
For the PR; Created an initial file that differs;
b76013a
Added new empty files for new pntg analysis and domain
9210b70
First structure of the new pentagon domain
69f7978
Added top and bot functions to both modules
2fdf9a3
Type annotations and Inequlities module
599e38c
SUB leq
1bcdeee
leq and join
a9521a5
rewritten leq and join to adhere to Apron Environment type
3297211
Implemented meet and widen, fixed leq in SUB
5915bfb
Implementations for SUB.{top, is_top, narrow}
45eecfa
Added first naive implementation of intervals without including VarMa…
93d738b
Split domain operations and created methods for single intervals.
94dc528
Unit test setup
0aed838
Unfinished stuff; Fixed SUB functions to work with new environment stuff
1dde07c
Added first test cases
e9d3376
Fixed pentagon leq function
938a17c
Merge branch 'work' of github.com:feniup/analyzer-pentagon into work
9a8452b
removed unnecessary comment
c33e8ed
added narrow and meet
4f781fc
pentagon join implementation
50faefd
Merge branch 'work' of github.com:feniup/analyzer-pentagon into work
e474403
added test cases for sub domain
f59488b
Unit tests and some fixes
bd7996e
Added necessary dune config for pentagon unit testing
d786d42
Fixed some unit tests and the sub functionality of SUB.is_bot and SUB…
5f415cf
i broke everything on purpose
8c898b4
Removed unit tests viable for rewriting; Added implementation for dim…
d321084
Merge branch 'master' of github.com:goblint/analyzer
81227c2
Merge pull request #2 from feniup/upstream_merge
feniup 76edeec
Merge branch 'master' into work
6433901
Comments
818b050
Commented out all functions to revitalize dune build
3bdd498
New type for SUB
076e6cc
adapted to lists and added environment handling
c69744e
adapted dim_add dim_remove
539242a
SUB.dim_add
d92924e
Merge branch 'work' of github.com:feniup/analyzer-pentagon into work
4c5469e
adapted dim_add dim_remove
611884f
constructed top elem
98c457c
Removed SF functions
a186f20
Merge branch 'work' of github.com:feniup/analyzer-pentagon into work
0b54ec6
sub lattice functions
f64cb64
Added VarManagement and ExpressionBounds modules
b3cd550
Merge branch 'work' of github.com:feniup/analyzer-pentagon into work
5ec6b62
ocp-indent
9becdc4
meet implemenation
3e32676
Added comments to top and bot functions
8fb4eaa
SUB.dim_add unit tests
ad87825
Added comments to SUB.dim_add
738a245
dumb versions? of dim_remove
34b63d8
added widen function
6c2a63a
D.join
232b942
implemented leq
cc42dcb
added to_string for intervals
d4bd15d
Added simple methods for creating single intervals (useful for testing)
157e1a5
Merge branch 'work' of github.com:feniup/analyzer-pentagon into work
4d6e384
2 tests for dim_add and dim_remove in both modules
6e67c68
added bot, top, is_bot, is_top
db9b791
Added alias for module PentagonDomain.D in tests
b90f471
Merge branch 'work' of github.com:feniup/analyzer-pentagon into work
ad58823
Removed top and bot from submodules
a814e42
fixed is_top
629e8f7
fixed is_bot
7fd7ab4
bot handling and test for D.leq
be94122
added test and to_string method
fda1eb2
second D.leq test
212c46c
Merged test cases; Created content equal for PNTG module; Used List.a…
915c957
Tests for meet; Equal function for PNTG (module D)
92f858e
forget_vars D and SUB
6e2b263
added forget_var of intervals
4ec863d
SUB.forget_vars: also filter rhs
1c6cede
First assin_texpr parsing
03afb5a
First assin_texpr parsing
9f6f66c
First assin_texpr parsing
95e32d3
assign_texpr SUBs(x):=SUBs(y)
2a7ac44
Added signatures to remaining functions
d8da0eb
Merge branch 'work' of github.com:feniup/analyzer-pentagon into work
b3ef49d
Changed type of numbers to have exclusive values for infinities
88899ff
Added monadic type for intervals
1e8ef01
assign_texpr BinOps Add, Sub, Mul, Div, Mod and added some helpers
7e3c187
Minor refactoring
893c799
Separated modules Intervals and INTV; Fixed tests;
6d055fa
ocp-indent and fixed Interval.div
5ac19e9
Unfinished assign_texpr
ec60c0d
Interval.pow finished + added comments
ba16be2
Separated modules into different files
cdab2a2
added assign_parallell
da4a078
simple cases of assert_constraint
4ab699a
added more information to intervals at assert_constraint
dc587e5
Interval.pow: combined two cases
16cb382
D.assert_constraint: Fixes in interval_helper
db2bc0b
assert_constraint simple cases fixed
8bde05d
Broken pentagon analysis
8af1e7d
Added running command to c file
f4d0c6d
ZExt ops
933fa30
adapted comparision operators
16f46a4
ZExt comparison in module D
31dff46
Merge branch 'work' of github.com:feniup/analyzer-pentagon into work
f11bdf2
equality and dis-equality with zero :)
42a771f
Still broken analysis but a little bit better :,)
e9d2b46
changed config
e3c6e9b
Compute bound_texpr solely with information of Boxes
35c90c3
pretty
06f24a3
Some pretty printing
713bf2e
pretty print debugging
f13cffc
boxes naming
2ac95d6
Some more special cases of assertions
f535d6b
Equalized the string representations of boxes and sub
480dece
Tracing for assert_constraint and assign_texpr
98c1f87
Tracing for assert_constraint, assign_texpr, dim_add and dim_remove
17a94b1
Fixed merge
9f3af49
Fixed tracing output for dim_remove
fc12e86
assert_constraint: EQMOD
ea0cf5f
Changed tracing for assign_texpr to show variable
5f0918c
Added ZExtOps where missing
6915e65
config with pentagon
0ba75c3
Simple regression test for pentagons
ec0c16f
Merge pull request #3 from goblint/master
feniup f0075c7
Merge branch 'master' into work
4ad530c
Merge pull request #1 from feniup/work
feniup 1678ac4
Fix semgrep findings
20fd5d7
new Intv.rem, changed assert_constraint/EQMOD
2656089
deleted print debugging from lin2vareq
a7db0ce
Intv.rem sign handling
3a5a6f1
Merge branch 'work' of github.com:feniup/analyzer-pentagon into work
676facf
Pentagon regression tests with confusion
7600bbf
Pentagon regression tests with confusion
9b50181
Delete unnecessary config file
170d34f
Pentagon regression tests with confusion
8638530
assign_texpr with texpr to monomial conversion
73fb3b1
assign_texpr with texpr to monomial conversion
8cb4928
Comments for assign_texpr: x = ay + b
84b98f8
assign_texpr x=ay+b: SUBs(x) deletion
6c71339
Fixed build error: unbound t
de1d2e7
added updates for sub
7ff26f7
adapted conditionals
cdd0407
Fixed build error AGAIN
252cc43
Basic structure of new assert_constraint
df8434a
to_string now also replaces the variable indices in subs by their names
c341544
simple test
05d3038
to_string now also replaces the variable indices in subs by their names
01a6a4a
Merge branch 'work' of github.com:feniup/analyzer-pentagon into work
0422450
Removed old unit tests
d9cf43a
to_string now also replaces the variable indices in subs by their names
035ee07
Use deleted subs in assign_texpr
2ec7045
Refactored to_string
70fdd51
Merge branch 'work' of github.com:feniup/analyzer-pentagon into work
6cd707d
Renamed Sub to Subs
4bd9a24
Unit test for string
d0d5360
Separated Pentagons child-modules to different files
8095b9d
Minor refactoring
1f49021
Actually assert something in the unit test
7ff9c38
assign_texpr: general case
8adf09a
Special case for Modulo
239634b
Fixed modulo special case
783562e
Renamed some local variables to better match our thinking
3c8f49e
added first structure of assert_constraint
469bd22
Fixed build error at assert_constraint
73dfed9
Work in progress
d48888f
bug fixes, commenting in assign + assert
b786cbd
Work in progress
a5c8002
very difficult bug fix
20795ca
Added regression test
959161d
Work in progress
059c4d6
work in progress
06d83f4
Finished clever implementation mentioned by Miné
36c3d80
Merge pull request #4 from feniup/work
feniup e8dd393
Merge remote-tracking branch 'upstream/master'
1cfa46f
Merge branch 'master' of github.com:feniup/analyzer-pentagon
8233fea
Added regression test
d7451bb
First draft of the invariant function
c49c25d
Merge branch 'work' of github.com:feniup/analyzer-pentagon into work
c6ab1d9
Merge branch 'master' into work
01922b4
simple creduce script
af0eb38
Moved regression tests; Added TODOs; Added svcomp config for pentagon…
c1b761e
ocp-indent changes
14775a7
Merge pull request #5 from feniup/work
feniup 26237d0
Deriving hash and eq function; Verify in config set to true; removed …
3003524
Add a todo to bound_texpr
d98722d
Printing texpr and intv for bound_texpr
3e0821a
work in progress
8e8bed2
added consistency check between linearized and non-linearized interva…
538c94a
adapted narrowing for intb
51e1f83
adapted boses
040f5da
Fixed conversion from scalar to zext; Fixed narrowing for Pntg; Added…
1a8d3ce
Add gcc to creduce script
62fc115
Remove narrow for Subs; Timing.wrap for dim_add and dim_remove;
21a3ce6
Merge pull request #6 from feniup/work
feniup 29d32e8
Merge remote-tracking branch 'origin/master' into work
973e7a9
Added sub usage in bound_texpr and assign_texpr
f43c458
Adapted regression test because of added functionality
25e3913
Merge pull request #7 from feniup/work
feniup 9e59acc
Merge remote-tracking branch 'upstream/master'
f73bce5
Fixed pentagon memory issue
9c0fd4a
Reverted printing in Lin2Var assert_constraint
e09d123
Remove double semicolons
4006c89
Renamed eval_monoms_to_intv_infty_list
fa828c4
sign bug fix
078208f
PR suggested changes
6378161
Removed pentagon from unit test dune file
3c8a622
Reverted removing include_dir unqualified
22ff275
Merge upstream/master to origin/master
dced0b2
Add Pentagon Modules to goblint_lib.ml to satisfy docs/api-build gith…
b4670aa
Fixed failure reason of benchmarks
243ade6
running commands in regression tests
6277a22
Removed unnecessary todos.
4112c13
Merge branch 'master' of github.com:feniup/analyzer-pentagon
92fc5dd
Merge remote-tracking branch 'upstream/master'
cdf58e0
Moved pentagon regression tests; Added wrong_verdicts.md file for fur…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| { | ||
| "ana": { | ||
| "sv-comp": { | ||
| "enabled": true, | ||
| "functions": true | ||
| }, | ||
| "int": { | ||
| "def_exc": true, | ||
| "enums": false, | ||
| "interval": true | ||
| }, | ||
| "float": { | ||
| "interval": true, | ||
| "evaluate_math_functions": true | ||
| }, | ||
| "activated": [ | ||
| "base", | ||
| "threadid", | ||
| "threadflag", | ||
| "threadreturn", | ||
| "mallocWrapper", | ||
| "mutexEvents", | ||
| "mutex", | ||
| "access", | ||
| "race", | ||
| "escape", | ||
| "expRelation", | ||
| "mhp", | ||
| "assert", | ||
| "var_eq", | ||
| "symb_locks", | ||
| "region", | ||
| "thread", | ||
| "threadJoins", | ||
| "abortUnless", | ||
| "pentagon" | ||
| ], | ||
| "path_sens": [ | ||
| "mutex", | ||
| "malloc_null", | ||
| "uninit", | ||
| "expsplit", | ||
| "activeSetjmp", | ||
| "memLeak", | ||
| "threadflag" | ||
| ], | ||
| "context": { | ||
| "widen": false | ||
| }, | ||
| "base": { | ||
| "arrays": { | ||
| "domain": "partitioned" | ||
| } | ||
| }, | ||
| "race": { | ||
| "free": false, | ||
| "call": false | ||
| }, | ||
| "autotune": { | ||
| "enabled": true, | ||
| "activated": [ | ||
| "reduceAnalyses", | ||
| "mallocWrappers", | ||
| "noRecursiveIntervals", | ||
| "enums", | ||
| "congruence", | ||
| "octagon", | ||
| "wideningThresholds", | ||
| "loopUnrollHeuristic", | ||
| "memsafetySpecification", | ||
| "noOverflows", | ||
| "termination", | ||
| "tmpSpecialAnalysis" | ||
| ] | ||
| } | ||
| }, | ||
| "exp": { | ||
| "region-offsets": true | ||
| }, | ||
| "solver": "td3", | ||
| "sem": { | ||
| "unknown_function": { | ||
| "spawn": false | ||
| }, | ||
| "int": { | ||
| "signed_overflow": "assume_none" | ||
| }, | ||
| "null-pointer": { | ||
| "dereference": "assume_none" | ||
| } | ||
| }, | ||
| "witness": { | ||
| "yaml": { | ||
| "enabled": true, | ||
| "format-version": "2.0", | ||
| "entry-types": [ | ||
| "invariant_set" | ||
| ], | ||
| "invariant-types": [ | ||
| "loop_invariant" | ||
| ] | ||
| }, | ||
| "invariant": { | ||
| "loop-head": true, | ||
| "after-lock": false, | ||
| "other": false, | ||
| "accessed": false, | ||
| "exact": true | ||
| } | ||
| }, | ||
| "pre": { | ||
| "enabled": false | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| { | ||
| "ana": { | ||
| "activated": [ | ||
| "assert", | ||
| "pentagon" | ||
| ] | ||
| }, | ||
| "result": "none", | ||
| "solver": "td3", | ||
| "solvers": { | ||
| "td3": { | ||
| "term": true, | ||
| "space": false, | ||
| "space_cache": true, | ||
| "space_restore": true | ||
| } | ||
| }, | ||
| "verify": true | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Run creduce like: | ||
| # creduce --timeout 900 ./scripts/creduce/incremental.sh /home/feniuk/University-Coding/bench/coreutils/cksum_comb.minimized.c | ||
|
|
||
|
|
||
| GOBLINTDIR="/home/feniuk/University-Coding/analyzer-pentagon/goblint" | ||
| INPUTFILE="/home/feniuk/University-Coding/bench/coreutils/cut_comb.minimized.c" | ||
| OUTPUTFILE="fe8f7af3a.out" | ||
| PARAMS="--set ana.activated[+] pentagon --enable allglobs --enable dbg.timing.enabled" | ||
|
|
||
| $GOBLINTDIR $INPUTFILE $PARAMS -v &> out.txt; | ||
| if [ $? -eq 2 ]; then | ||
| gcc $INPUTFILE -o $OUTPUTFILE && rm $OUTPUTFILE &> /dev/null && | ||
| grep "Fatal error: exception IntDomain0.ArithmeticOnIntegerBot(\"Error int op 8\")" "out.txt" >/dev/null 2>&1 | ||
| else | ||
| exit 5 | ||
| fi | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| (** Analysis using the pentagon domain (pntg) | ||
| @see <https://doi.org/10.1016/j.scico.2009.04.004> | ||
| "Pentagons: A weakly relational abstract domain for the efficient validation of array accesses" | ||
| -- Francesco Logozzo, Manuel Fähndrich (2010) *) | ||
|
|
||
| open Analyses | ||
| include RelationAnalysis | ||
|
|
||
| let spec_module: (module MCPSpec) Lazy.t = | ||
| lazy ( | ||
| let module AD = PentagonDomain.D2 | ||
| in | ||
| let module Priv = (val RelationPriv.get_priv ()) in | ||
| let module Spec = | ||
| struct | ||
| include SpecFunctor (Priv) (AD) (RelationPrecCompareUtil.DummyUtil) | ||
| let name () = "pentagon" | ||
| end | ||
| in | ||
| (module Spec) | ||
| ) | ||
|
|
||
| let get_spec (): (module MCPSpec) = | ||
| Lazy.force spec_module | ||
|
|
||
| let after_config () = | ||
| let module Spec = (val get_spec ()) in | ||
| MCP.register_analysis (module Spec : MCPSpec); | ||
| GobConfig.set_string "ana.path_sens[+]" (Spec.name ()) | ||
|
|
||
| let _ = | ||
| AfterConfig.register after_config |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| (* This analysis is empty on purpose. It serves only as an alternative dependency | ||
| in cases where the actual domain can't be used because of a missing library. | ||
| It was added because we don't want to fully depend on Apron. *) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my experience you want a GCC in this loop, otherwise it will minimize into some strange thing that CIL accepts but is not really C anymore.