-
Notifications
You must be signed in to change notification settings - Fork 5
Symbolic abstractions #131
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
giltho
wants to merge
24
commits into
main
Choose a base branch
from
cleanup-4
base: main
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 all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
e55d996
more doc
giltho 0862a8a
doc
giltho 31b8647
In progress
giltho aa8c50a
Implement symbolic maps
giltho face434
tinsy bit of doc
giltho 8a33485
kill channels.ml
giltho 587668a
more doc
giltho 20a8a91
bits of doc
giltho d5f1bec
symbolic integers
giltho ac53dd3
Explicit S_bool module
giltho a14070f
S_elt is printable
giltho 7e9c460
Symbolic ranges
giltho cd94263
S_int doesn't use infix
giltho 6b3244d
Make_syntax for S_int
giltho 6a4556c
syntaxes
giltho 4445595
this is actually what I need
giltho 6144648
more juggling around
giltho 186ce51
let's go! Tree_block now uses proper S_int
giltho 0c4413c
Update soteria/lib/sym_data/sym_data.ml
giltho c34fa4f
post-rebase fixups
giltho a90dd45
Merge branch 'main' into cleanup-4
giltho 9b1e149
Merge branch 'main' into cleanup-4
giltho 0bac1ec
promote test
giltho b6e0ad2
woops
giltho 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
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
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
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
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
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
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 | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -19,26 +19,31 @@ module Make (Sptr : Sptr.S) = struct | |||||||||||||
| module TB = Soteria.Sym_states.Tree_block | ||||||||||||||
| module Symex = DecayMapMonad | ||||||||||||||
|
|
||||||||||||||
| module SBoundedInt = struct | ||||||||||||||
| include Typed | ||||||||||||||
| include Typed.Infix | ||||||||||||||
| module Bounded_int = struct | ||||||||||||||
| module Symex = Symex | ||||||||||||||
|
|
||||||||||||||
| type sint = T.sint | ||||||||||||||
| type sbool = T.sbool | ||||||||||||||
| type t = T.sint Typed.t | ||||||||||||||
|
|
||||||||||||||
| let zero () = Typed.BitVec.usize Z.zero | ||||||||||||||
| let ( <@ ) = Typed.Infix.( <$@ ) | ||||||||||||||
| let ( <=@ ) = Typed.Infix.( <=$@ ) | ||||||||||||||
| let one () = Typed.BitVec.usize Z.one | ||||||||||||||
|
|
||||||||||||||
| (* We assume addition/overflow within the range of an allocation may never overflow. | ||||||||||||||
| This allows extremely good reductions around inequalities, which Tree_block relies on. *) | ||||||||||||||
| let ( +@ ) = Typed.Infix.( +!!@ ) | ||||||||||||||
| let ( -@ ) = Typed.Infix.( -!!@ ) | ||||||||||||||
|
|
||||||||||||||
| let in_bound (v : sint Typed.t) : sbool Typed.t = | ||||||||||||||
| let in_bound (v : t) : S_bool.t Typed.t = | ||||||||||||||
| let max = Layout.max_value_z (TInt Isize) in | ||||||||||||||
| let max = Typed.BitVec.usize max in | ||||||||||||||
| v >=@ zero () &&@ (v <=@ max) | ||||||||||||||
|
|
||||||||||||||
| let pp = Value.ppa | ||||||||||||||
| let of_z z = Typed.BitVec.usize z | ||||||||||||||
| let subst = Typed.subst | ||||||||||||||
| let iter_vars v f = Typed.iter_vars v f | ||||||||||||||
| let equal = Typed.equal | ||||||||||||||
| let sem_eq = Typed.sem_eq | ||||||||||||||
| let distinct = Typed.distinct | ||||||||||||||
| let add = Infix.( +!@ ) | ||||||||||||||
| let sub = Infix.( -!@ ) | ||||||||||||||
|
Comment on lines
+42
to
+43
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here, see original code
Suggested change
|
||||||||||||||
| let to_z = Typed.BitVec.to_z | ||||||||||||||
| let lt = Infix.( <@ ) | ||||||||||||||
| let leq = Infix.( <=@ ) | ||||||||||||||
| end | ||||||||||||||
|
|
||||||||||||||
| let pp_init ft (v, ty) = | ||||||||||||||
|
|
||||||||||||||
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
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
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.
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.
you should mark these as checked since we assume no overflows within blocktrees