Skip to content

SMT checker for various things#2993

Merged
axic merged 9 commits intodevelopfrom
trackVariables
Nov 22, 2017
Merged

SMT checker for various things#2993
axic merged 9 commits intodevelopfrom
trackVariables

Conversation

@chriseth
Copy link
Contributor

This can now handle conditions and while loops. It checks for conditions being constant and correctly erases knowledge about local variables at control flow join paths.

@chriseth chriseth force-pushed the trackVariables branch 2 times, most recently from 8633615 to 086ef89 Compare October 4, 2017 16:21
@chriseth
Copy link
Contributor Author

chriseth commented Oct 4, 2017

This can be merged in the current state.

@axic
Copy link
Contributor

axic commented Oct 5, 2017

Consider merging #3030 and rebase this after.

@chriseth
Copy link
Contributor Author

chriseth commented Oct 5, 2017

Is #3030 in conflict with this?

class FunctionTypeName;
class Mapping;
class ArrayTypeName;
class InlineAssembly;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't seem to be used in this PR, but it was missing anyway.

@axic
Copy link
Contributor

axic commented Oct 6, 2017

Should this be reviewed/merged or #3032?

@chriseth
Copy link
Contributor Author

chriseth commented Oct 6, 2017

#3032 is an extension of this. Please review this one.

@axic
Copy link
Contributor

axic commented Oct 6, 2017

This is failing tests though:

/home/travis/build/ethereum/solidity/libsolidity/formal/SMTChecker.cpp(674): fatal error in "void dev::solidity::SMTChecker::setZeroValue(const dev::solidity::Declaration &)": std::exception: 
/home/travis/build/ethereum/solidity/test/libsolidity/SMTChecker.cpp(91): last checkpoint

@chriseth
Copy link
Contributor Author

chriseth commented Oct 6, 2017

Cherry-picked a commit from #3032 that should fix the tests.

@chriseth
Copy link
Contributor Author

chriseth commented Oct 6, 2017

The remaining failure seems to be a travis issue.

@axic
Copy link
Contributor

axic commented Oct 13, 2017

Any reasonable way to split this? It seems to do a lot of different improvements.

@chriseth
Copy link
Contributor Author

Can you review the individual commits? "track variables" is probably the largest. I can try to split it up, but I fear it will be a lot of work.

@axic
Copy link
Contributor

axic commented Oct 13, 2017

I think I can pull out the renaming and the exceptions easily, the rest is mushy to me at the moment at least.

Based on the tests it seems it supports at least more variables, branching, bools.

{"+", 2},
{"-", 2},
{"*", 2},
{">=", 2}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, >= was duplicated.

@axic axic mentioned this pull request Oct 17, 2017
@axic
Copy link
Contributor

axic commented Oct 17, 2017

Rebased on #3091.

@axic
Copy link
Contributor

axic commented Oct 17, 2017

@chriseth you've pushed an old version over the rebased one. Any reason for it? In any case, please rebase.

@chriseth
Copy link
Contributor Author

You mean I rebased on top of an old version? Sorry, I don't know why that happened. I hope I did not lose any commits. Fixing...

@axic
Copy link
Contributor

axic commented Oct 17, 2017

I've rebased it on top of the cleanup branch, but hasn't changed anything. It should be safe as long as you had the last version before that :)

@axic
Copy link
Contributor

axic commented Oct 24, 2017

Are there are any asserts which should be solUnimplementedAssert?

@chriseth
Copy link
Contributor Author

I will take a look at the next iteration.

@chriseth
Copy link
Contributor Author

@axic can this be merged? We already have two other finished pull requests waiting on top of this one.

@axic
Copy link
Contributor

axic commented Nov 22, 2017

Rebased before merging as it was fairly old (had circleci too).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments