0

I am trying to use DDcal for evaluating binary decision diagrams. When I try to evaluate some formula e.g.: a+b*c', I always get this error:

util_pipefork: can not exec dot: No such file or directory.

Does anyone have idea how I can resolve this error?

Thanks for any insight.

0 _
  • 10,524
  • 11
  • 77
  • 109
mark
  • 354
  • 2
  • 5
  • 15

1 Answers1

0

You can use the Python package dd for working with BDDs using either the Python or CUDD backends (disclaimer: I'm dd's author). Example:

import dd.autoref as _bdd  # to use CUDD, replace `dd.bdd` with `dd.cudd`

bdd = _bdd.BDD()
bdd.declare('a', 'b', 'c')
u = bdd.add_expr(r'a \/ (b /\ ~ c)')

The syntax is described in the documentation. If you prefer writing a | (b & ~ c), that works too. The pure Python backend is installed with pip install dd.

You can also plot using dot (assuming GraphViz is installed):

bdd.dump('bdd_graph.pdf')

The method BDD.dump is described here.

About DDcal's message

grep -ilr "util_pipefork" ./* says that the error you reported from DDcal seems to be coming from the following lines:

/* Set up bidirectional pipe to/from dot. */
/* A unidirectional pipe should suffice. We'll try it some day. */
retval = util_pipefork(args,&toCommand,&fromCommand,&pid);
if (retval == 0) {
(void) fprintf(stderr,"Panic: util_pipefork returned 0!\n");
exit(2);
}

So, you need to install GraphViz, and make sure that its executables (in particular dot) are in the runtime environment's $PATH.

0 _
  • 10,524
  • 11
  • 77
  • 109