blob: 266bd8d6bc63f3953e493570ac0b766a60bb83c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<scxml datamodel="prolog" initial="start" binding="late">
<datamodel>
<data id="facts">
% see http://www.swi-prolog.org/FAQ/Multifile.html
:- multifile animal/1.
cat(tom).
animal(X):- cat(X).
</data>
</datamodel>
<script>
mouse(jerry).
animal(X):- mouse(X).
</script>
<state id="start">
<transition target="end" cond="not(cat(jerry)), cat(tom), mouse(jerry)." />
</state>
<state id="end" final="true">
<onentry>
<log expr="animal(X)." />
</onentry>
</state>
</scxml>
|