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

Manticore verifier #1717

Merged
merged 116 commits into from
Jun 26, 2020
Merged
Show file tree
Hide file tree
Changes from 101 commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
0cd1bc5
Add ONE failing test
feliam May 13, 2020
609a37e
Fix test
feliam May 13, 2020
b29f3ac
Try fix get-related
feliam May 13, 2020
5bad00f
Snapshots
feliam May 15, 2020
5bb6e48
CC
feliam May 17, 2020
f78e1c2
Allow snapshooting just from main()
feliam May 17, 2020
8cc6f6c
A test
feliam May 18, 2020
5997dab
Test and fix is_main
feliam May 18, 2020
252b10b
CC
feliam May 18, 2020
384de08
review
feliam May 26, 2020
d044b07
ismain vs is_running
feliam May 26, 2020
ec8440e
is main to is main script
feliam May 26, 2020
25d8b26
Remove unused member variable
feliam May 27, 2020
62360a0
Merge branch 'master' into dev-checkpoints
feliam May 27, 2020
f912266
initial import manticore verifier
feliam May 27, 2020
63557e5
Fix verifier installation
feliam May 27, 2020
b49f4af
clear ready states
feliam May 28, 2020
f275e3a
CC and smoke test
feliam May 28, 2020
84f1e5a
CC
feliam May 28, 2020
6cb271c
Increase cov
feliam May 28, 2020
79aa5cc
Move regression to other
feliam Jun 2, 2020
7339eb9
blkn
feliam Jun 2, 2020
c121c38
blkn
feliam Jun 2, 2020
3ff6b95
Move get related
feliam Jun 5, 2020
4414987
merge
feliam Jun 5, 2020
02b4c69
Merge branch 'master' into dev-get-related
feliam Jun 5, 2020
00e8199
CC
feliam Jun 5, 2020
6b7f671
fix concolic
feliam Jun 5, 2020
6732eb2
lint
feliam Jun 5, 2020
4adeac2
DivByZero default to zero
feliam Jun 5, 2020
7565b4a
blkn
feliam Jun 5, 2020
1680397
Update manticore/core/smtlib/solver.py
feliam Jun 5, 2020
cbe55b9
Update manticore/core/smtlib/constraints.py
feliam Jun 5, 2020
315ef64
Update manticore/core/smtlib/constraints.py
feliam Jun 5, 2020
6155a4d
remove odd string
feliam Jun 5, 2020
38dbfd6
Merge branch 'dev-get-related' of github.com:trailofbits/manticore in…
feliam Jun 5, 2020
1491cbd
lint
feliam Jun 5, 2020
264eb04
mypy lint
feliam Jun 5, 2020
e0130a4
Update manticore/core/smtlib/visitors.py
feliam Jun 5, 2020
d0e9abf
lint
feliam Jun 5, 2020
9807b37
Add Docs
feliam Jun 8, 2020
728e021
Merge branch 'master' into dev-get-related
feliam Jun 9, 2020
0630832
Merge branch 'master' into dev-verifier
feliam Jun 9, 2020
5d30b13
blkn
feliam Jun 9, 2020
e584fb2
merge
feliam Jun 9, 2020
be0d2f5
blkn
feliam Jun 9, 2020
bf3a2b9
Replace modulo with masks
Jun 10, 2020
3eb96f8
Blacken
Jun 10, 2020
5e54189
blkn
feliam Jun 10, 2020
a0ab429
Merge branch 'dev-get-related' of github.com:trailofbits/manticore in…
feliam Jun 10, 2020
536ec71
fix mypy
feliam Jun 10, 2020
a83e8c2
fix mypy
feliam Jun 10, 2020
4447b87
merge
feliam Jun 10, 2020
36292fb
More commandline arguments
feliam Jun 10, 2020
37144d9
Add tests for signed LT behavior
Jun 10, 2020
1b8754d
New test
feliam Jun 10, 2020
787e51f
Fix constant folding
feliam Jun 10, 2020
dca9adb
merge
feliam Jun 10, 2020
dfa7a84
lint
feliam Jun 10, 2020
0ebece8
blkn
feliam Jun 10, 2020
b841038
lint
feliam Jun 10, 2020
fa2ef90
Fixes...
feliam Jun 10, 2020
735a963
lint
feliam Jun 10, 2020
b54a448
Unittesting power
feliam Jun 10, 2020
02563cd
Permisive read_buffer
feliam Jun 10, 2020
1dcb9ed
Merge branch 'dev-get-related' into dev-verifier
feliam Jun 10, 2020
451ba59
Fix optimize
feliam Jun 10, 2020
3fab981
Preserve precision in constant folding
Jun 10, 2020
f7fb8bb
Strip left-in print debugging
Jun 11, 2020
2b05f8b
blkn
feliam Jun 11, 2020
f9120de
remove wasm_sym temporarily
feliam Jun 11, 2020
a502b61
Better simplification for constants
feliam Jun 11, 2020
a7c3c18
Add json
feliam Jun 11, 2020
816b29a
blkn
feliam Jun 11, 2020
9a15dff
Better commmandline args
feliam Jun 11, 2020
88318fe
blkn
feliam Jun 11, 2020
2f5d4d2
fix wasm
feliam Jun 11, 2020
18064f8
Merge branch 'dev-get-related' of github.com:trailofbits/manticore in…
feliam Jun 11, 2020
52d8eb4
Fix
feliam Jun 11, 2020
4eeb74b
better commanlining
feliam Jun 12, 2020
f1dfb80
REmove get_related from the default path and fix arm test
feliam Jun 12, 2020
d5b577e
blkn
feliam Jun 12, 2020
79b42ed
fix related to tests
feliam Jun 12, 2020
ec8489f
blkn
feliam Jun 12, 2020
3377856
merge get-related
feliam Jun 12, 2020
2113a73
Fix bug in test and disable debug messages in Solver
feliam Jun 12, 2020
c2a21ba
smtlib config to disable multiple check-sat in newer z3
feliam Jun 12, 2020
962d454
Merge branch 'dev-get-related' into dev-verifier
feliam Jun 12, 2020
f87e1e2
Disable log test and fix merging poc vs variable migration
feliam Jun 15, 2020
2eb630d
blkn
feliam Jun 15, 2020
8818ea3
Avoid exception in some callbacks
feliam Jun 15, 2020
ebb118e
Merge branch 'dev-get-related' into dev-verifier
feliam Jun 15, 2020
35b61d0
can_rais at did_will
feliam Jun 15, 2020
009cad5
yikes!
feliam Jun 16, 2020
12068eb
blkn
feliam Jun 16, 2020
b1998ea
Yices found one more states in truffle
feliam Jun 16, 2020
d620bdc
merge
feliam Jun 17, 2020
f3049ec
Add a config constant to ignore symbolic balances
feliam Jun 17, 2020
ac86c60
Add a config constant to ignore symbolic balances 2
feliam Jun 17, 2020
cc3ee9d
Relax truffle state count
feliam Jun 17, 2020
c25e363
Relax truffle state count 2
feliam Jun 17, 2020
0d070b1
Change cli name and test
feliam Jun 18, 2020
32ec10d
Clear redy states in verifier workspace
feliam Jun 18, 2020
c982275
Clear ready states in verifier workspace
feliam Jun 18, 2020
81316aa
Relative ws path on verifier output. Clean CREATE testcase example
feliam Jun 18, 2020
d093783
Blkn
feliam Jun 18, 2020
cfe4316
Merge branch 'master' into dev-verifier
feliam Jun 22, 2020
5543e29
Improve coverage and funcid solving
feliam Jun 23, 2020
ec308e2
lint
feliam Jun 23, 2020
90de280
Better testcase generation at verifier
feliam Jun 24, 2020
27fb790
Better testcase generation at verifier and typos
feliam Jun 24, 2020
8c80a1d
merge
feliam Jun 24, 2020
08f39ae
Better output and default re
feliam Jun 25, 2020
d421061
Test must revert
feliam Jun 25, 2020
1e362ac
Better output and default re
feliam Jun 25, 2020
6d4a8e3
move generate_testcase_ex to private method
feliam Jun 26, 2020
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ jobs:
coverage run -m manticore . --contract MetaCoin --workspace output --exclude-all --evm.oog ignore --evm.txfail optimistic
# Truffle smoke test. We test if manticore is able to generate states
# from a truffle project.
if [ "$(ls output/*tx -l | wc -l)" != "26" ]; then
echo "Truffle test failed" `ls output/*tx -l | wc -l` "!= 26"
if [ "$(ls output/*tx -l | wc -l)" -lt "25" ]; then
echo "Truffle test failed" `ls output/*tx -l | wc -l` "< 25"
return 1
fi
echo "Truffle test succeded"
Expand Down
4 changes: 1 addition & 3 deletions manticore/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,7 @@ def positive(value):
)

