flat assembler
Message board for the users of flat assembler.

Index > Heap > Graphviz - Graph Visualization Software

Author
Thread Post new topic Reply to topic
kasake36



Joined: 28 Mar 2006
Posts: 68
kasake36
By using the dot langauge of the Graphviz package, graphs can be generated. Here is an abstract from the manual:
Quote:
dot draws directed graphs as hierarchies. It runs as a command line pro-
gram, web visualization service, or with a compatible graphical interface.
Its features include well-tuned layout algorithms for placing nodes and edge
splines, edge labels, “record” shapes with “ports” for drawing data struc-
tures; cluster layouts; and an underlying file language for stream-oriented
graph tools.

Example dot file:
Code:
digraph G {
 main -> parse -> execute
      main -> init;
    main -> cleanup;
 execute -> make_string;
  execute -> printf
        init -> make_string;
     main -> printf;
  execute -> compare;
}
    

Of how the resulting graphic does look like, a file has been attached (test.dot.png)!

Many sorts of graphs can be made with dot (ER-diagrams, asf.); just take a look at the gallery!


Description: Resulting directed graph
Filesize: 34.07 KB
Viewed: 2026 Time(s)

test.dot.png


Post 09 Oct 2008, 11:55
View user's profile Send private message Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6034
Location: Poland
MHajduk
Thank you kasake36 for this useful information. Smile I was looking for the good free application for the graph generation. I'll try it for sure. Smile

[EDIT]I tried it and it seems to be a good and convenient tool for drawing Finite Automata diagrams. Smile[/EDIT]
Post 09 Oct 2008, 12:31
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4237
Location: 2018
edfed
with oo coding, it is very easy to test many configs.

how?
Code:

;;;;;;;;;;;;;;;;;;;;;;;;;,
        mov eax,main     ;;
        call eax         ;;
;;;;;;;;;;;;;;;;;;;;;;;;;'

main:
        jmp node
        align 8
        dd init,parse,cleanup,printf,0
        align 8
parse:
        jmp node
        align 8
        dd execute,0
        align 8
execute:
        jmp node
        align 8
        dd makestring,compare,printf,0
        align 8
init:
        jmp node
        align 8
        dd makestring,0
        align 8

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

node:
      
        push ebx
        mov eax ebx
        add ebx,8-4
@@:
        add ebx,4
        mov eax,[ebx]
        or eax,eax
        je .end
        call eax
        jmp @b

.end:

        pop ebx
        ret

cleanup:
makestring:
compare:
printf:
cleanup:
        ret    
    


you have to put the code for the functions, and node will execute everythig like you want.
it is zero terminated , then, don't forget 0 at the end of the strings.

or an other more intuitive way is:
Code:
main:
        call init
        call parse
        call cleanup
        call printf
        ret 
parse:
        call execute
        ret 
execute:
        call makestring
        call compare
        call printf
        ret
init:
        call makestring

cleanup:
makestring:
compare:
printf:
cleanup:
        ret    
    
Post 09 Oct 2008, 18:15
View user's profile Send private message Visit poster's website Reply with quote
kasake36



Joined: 28 Mar 2006
Posts: 68
kasake36
edfed, does your post relate to the "Finite Automata", that MHajduk mentioned?
Post 10 Oct 2008, 06:48
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
edfed: that is not OO coding
Post 10 Oct 2008, 10:25
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Borsuc



Joined: 29 Dec 2005
Posts: 2466
Location: Bucharest, Romania
Borsuc
Cool proggie Smile
Post 10 Oct 2008, 13:03
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 8867
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
nice software, been searching for something like this for ages.
Post 11 Oct 2008, 16:45
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.