-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Andreas Pfohl edited this page Apr 22, 2015
·
17 revisions
Welcome to the Event Compiler wiki!
/* comment */
/* event declaration */
event SampleEvent { pos, time };
event EnheritanceEvent extends SampleEvent { angle };
/* predicate definition */
predicate sample_prediacte(SampleEvent sample_a, SampleEvent sample_b) :=
sample_a.pos == sample_b.pos;
/* function definition */
SampleEvent example(SampleEvent sampleEventA, SampleEvent sampleEventB) :=
{
pos = 3 * sampleEventA.pos,
time = [12.3]
};
/* rule declaration */
PosEqual: [SampleEvent, SampleEvent : sample_predicate] -> example;
This generates (.o
and .h
files):
int PosEqual_active(struct SampleEvent *, struct SampleEvent *);
struct SampleEvent *PosEqual_function(struct SampleEvent *, struct SampleEvent *); /* proxy function in header file */
struct SampleEvent *example(struct SampleEvent *, struct SampleEvent *); /* not exported into header */