Skip to content

Commit

Permalink
Rename folder and add Beyong-gil's evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
erlingrj committed Oct 24, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent bd364f8 commit e72086a
Showing 4 changed files with 40 additions and 1 deletion.
File renamed without changes.
38 changes: 38 additions & 0 deletions examples/C/src/TOMACS/Evaluation.lf
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
target C {
timeout: 1 sec,
tracing: true
}

reactor A (offset:time = 0, period:time = 100 msec){
timer t(offset, period)
input in: int
output out: int

reaction (t) -> out {=
lf_set(out, 42);
=}

reaction(in) {=
instant_t logical_time = lf_time_logical_elapsed();
instant_t physical_time = lf_time_physical_elapsed();

lf_print("The lag is " PRINTF_TIME ".", physical_time - logical_time);
=}
}

reactor B {
input in: int
output out: int

reaction(in) -> out {=
lf_set(out, in->value);
=}
}

federated reactor at localhost {
a = new A(offset = 0, period = 10 msec)
b = new B()

a.out -> b.in
b.out -> a.in
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Example LF programs from "Strongly-Consistent Distributed Discrete-Event Systems"
This folder contains the example LF programs found in the publication "Strongly-Consistent Distributed Discrete-Event Systems".
This folder contains the example LF programs found in the publication "Strongly-Consistent Distributed Discrete-Event
Systems".

0 comments on commit e72086a

Please sign in to comment.