emergency commit
[cl-cudd.git] / distr / nanotrav / doc / bnetExtDet.html
blobaee62c09d2823a51bb4c9730fd7cd6279aad2d73
1 <html>
2 <head><title>The bnet package</title></head>
3 <body>
5 <h1>The bnet package</h1>
6 <h2>Simple-minded package to read a blif file.</h2>
7 <h3></h3>
8 <hr>
9 <ul>
10 <li><a href="bnetExtAbs.html"><h3>External abstracts</h3></a>
11 <li><a href="bnetAllAbs.html"><h3>All abstracts</h3></a>
12 <li><a href="bnetExtDet.html#prototypes"><h3>External functions</h3></a>
13 <li><a href="bnetAllDet.html#prototypes"><h3>All functions</h3></a>
14 </ul>
16 <hr>
18 <a name="description">
20 </a>
22 <hr>
23 <!-- Function Prototypes and description -->
25 <dl>
26 <a name="prototypes"></a>
27 <dt><pre>
28 int <i></i>
29 <a name="Bnet_BuildNodeBDD"><b>Bnet_BuildNodeBDD</b></a>(
30 DdManager * <b>dd</b>, <i>DD manager</i>
31 BnetNode * <b>nd</b>, <i>node of the boolean network</i>
32 st_table * <b>hash</b>, <i>symbol table of the boolean network</i>
33 int <b>params</b>, <i>type of DD to be built</i>
34 int <b>nodrop</b> <i>retain the intermediate node DDs until the end</i>
36 </pre>
37 <dd> Builds the BDD for the function of a node and stores a pointer to it in the dd field of the node itself. The reference count of the BDD is incremented. If params is BNET_LOCAL_DD, then the BDD is built in terms of the local inputs to the node; otherwise, if params is BNET_GLOBAL_DD, the BDD is built in terms of the network primary inputs. To build the global BDD of a node, the BDDs for its local inputs must exist. If that is not the case, Bnet_BuildNodeBDD recursively builds them. Likewise, to create the local BDD for a node, the local inputs must have variables assigned to them. If that is not the case, Bnet_BuildNodeBDD recursively assigns variables to nodes. Bnet_BuildNodeBDD returns 1 in case of success; 0 otherwise.
38 <p>
40 <dd> <b>Side Effects</b> Sets the dd field of the node.
41 <p>
43 <dt><pre>
44 int <i></i>
45 <a name="Bnet_DfsVariableOrder"><b>Bnet_DfsVariableOrder</b></a>(
46 DdManager * <b>dd</b>, <i></i>
47 BnetNetwork * <b>net</b> <i></i>
49 </pre>
50 <dd> Orders the BDD variables by DFS. Returns 1 in case of success; 0 otherwise.
51 <p>
53 <dd> <b>Side Effects</b> Uses the visited flags of the nodes.
54 <p>
56 <dt><pre>
57 void <i></i>
58 <a name="Bnet_FreeNetwork"><b>Bnet_FreeNetwork</b></a>(
59 BnetNetwork * <b>net</b> <i></i>
61 </pre>
62 <dd> Frees a boolean network created by Bnet_ReadNetwork.
63 <p>
65 <dd> <b>Side Effects</b> None
66 <p>
68 <dd> <b>See Also</b> <code><a href="bnetAllDet.html#Bnet_ReadNetwork">Bnet_ReadNetwork</a>
69 </code>
71 <dt><pre>
72 void <i></i>
73 <a name="Bnet_PrintNetwork"><b>Bnet_PrintNetwork</b></a>(
74 BnetNetwork * <b>net</b> <i>boolean network</i>
76 </pre>
77 <dd> Prints to the standard output a boolean network created by Bnet_ReadNetwork. Uses the blif format; this way, one can verify the equivalence of the input and the output with, say, sis.
78 <p>
80 <dd> <b>Side Effects</b> None
81 <p>
83 <dd> <b>See Also</b> <code><a href="bnetAllDet.html#Bnet_ReadNetwork">Bnet_ReadNetwork</a>
84 </code>
86 <dt><pre>
87 int <i></i>
88 <a name="Bnet_PrintOrder"><b>Bnet_PrintOrder</b></a>(
89 BnetNetwork * <b>net</b>, <i></i>
90 DdManager * <b>dd</b> <i></i>
92 </pre>
93 <dd> Prints the order of the DD variables of a network. Only primary inputs and present states are printed. Returns 1 if successful; 0 otherwise.
94 <p>
96 <dd> <b>Side Effects</b> None
97 <p>
99 <dt><pre>
100 BnetNetwork * <i></i>
101 <a name="Bnet_ReadNetwork"><b>Bnet_ReadNetwork</b></a>(
102 FILE * <b>fp</b>, <i>pointer to the blif file</i>
103 int <b>pr</b> <i>verbosity level</i>
105 </pre>
106 <dd> Reads a boolean network from a blif file. A very restricted subset of blif is supported. Specifically: <ul> <li> The only directives recognized are: <ul> <li> .model <li> .inputs <li> .outputs <li> .latch <li> .names <li> .exdc <li> .wire_load_slope <li> .end </ul> <li> Latches must have an initial values and no other parameters specified. <li> Lines must not exceed MAXLENGTH-1 characters, and individual names must not exceed 1023 characters. </ul> Caveat emptor: There may be other limitations as well. One should check the syntax of the blif file with some other tool before relying on this parser. Bnet_ReadNetwork returns a pointer to the network if successful; NULL otherwise.
109 <dd> <b>Side Effects</b> None
112 <dd> <b>See Also</b> <code><a href="bnetAllDet.html#Bnet_PrintNetwork">Bnet_PrintNetwork</a>
113 <a href="bnetAllDet.html#Bnet_FreeNetwork">Bnet_FreeNetwork</a>
114 </code>
116 <dt><pre>
117 int <i></i>
118 <a name="Bnet_ReadOrder"><b>Bnet_ReadOrder</b></a>(
119 DdManager * <b>dd</b>, <i></i>
120 char * <b>ordFile</b>, <i></i>
121 BnetNetwork * <b>net</b>, <i></i>
122 int <b>locGlob</b>, <i></i>
123 int <b>nodrop</b> <i></i>
125 </pre>
126 <dd> Reads the variable order from a file. Returns 1 if successful; 0 otherwise.
129 <dd> <b>Side Effects</b> The BDDs for the primary inputs and present state variables are built.
132 <dt><pre>
133 int <i></i>
134 <a name="Bnet_bddArrayDump"><b>Bnet_bddArrayDump</b></a>(
135 DdManager * <b>dd</b>, <i>DD manager</i>
136 BnetNetwork * <b>network</b>, <i>network whose BDDs should be dumped</i>
137 char * <b>dfile</b>, <i>file name</i>
138 DdNode ** <b>outputs</b>, <i>BDDs to be dumped</i>
139 char ** <b>onames</b>, <i>names of the BDDs to be dumped</i>
140 int <b>noutputs</b>, <i>number of BDDs to be dumped</i>
141 int <b>dumpFmt</b> <i>0 -> dot</i>
143 </pre>
144 <dd> Writes an array of BDDs to a file in dot, blif, DDcal, factored-form, or daVinci format. The BDDs and their names are passed as arguments. The inputs and their names are taken from the network. If "-" is passed as file name, the BDDs are dumped to the standard output. Returns 1 in case of success; 0 otherwise.
147 <dd> <b>Side Effects</b> None
150 <dt><pre>
151 int <i></i>
152 <a name="Bnet_bddDump"><b>Bnet_bddDump</b></a>(
153 DdManager * <b>dd</b>, <i>DD manager</i>
154 BnetNetwork * <b>network</b>, <i>network whose BDDs should be dumped</i>
155 char * <b>dfile</b>, <i>file name</i>
156 int <b>dumpFmt</b>, <i>0 -> dot</i>
157 int <b>reencoded</b> <i>whether variables have been reencoded</i>
159 </pre>
160 <dd> Writes the network BDDs to a file in dot, blif, or daVinci format. If "-" is passed as file name, the BDDs are dumped to the standard output. Returns 1 in case of success; 0 otherwise.
163 <dd> <b>Side Effects</b> None
167 </dl>
169 <hr>
171 Generated automatically by <code>extdoc</code> on 1010215
173 </body></html>