Skip to content

Commit

Permalink
Pass
Browse files Browse the repository at this point in the history
  • Loading branch information
bobismijnnaam committed Oct 12, 2023
1 parent 9867f86 commit 0d8df1e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion examples/concepts/javabip/casinoAdjusted/Operator.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ public class Operator {
int amountToMove;

//@ requires id != null;
//@ requires funds >= 0;
Operator (Integer id, int funds) throws Exception {
this.id = id;
if (funds < 0) throw new Exception("Cannot have negative funds");
// if (funds < 0) throw new Exception("Cannot have negative funds");
wallet = funds;
amountToMove = 0;
//@ ghost System.staticInvariant();
Expand Down
3 changes: 2 additions & 1 deletion examples/concepts/javabip/casinoBroken/Operator.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ public class Operator {
int amountToMove;

//@ requires id != null;
//@ requires funds >= 0;
Operator (Integer id, int funds) throws Exception {
this.id = id;
if (funds < 0) throw new Exception("Cannot have negative funds");
// if (funds < 0) throw new Exception("Cannot have negative funds");
wallet = funds;
amountToMove = 0;
//@ ghost System.staticInvariant();
Expand Down
2 changes: 1 addition & 1 deletion src/rewrite/vct/rewrite/bip/EncodeBip.scala
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ case class EncodeBip[Pre <: Generation](results: VerificationResults) extends Re
},
contract(requires = UnitAccountedPredicate(dispatch(constructor.requires)),
blame = constructor.blame)
)(PanicBlame("Unexpected error, failing precondition on JavaBIP constructor should not happen"))
)(PanicBlame("Unexpected error, failing precondition on JavaBIP constructor should not happen"))(constructor.o)
)
}

Expand Down

0 comments on commit 0d8df1e

Please sign in to comment.