eth_flags.add_argument(
"--limit-loops",
action="store_true",
help="Avoid exploring constant functions for human transactions",
"--limit-loops", action="store_true", help="Limit loops depth",
)

eth_flags.add_argument(
Expand Down
10 changes: 10 additions & 0 deletions manticore/core/manticore.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,16 @@ def clear_terminated_states(self):
self._remove(state_id)
assert self.count_terminated_states() == 0

@sync
@at_not_running
def clear_ready_states(self):
feliam marked this conversation as resolved.
Show resolved Hide resolved
""" Simply remove all states from terminated list """
terminated_states_ids = tuple(self._terminated_states)
for state_id in terminated_states_ids:
self._terminated_states.remove(state_id)
self._remove(state_id)
assert self.count_terminated_states() == 0

def __str__(self):
return f"<{str(type(self))[8:-2]}| Alive States: {self.count_ready_states()}; Running States: {self.count_busy_states()} Terminated States: {self.count_terminated_states()} Killed States: {self.count_killed_states()} Started: {self._running.value} Killed: {self._killed.value}>"

Expand Down
2 changes: 1 addition & 1 deletion manticore/core/smtlib/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ def get_value(self, constraints: ConstraintSet, *expressions):
"""
values = []
start = time.time()
with constraints as temp_cs:
with constraints.related_to(*expressions) as temp_cs:
for expression in expressions:
if not issymbolic(expression):
values.append(expression)
Expand Down
Loading