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

Add modifies clauses #220

Open
shuvendu-lahiri opened this issue Nov 23, 2019 · 2 comments
Open

Add modifies clauses #220

shuvendu-lahiri opened this issue Nov 23, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@shuvendu-lahiri
Copy link
Member

No description provided.

@shuvendu-lahiri shuvendu-lahiri added the enhancement New feature or request label Nov 24, 2019
@shuvendu-lahiri
Copy link
Member Author

One issue with the current prototype is that the line number for the violation of a modifies is always the last statement of the function, as it is installed as a postcondition in Boogie.

@shuvendu-lahiri
Copy link
Member Author

Support modifies clause for Boolean maps and nested maps.

import "./Libraries/VeriSolContracts.sol";

contract Test {
	mapping (address => bool) public mapBool;
	
	constructor() public {}
	
	function modBool(address a, address b) public {	
                mapBool[a] = true;
                mapBool[b] = true;
		VeriSol.Modifies(mapBool, [a, b]); // should pass
		VeriSol.Modifies(mapBool, [a]);     // should fail
		VeriSol.Modifies(mapBool, [b]);     // should fail
	}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant