-
Notifications
You must be signed in to change notification settings - Fork 9
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
CSE with merging node #889
Open
Stevengre
wants to merge
19
commits into
master
Choose a base branch
from
jh/cse-with-merging-node
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
Conversation
This file contains 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
Stevengre
commented
Nov 20, 2024
Stevengre
commented
Nov 20, 2024
@@ -70,6 +69,7 @@ def test_foundry_dependency_automated( | |||
'run_constructor': run_constructor, | |||
'force_sequential': force_sequential, | |||
'enum_constraints': True, | |||
'break_on_calls': True, |
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.
change the options to review the effects easily.
Stevengre
commented
Nov 26, 2024
src/kontrol/prove.py
Outdated
@@ -478,7 +478,7 @@ def create_kcfg_explore() -> KCFGExplore: | |||
progress.update(task, advance=1, status='Finished') | |||
|
|||
if options.minimize_proofs or options.config_type == ConfigType.SUMMARY_CONFIG: | |||
proof.minimize_kcfg() | |||
proof.minimize_kcfg(heuristics=KEVMSemantics(), merge=True) |
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.
CSE with merging node
Stevengre
requested review from
PetarMax,
palinatolmach,
anvacaru and
ehildenb
November 27, 2024 10:19
Stevengre
force-pushed
the
jh/cse-with-merging-node
branch
from
December 2, 2024 02:16
39bfbfd
to
bd201f5
Compare
Stevengre
force-pushed
the
jh/cse-with-merging-node
branch
3 times, most recently
from
December 11, 2024 05:16
de09a9f
to
b3ae412
Compare
Stevengre
force-pushed
the
jh/cse-with-merging-node
branch
from
December 16, 2024 03:20
3a26bf5
to
7f5a6f7
Compare
…an error of our implementation
…fe122fe6ff752b21cb2885`
Stevengre
force-pushed
the
jh/cse-with-merging-node
branch
from
December 17, 2024 04:35
7f5a6f7
to
1a46565
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
merging node during CSE. Goal:
Way to validate the result
Answered Questions
ArithmeticContract.add_sub_external(uint256,uint256,uint256)
should have 2 CSE steps, but got 0 since we minimized the KCFG.foundryup --version nightly-a0a002020be4c40946fe122fe6ff752b21cb2885
CallableStorageTest.test_str()
is failed to apply the generated rule for CSE. Additionally,CallableStorageContract.str()
should be explored. Moreover, the KCFG forCallableStorageTest.test_str()
looks weird and can be improved.assertEq
for strings now. And the behavior is different between the CI foundry version and latest foundry version.ContractFieldTest.testEscrowToken()
is similar toConstructorTest.test_str()
, then why it is passed?ImportedContract.set(uint256)
?if
block in the function.Questions with uncertain anwser
Enum.enum_storage_range()
andEnum.enum_argument_range(uint8)
?Identity.applyOp(uint256)
andIdentity.identity(uint256)
?My guess: It is caused by the different process ways provided by the compiler.
What is
Enum.init
? The construction ofEnum
? AlsoConstructorTest.init
andImportedContract.init
?MergeKCFGTest.test_branch_merge(uint256,uint256,bool)
is passed but I don't know why it applied 3 times of CSE rather than 2?Branches.applyOp(uint256,uint256,bool).cse.expected
is not correct. It has 6 rules rather than 1.Things can be improved latter
ConstructorTest.test_contract_call()
utilizes concrete values which cannot validate the CSE efficiently.PY Script to check the CSE application for tests
Results
Updated: 2024/12/11