mirror of https://github.com/crytic/echidna
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
600 B
31 lines
600 B
pragma solidity ^0.4.16;
|
|
|
|
contract Canal {
|
|
bool private first_gate_up=false;
|
|
bool private second_gate_up=true;
|
|
|
|
function lower(bool first_gate) returns (bool){
|
|
if(first_gate) {
|
|
if(second_gate_up) {
|
|
first_gate_up = false;
|
|
return(true);
|
|
} else {
|
|
return(false);
|
|
}
|
|
} else {
|
|
if(first_gate_up) {
|
|
second_gate_up = false;
|
|
return true;
|
|
} else {
|
|
return(false);
|
|
}
|
|
}
|
|
}
|
|
function raise(bool first_gate) {
|
|
if(first_gate) {
|
|
first_gate_up = true;
|
|
} else {
|
|
second_gate_up = true;
|
|
}
|
|
}
|
|
}
|
|
|