Skip to content

Commit 858151b

Browse files
committed
more syntax fixes
1 parent 45c60ae commit 858151b

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

examples/src/main/scala/FilterServer.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ package object implementation {
5252
lastForwarded = i2
5353
send(o, y) >>
5454
loop(RecX)
55-
}
55+
}
5656
}
5757
}
5858
}
@@ -71,7 +71,7 @@ package object implementation {
7171
} else {
7272
send(o, y) >>
7373
loop(RecX)
74-
}
74+
}
7575
}
7676
}
7777
}
@@ -89,12 +89,12 @@ package object implementation {
8989
par(
9090
producer(data1),
9191
producer(data2),
92-
receive(cm) { code: FilterCode =>
92+
receive(cm) { (code: FilterCode) =>
9393
code(data1, data2, o)
9494
}
9595
)
9696
}
97-
}
97+
}
9898

9999
// To run this example, try:
100100
// sbt "examples/runMain effpi.examples.filterserver.Main"

examples/src/main/scala/demo/MiniAudit.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ package object implementation {
5151
@verify(property = "reactive(mb_)(aud) && responsive(mb_)(aud) && output_eventually_followed(aud)(Accepted)(mb_)")
5252
def payment(aud: ActorRef[Audit[_]]): Actor[Pay, Payment[aud.type]] = {
5353
forever {
54-
read { pay: Pay =>
54+
read { (pay: Pay) =>
5555
if (pay.amount > 42000) {
5656
send(pay.replyTo, Rejected())
5757
} else {
@@ -64,7 +64,7 @@ package object implementation {
6464

6565
def auditor: Actor[Audit[_], Process] = forever {
6666
println(s"Auditor: waiting for notification...")
67-
read { audit: Audit[_] =>
67+
read { (audit: Audit[_]) =>
6868
println(s"Auditor: received notification for payment: ${audit.payment}")
6969
nil
7070
}
@@ -73,7 +73,7 @@ package object implementation {
7373
def client(id: Int, pay: ActorRef[Pay], amount: Int): Actor[Result, Process] = {
7474
println(s"Client: trying to pay €${amount}...")
7575
send(pay, Pay(amount, self)) >>
76-
read { result: Result =>
76+
read { (result: Result) =>
7777
result match {
7878
case Accepted() => {
7979
println(s"Client ${id}: payment of €${amount} accepted")
@@ -101,7 +101,7 @@ object Main {
101101
println("Running demo...")
102102
val auditRef = Actor.spawn(Behavior[Audit[_], Process](auditor))
103103
val paymentRef = Actor.spawn(Behavior[Pay, Process](payment(auditRef)))
104-
104+
105105
for (i <- 1 to 10) {
106106
Actor.spawn(Behavior[Result, Process](client(i, paymentRef, i * 10000)))
107107
}

examples/src/main/scala/verifier/Process.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ object ProcessVerifExamples {
5050
(implicit timeout: Duration): Process3Cont[c1.type, c2.type] = {
5151
println("P2: Sending 42, waiting for answer")
5252
send(c1, 42) >>
53-
receive(c2) { x: String =>
53+
receive(c2) { (x: String) =>
5454
println(s"P2: Received: ${x}")
5555
nil
5656
}
@@ -64,7 +64,7 @@ object ProcessVerifExamples {
6464
// fork(test3spawn(c1, c2)) >>
6565
// test3cont(c1, c2)
6666
//}
67-
67+
6868
@verify(property = "no_output_use(c2)")
6969
def test_no_output_use(c1: Channel[Int],
7070
c2: Channel[String]): Out[c1.type, Int] = ???

0 commit comments

Comments
 (0)