| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| I am on search for some tools that can visualize prolog programs like presenting the proof tree or so. I know Vis for SPASS output and Snarks for Satchmo output. Alloy from the MIT can also do a visualization, but has its own syntax. I thought of a diagram where different worlds are linked through relations. In these worlds different statemants hold. The code that I want to visualize is the following: :- dynamic done/1. % black_edge and so black_conn connecting two processes black_conn(X,Y) :- black_edge(X,Z), black_conn(Z,Y). black_conn(X,Y) :- black_edge(X,Y). % red_conn connecting two processes red_conn(X,Y) :- red_edge(X,Y). % Now A shall also be required in order to execute C: % A -black-> B -red-> C ==implies==> A -red-> C red_conn(X,Z) :- black_conn(X,Y), red_conn(Y,Z). % Is a process executable? executable(X) :- black_conn(X,_). executable(Y) :- black_conn(_,Y). executable(X) :- red_conn(X,_). % A process that is connected through a red edge % shall only be executable if all preceding processes % have been executed executable(Y) :- \+ (red_conn(X,Y),\+ done(X)). % MODEL FLOW % A -black-> B -black-> C -black-> D -red-> E black_edge(a,b). black_edge(b,c). black_edge(c,d). red_edge(d,e). Any tips and hints are appreciated. Michael |
|
#2
| |||
| |||
| Michael Igler <michael.igler@web.de> wrote: > I am on search for some tools that can visualize prolog programs > like presenting the proof tree or so. > > I know Vis for SPASS output and Snarks for Satchmo output. > Alloy from the MIT can also do a visualization, but has its own syntax. > > I thought of a diagram where different worlds are linked through > relations. In these worlds different statemants hold. > > The code that I want to visualize is the following: > > :- dynamic done/1. > > % black_edge and so black_conn connecting two processes > black_conn(X,Y) :- black_edge(X,Z), black_conn(Z,Y). > black_conn(X,Y) :- black_edge(X,Y). > > % red_conn connecting two processes > red_conn(X,Y) :- red_edge(X,Y). > > % Now A shall also be required in order to execute C: > % A -black-> B -red-> C ==implies==> A -red-> C > red_conn(X,Z) :- black_conn(X,Y), red_conn(Y,Z). > > > % Is a process executable? > executable(X) :- black_conn(X,_). > executable(Y) :- black_conn(_,Y). > executable(X) :- red_conn(X,_). > % A process that is connected through a red edge > % shall only be executable if all preceding processes > % have been executed > executable(Y) :- \+ (red_conn(X,Y),\+ done(X)). > > > % MODEL FLOW > % A -black-> B -black-> C -black-> D -red-> E > black_edge(a,b). > black_edge(b,c). > black_edge(c,d). > red_edge(d,e). > > > > > > Any tips and hints are appreciated. > > > Michael > I have found a tool under: http://www.cs.bris.ac.uk/Teaching/Re...0106/graphviz/ Michael |
|
#3
| |||
| |||
| Michael Igler wrote: > I am on search for some tools that can visualize prolog programs > like presenting the proof tree or so. Here you can find a metainterpreter that shows the SLDNF tree in LaTeX: http://www.ing.unife.it/docenti/Marc...lli/sldnfDraw/ Cheers, Marco -- http://www.ing.unife.it/docenti/MarcoGavanelli/ |
|
#4
| |||
| |||
| Michael Igler wrote: > I am on search for some tools that can visualize prolog programs > like presenting the proof tree or so. > > I know Vis for SPASS output and Snarks for Satchmo output. > Alloy from the MIT can also do a visualization, but has its own syntax. > > I thought of a diagram where different worlds are linked through > relations. In these worlds different statemants hold. > > The code that I want to visualize is the following: > > :- dynamic done/1. > > % black_edge and so black_conn connecting two processes > black_conn(X,Y) :- black_edge(X,Z), black_conn(Z,Y). > black_conn(X,Y) :- black_edge(X,Y). > > % red_conn connecting two processes > red_conn(X,Y) :- red_edge(X,Y). > > % Now A shall also be required in order to execute C: > % A -black-> B -red-> C ==implies==> A -red-> C > red_conn(X,Z) :- black_conn(X,Y), red_conn(Y,Z). > > % Is a process executable? > executable(X) :- black_conn(X,_). > executable(Y) :- black_conn(_,Y). > executable(X) :- red_conn(X,_). > % A process that is connected through a red edge > % shall only be executable if all preceding processes > % have been executed > executable(Y) :- \+ (red_conn(X,Y),\+ done(X)). > > % MODEL FLOW > % A -black-> B -black-> C -black-> D -red-> E > black_edge(a,b). > black_edge(b,c). > black_edge(c,d). > red_edge(d,e). > > Any tips and hints are appreciated. > > Michael > Check out the book 'The Transparent Prolog Machine: Visualizing Logic Programs" by Marc Eisenstadt, Mike Bradyshaw and Jocelyn Paine, I think there is software for it as well. Cameron |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.