Skip to content

Instantly share code, notes, and snippets.

@Jarvix
Last active December 18, 2015 14:19
Show Gist options
  • Save Jarvix/5796521 to your computer and use it in GitHub Desktop.
Save Jarvix/5796521 to your computer and use it in GitHub Desktop.
module init {
goals{
printedEnoughText.
}
actionspec{
% printText expects a string "..." as argument and prints it to the console.
% The action can always be performed. We do not keep track of the texts that
% have been printed and use an empty postcondition.
printText(X) {
pre{ true }
post{ true }
}
}
}
module main[exit=always]{
program{
if goal( printedEnoughText ) then printText("Hello World").
}
}
module event[exit=nogoals,focus=filter]{
program[order=linearall]{
if bel( percept( printedText(10) ) ) then insert( printedEnoughText ).
forall goal(hello), bel(a)
do adopt(testGoal(none)).
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment