forked from hflicka/example-mlms
-
Notifications
You must be signed in to change notification settings - Fork 1
/
evoke_slot.mlm
50 lines (43 loc) · 1.27 KB
/
evoke_slot.mlm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
* You may run this MLM with: $ arden2bytecode -e evoke_slot.mlm
*
* To close the engine press "ctrl+c".
*/
maintenance:
title: Evoke Slot Example;;
mlmname: evoke_slot;;
arden: version 2.5;;
version: 2.0;;
institution: Peter L. Reichertz Institut;;
author: Hannes Flicka;;
specialist: Hannes Flicka; Mike Klimek;;
date: 2016-12-07;;
validation: testing;;
library:
purpose: Demonstration of the evoke slot;;
explanation:
The MLM is triggered immediately, by a constant time trigger. It then
calls an event, which triggers the MLM again every few second. Every
time it is run, it will write the TRIGGERTIME.
;;
keywords: example, arden syntax editor, arden2bytecode;;
links: http://arden2bytecode.sf.net/ ;;
knowledge:
type: data_driven;;
data:
LET evt BE EVENT {evt};
;;
evoke:
1800-01-01; // initial trigger, which lies in the past, runs only once
EVERY 2 seconds FOR 1 minute STARTING TIME OF evt;
;;
logic: CONCLUDE TRUE ;;
action:
IF evt THEN
WRITE "MLM executed on " || TRIGGERTIME;
ELSE
// MLM was not triggered by an event, but by the constant time trigger
CALL evt;
ENDIF;
;;
end: