Skip to content
/ nnf2dot Public

converts NNF or counting graph to graphviz input

Notifications You must be signed in to change notification settings

drwadu/nnf2dot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nnf2dot

Converts NNF or counting graph to graphviz input.

Build

nnf2dot$ ghc -o nnf2dot Main.hs

Usage

nnf2dot can be used on NNFs and counting graphs in formats accepted by iascar.

NNF

nnf2dot$ ./nnf2dot examples/example.nnf | dot -Tpng > nnf_example.png

Counting Graph

nnf2dot$ ./nnf2dot examples/example.ccg | dot -Tpng > ccg_example.png

Customize Style

To customize node styles, go to Main.hs and change either of

andNodeStyle   = "[label=∧ shape=box width=0.5]"
orNodSetyle    = "[label=∨ shape=box width=0.5]"
plusNodeStyle  = "[label=\"+\" shape=box fontsize=16 width=0.5]"
timesNodeStyle = "[label=\"\" shape=box fontsize=20 width=0.5]"

See graphviz docs for more.

About

converts NNF or counting graph to graphviz input

Resources

Stars

Watchers

Forks