diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-01-16 00:31:12 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-01-16 00:31:12 (GMT) |
commit | 57b7b1cb196ea9f51aebaba1a838b9a86a9f83fe (patch) | |
tree | d2ae2a83f1357b66c9712b741a2ad048444caa06 /test/samples/uscxml | |
parent | 1088a76a715ef8a2728ad3fa8cde02bde4eec760 (diff) | |
download | uscxml-57b7b1cb196ea9f51aebaba1a838b9a86a9f83fe.zip uscxml-57b7b1cb196ea9f51aebaba1a838b9a86a9f83fe.tar.gz uscxml-57b7b1cb196ea9f51aebaba1a838b9a86a9f83fe.tar.bz2 |
More work on Prolog datamodel
Diffstat (limited to 'test/samples/uscxml')
-rw-r--r-- | test/samples/uscxml/test-prolog.scxml | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/test/samples/uscxml/test-prolog.scxml b/test/samples/uscxml/test-prolog.scxml index 85d45bc..266bd8d 100644 --- a/test/samples/uscxml/test-prolog.scxml +++ b/test/samples/uscxml/test-prolog.scxml @@ -1,20 +1,22 @@ <scxml datamodel="prolog" initial="start" binding="late"> <datamodel> - <!-- data id="facts"> - cat(tom). - animal(X):- cat(X). - </data --> - <data id="likes" src="prolog/likes.pl" /> + <data id="facts"> +% see http://www.swi-prolog.org/FAQ/Multifile.html +:- multifile animal/1. +cat(tom). +animal(X):- cat(X). + </data> </datamodel> - <!-- script> - cat(tom). - cat(X). - animal(X). - </script --> <script> - likes(sam,curry). - likes(sam,chips). +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>
\ No newline at end of file |