The ppTransducer functor


Synopsis

signature PPTRANSDUCER
functor ppTransducer ( ... ) : PPTRANSDUCER

This functor generates a graphical display for transducers, given alphabets with printnames for input- and output labels.


Functor argument interface

structure In : LABEL
structure Out : LABEL

Description

structure In : LABEL
a structure giving the type of input labels and their translation to strings.

structure Out : LABEL
a structure giving the type of output labels and their translation to strings.



Functor result interface

include TRANSDUCER
eqtype labelIn
type labelOut
val display : (labelIn, labelOut)
                  transducer
                -> string -> OS.Process.status

Description

eqtype labelIn
the type of input labels.

type labelOut
the type of output labels.

display tr s
writes files s.tmp.dot and s.tmp.ps and displays a graph of the transducer, using ATT's dot and the ghostview previewer.


See Also

LABEL, TRANSDUCER, Transducer

Discussion

Example:
structure TdIB = ppTransducer(structure In = IntLabels 
                              structure Out = BoolLabels)

val T = TdIB.make{start = [0], final = [2],
                  trans = [(0,(0,false),0),(0,(1,true),1),(1,(1,false),1),
                           (1,(0,true),1),(1,(0,false),2)]}

TdIB.display T "file";