diff --git a/examples/C/src/zero-delay-cycles/Consistency.lf b/examples/C/src/zero-delay-cycles/Consistency.lf index 7f115f8c..5597af55 100644 --- a/examples/C/src/zero-delay-cycles/Consistency.lf +++ b/examples/C/src/zero-delay-cycles/Consistency.lf @@ -14,17 +14,15 @@ reactor Controller { state latest_control: double = 0.0 state first: bool = true - reaction c1(local_update, remote_update) {= - =} + reaction c1(local_update, remote_update) {= =} - reaction c2(local_update) -> control {= - =} + reaction c2(local_update) -> control {= =} } reactor Platform { input update: double output publish: double - + c = new Controller() p = new PhysicalPlant() p.sensor -> c.local_update @@ -36,7 +34,7 @@ reactor Platform { federated reactor { p1 = new Platform() p2 = new Platform() - + p1.publish -> p2.update p2.publish -> p1.update } diff --git a/examples/C/src/zero-delay-cycles/ZeroDelayCycle.lf b/examples/C/src/zero-delay-cycles/ZeroDelayCycle.lf index 08230aba..c2473134 100644 --- a/examples/C/src/zero-delay-cycles/ZeroDelayCycle.lf +++ b/examples/C/src/zero-delay-cycles/ZeroDelayCycle.lf @@ -1,8 +1,8 @@ target C -reactor A (Period:time = 1 msec) { - input in:int - output out:int +reactor A(Period: time = 1 msec) { + input in: int + output out: int timer t(0, Period) @@ -15,10 +15,10 @@ reactor A (Period:time = 1 msec) { =} } - reactor B { - input in:int - output out:int + input in: int + output out: int + reaction(in) -> out {= lf_set(out, in->value); =} @@ -30,4 +30,4 @@ federated reactor { a.out -> b.in b.out -> a.in -} \ No newline at end of file +}