Hi,
I want to share a jason feature quite unused: the transformation of .asl code in other formats (html, latex, ...). For example, the attached goal diagram can be generate based on the code of agent.asl in the examples/blocks-world.
This feature is implemented as shell scripts, so windows users have to adapt them for windows.
1. To generate LaTeX:
cd examples/blocks-world
../../bin/asl2tex agent.asl > agent.tex
pdflatex agent.tex
2. To generate HTML
../../bin/asl2html agent.asl > agent.html
3. To generate the goal diagram ("dot" should be installed)
../../bin/asl2dot agent.asl > goals.dot
dot -Tpdf goals.dot -o goals.pdf
Of course these programs are quite limited and preliminary, so if someone needs something better, he/she is welcome to contribute :-) It is all open source.
HTH
Jomi
agent.asl
Beliefs
clear(table)[source(self)].
Rules
clear(X) :-
tower([X]) :-
tower([X,Y|T]) :-
| (on(X,Y) & tower([Y|T])). |
Plans
+!state([])
.
+!state([H|T])
.
+!tower(T)
.
+!tower([T])
.
+!tower([X,Y|T])
| <- | !tower([Y|T]);
!on(X,Y) |
.
+!on(X,Y)
.
+!on(X,Y)
| <- | !clear(X);
!clear(Y);
move(X,Y) |
.
+!clear(X)
.
+!clear(X)
| : | (tower([H|T]) & .member(X,T)) |
| <- | move(H,table);
!clear(X) |
.
--
Jomi Fred Hubner
Federal University of Santa Catarina
Department of Automation and Systems Engineering
PO Box 476, Florianópolis, SC
88040-900 Brazil
http://www.das.ufsc.br/~jomi------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2_______________________________________________
Jason-users mailing list
Jason-users@...
https://lists.sourceforge.net/lists/listinfo/jason-users