Skip to content

Commit

Permalink
Some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
joukestoel committed Oct 27, 2020
1 parent 44761da commit 92d3f37
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 132 deletions.
21 changes: 0 additions & 21 deletions examples/paper/example/Person.rebel

This file was deleted.

6 changes: 3 additions & 3 deletions examples/paper/example/Transaction.rebel
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec Transaction

states:
(*) -> created: create;
created -> (*): book;//, fail;
created -> (*): book, fail;

spec SimpleAccount
balance: Integer;
Expand All @@ -32,13 +32,13 @@ spec SimpleAccount
pre: amount > 0;
post: this.balance' = this.balance + amount;

assume PositiveBalance = always forall a:SimpleAccount | (a is initialized => a.balance >= 0);
assume PositiveBalance = always forall a:SimpleAccount | a.balance >= 0;

states:
opened -> opened: withdraw, deposit;

//config BasicTrans = t: Transaction is uninitialized, ac1,ac2: Account is uninitialized, an1,an2: AccountNumber, d1:Date, d2:Date;
config SimplifiedTrans = t: Transaction is uninitialized, ac1,ac2: SimpleAccount abstracts Account;
config SimplifiedTrans = t: Transaction is uninitialized, ac1,ac2: SimpleAccount mocks Account;

assert CanBookATransaction = eventually exists t: Transaction | book on t;
assert TransactionsDontGetStuck = always forall t: Transaction | (t is initialized => eventually t is finalized);
Expand Down
100 changes: 0 additions & 100 deletions examples/paper/example/transaction.alle

This file was deleted.

13 changes: 7 additions & 6 deletions examples/paper/performance/rebel/RiverCrossing.rebel
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,25 @@ module paper::performance::rebel::RiverCrossing
spec Cargo
eats: ?Cargo;

internal event cross()
internal event crossToFar()
internal event crossToNear()

assume DontBeAloneWithFood = always forall c1:Cargo, c2: Cargo, f:Farmer | (c1 != c2 && c2 = c1.eats =>
assume DontBeAloneWithFood = always forall c1:Cargo, c2: Cargo, f:Farmer | (c2 = c1.eats =>
if (c1 is near && c2 is near) then f is near
else if (c1 is far && c2 is far) then f is far);

states:
near -> far: cross;
far -> near: cross;
near -> far: crossToFar;
far -> near: crossToNear;

spec Farmer
event crossAlone()

event crossToFar(cargo: Cargo)
pre: cargo is near, cargo.cross();
pre: cargo.crossToFar();

event crossToNear(cargo: Cargo)
pre: cargo is far, cargo.cross();
pre: cargo.crossToNear();

states:
near -> far: crossAlone, crossToFar;
Expand Down
1 change: 0 additions & 1 deletion examples/paper/performance/rebel/RopeBridge.rebel
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ assert EverybodyCrossedInTheLeastTime
assert CantGoquicker
= eventually ((forall a: Adventurer | a is far) && (exists t: Torch | t.totalTimeSpend < 17));


config EverybodyNear
= a1,a2,a3,a4: Adventurer is near,
t: Torch is near with totalTimeSpend = 0,
Expand Down
2 changes: 1 addition & 1 deletion examples/paper/sepact/messages/checks/CTChecks.rebel
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ config SingleCT = p1,p2:Party,

spec MockIBAN

config SimpleCT = ib1,ib2:MockIBAN abstracts IBAN,
config SimpleCT = ib1,ib2:MockIBAN mocks IBAN,
m: Money,
d: Date,
ct: CustomerCreditTransferRequest forget originator, remittanceInfo,
Expand Down

0 comments on commit 92d3f37

Please sign in to comment.