goals diagrams

View: New views
2 Messages — Rating Filter:   Alert me  

goals diagrams

by Jomi Fred Hubner-4 :: Rate this Message:

| View Threaded | Show Only this Message

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) :-
(not on(_1,X)).

tower([X]) :-
on(X,table).

tower([X,Y|T]) :-
(on(X,Y) & tower([Y|T])).

Plans

+!state([])
<-.print("Finished!")
.+!state([H|T])
<-!tower(H);
!state(T)
.
+!tower(T)
:tower(T)
.+!tower([T])
<-!on(T,table)
.+!tower([X,Y|T])
<-!tower([Y|T]);
!on(X,Y)
.
+!on(X,Y)
:on(X,Y)
.+!on(X,Y)
<-!clear(X);
!clear(Y);
move(X,Y)
.
+!clear(X)
: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

goals.pdf (11K) Download Attachment
agent.pdf (100K) Download Attachment

Re: goals diagrams

by Jomi Fred Hubner-4 :: Rate this Message:

| View Threaded | Show Only this Message

sim, eu fiz um dia desses para aprender a usar o "dot" (um programa de visualizacao de grafos)

On 14/04/2012, at 12:10, Jomi Fred Hubner wrote:

> 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
>
> <goals.pdf><agent.html><agent.pdf>
> --
> 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

--
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