You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

513 lines
15 KiB

  1. <html>
  2. <head><title>The ntr package (Internal) </title></head>
  3. <body>
  4. <h1>The ntr package (Internal) </h1>
  5. <h2></h2>
  6. <h3></h3>
  7. <hr>
  8. <ul>
  9. <li><a href="ntrExtAbs.html"><h3>External abstracts</h3></a>
  10. <li><a href="ntrAllAbs.html"><h3>All abstracts</h3></a>
  11. <li><a href="ntrExtDet.html#prototypes"><h3>External functions</h3></a>
  12. <li><a href="ntrAllDet.html#prototypes"><h3>All functions</h3></a>
  13. </ul>
  14. <hr>
  15. <a name="description">
  16. </a>
  17. <hr>
  18. <!-- Function Prototypes and description -->
  19. <dl>
  20. <a name="prototypes"></a>
  21. <dt><pre>
  22. int <i></i>
  23. <a name="Ntr_ClosureTrav"><b>Ntr_ClosureTrav</b></a>(
  24. DdManager * <b>dd</b>, <i>DD manager</i>
  25. BnetNetwork * <b>net</b>, <i>network</i>
  26. NtrOptions * <b>option</b> <i>options</i>
  27. )
  28. </pre>
  29. <dd> Traversal procedure. based on the transitive closure of the transition relation. Returns 1 in case of success; 0 otherwise.
  30. <p>
  31. <dd> <b>Side Effects</b> None
  32. <p>
  33. <dd> <b>See Also</b> <code><a href="ntrAllDet.html#Ntr_Trav">Ntr_Trav</a>
  34. </code>
  35. <dt><pre>
  36. int <i></i>
  37. <a name="Ntr_Envelope"><b>Ntr_Envelope</b></a>(
  38. DdManager * <b>dd</b>, <i>DD manager</i>
  39. NtrPartTR * <b>TR</b>, <i>transition relation</i>
  40. FILE * <b>dfp</b>, <i>pointer to file for DD dump</i>
  41. NtrOptions * <b>option</b> <i>program options</i>
  42. )
  43. </pre>
  44. <dd> Poor man's outer envelope computation based on the monolithic transition relation. Returns 1 in case of success; 0 otherwise.
  45. <p>
  46. <dd> <b>Side Effects</b> None
  47. <p>
  48. <dt><pre>
  49. void <i></i>
  50. <a name="Ntr_FreeHeap"><b>Ntr_FreeHeap</b></a>(
  51. NtrHeap * <b>heap</b> <i></i>
  52. )
  53. </pre>
  54. <dd> Frees a priority queue.
  55. <p>
  56. <dd> <b>Side Effects</b> None
  57. <p>
  58. <dd> <b>See Also</b> <code><a href="ntrAllDet.html#Ntr_InitHeap">Ntr_InitHeap</a>
  59. </code>
  60. <dt><pre>
  61. NtrHeap * <i></i>
  62. <a name="Ntr_HeapClone"><b>Ntr_HeapClone</b></a>(
  63. NtrHeap * <b>source</b> <i></i>
  64. )
  65. </pre>
  66. <dd> Clones a priority queue.
  67. <p>
  68. <dd> <b>Side Effects</b> None
  69. <p>
  70. <dd> <b>See Also</b> <code><a href="ntrAllDet.html#Ntr_InitHeap">Ntr_InitHeap</a>
  71. </code>
  72. <dt><pre>
  73. int <i></i>
  74. <a name="Ntr_HeapCount"><b>Ntr_HeapCount</b></a>(
  75. NtrHeap * <b>heap</b> <i></i>
  76. )
  77. </pre>
  78. <dd> Returns the number of items in a priority queue.
  79. <p>
  80. <dd> <b>Side Effects</b> None
  81. <p>
  82. <dt><pre>
  83. int <i></i>
  84. <a name="Ntr_HeapExtractMin"><b>Ntr_HeapExtractMin</b></a>(
  85. NtrHeap * <b>heap</b>, <i></i>
  86. void ** <b>item</b>, <i></i>
  87. int * <b>key</b> <i></i>
  88. )
  89. </pre>
  90. <dd> Extracts the element with the minimum key from a priority queue. Returns 1 if successful; 0 otherwise.
  91. <p>
  92. <dd> <b>Side Effects</b> The minimum key and the associated item are returned as side effects.
  93. <p>
  94. <dd> <b>See Also</b> <code><a href="ntrAllDet.html#Ntr_HeapInsert">Ntr_HeapInsert</a>
  95. </code>
  96. <dt><pre>
  97. int <i></i>
  98. <a name="Ntr_HeapInsert"><b>Ntr_HeapInsert</b></a>(
  99. NtrHeap * <b>heap</b>, <i></i>
  100. void * <b>item</b>, <i></i>
  101. int <b>key</b> <i></i>
  102. )
  103. </pre>
  104. <dd> Inserts an item in a priority queue. Returns 1 if successful; 0 otherwise.
  105. <p>
  106. <dd> <b>Side Effects</b> None
  107. <p>
  108. <dd> <b>See Also</b> <code><a href="ntrAllDet.html#Ntr_HeapExtractMin">Ntr_HeapExtractMin</a>
  109. </code>
  110. <dt><pre>
  111. NtrHeap * <i></i>
  112. <a name="Ntr_InitHeap"><b>Ntr_InitHeap</b></a>(
  113. int <b>size</b> <i></i>
  114. )
  115. </pre>
  116. <dd> Initializes a priority queue. Returns a pointer to the heap if successful; NULL otherwise.
  117. <p>
  118. <dd> <b>Side Effects</b> None
  119. <p>
  120. <dd> <b>See Also</b> <code><a href="ntrAllDet.html#Ntr_FreeHeap">Ntr_FreeHeap</a>
  121. </code>
  122. <dt><pre>
  123. int <i></i>
  124. <a name="Ntr_SCC"><b>Ntr_SCC</b></a>(
  125. DdManager * <b>dd</b>, <i>DD manager</i>
  126. BnetNetwork * <b>net</b>, <i>network</i>
  127. NtrOptions * <b>option</b> <i>options</i>
  128. )
  129. </pre>
  130. <dd> Computes the strongly connected components of the state transition graph. Only the first 10 SCCs are computed. Returns 1 in case of success; 0 otherwise.
  131. <p>
  132. <dd> <b>Side Effects</b> None
  133. <p>
  134. <dd> <b>See Also</b> <code><a href="ntrAllDet.html#Ntr_Trav">Ntr_Trav</a>
  135. </code>
  136. <dt><pre>
  137. int <i></i>
  138. <a name="Ntr_ShortestPaths"><b>Ntr_ShortestPaths</b></a>(
  139. DdManager * <b>dd</b>, <i></i>
  140. BnetNetwork * <b>net</b>, <i></i>
  141. NtrOptions * <b>option</b> <i></i>
  142. )
  143. </pre>
  144. <dd> Computes shortest paths in the state transition graph of a network. Three methods are availabe: <ul> <li> Bellman-Ford algorithm for single-source shortest paths; the algorithm computes the distance (number of transitions) from the initial states to all states. <li> Floyd-Warshall algorithm for all-pair shortest paths. <li> Repeated squaring algorithm for all-pair shortest paths. </ul> The function returns 1 in case of success; 0 otherwise.
  145. <p>
  146. <dd> <b>Side Effects</b> ADD variables are created in the manager.
  147. <p>
  148. <dt><pre>
  149. int <i></i>
  150. <a name="Ntr_TestClipping"><b>Ntr_TestClipping</b></a>(
  151. DdManager * <b>dd</b>, <i></i>
  152. BnetNetwork * <b>net1</b>, <i></i>
  153. BnetNetwork * <b>net2</b>, <i></i>
  154. NtrOptions * <b>option</b> <i></i>
  155. )
  156. </pre>
  157. <dd> Tests BDD clipping functions. Returns 1 if successful; 0 otherwise.
  158. <p>
  159. <dd> <b>Side Effects</b> None
  160. <p>
  161. <dt><pre>
  162. int <i></i>
  163. <a name="Ntr_TestClosestCube"><b>Ntr_TestClosestCube</b></a>(
  164. DdManager * <b>dd</b>, <i></i>
  165. BnetNetwork * <b>net</b>, <i></i>
  166. NtrOptions * <b>option</b> <i></i>
  167. )
  168. </pre>
  169. <dd> Tests the Cudd_bddClosestCube function. Returns 1 if successful; 0 otherwise.
  170. <p>
  171. <dd> <b>Side Effects</b> None
  172. <p>
  173. <dt><pre>
  174. int <i></i>
  175. <a name="Ntr_TestCofactorEstimate"><b>Ntr_TestCofactorEstimate</b></a>(
  176. DdManager * <b>dd</b>, <i></i>
  177. BnetNetwork * <b>net</b>, <i></i>
  178. NtrOptions * <b>option</b> <i></i>
  179. )
  180. </pre>
  181. <dd> Tests BDD cofactor estimate functions. Returns 1 if successful; 0 otherwise.
  182. <p>
  183. <dd> <b>Side Effects</b> None
  184. <p>
  185. <dt><pre>
  186. int <i></i>
  187. <a name="Ntr_TestDecomp"><b>Ntr_TestDecomp</b></a>(
  188. DdManager * <b>dd</b>, <i></i>
  189. BnetNetwork * <b>net1</b>, <i></i>
  190. NtrOptions * <b>option</b> <i></i>
  191. )
  192. </pre>
  193. <dd> Tests BDD decomposition functions. Returns 1 if successful; 0 otherwise.
  194. <p>
  195. <dd> <b>Side Effects</b> None
  196. <p>
  197. <dt><pre>
  198. int <i></i>
  199. <a name="Ntr_TestDensity"><b>Ntr_TestDensity</b></a>(
  200. DdManager * <b>dd</b>, <i></i>
  201. BnetNetwork * <b>net1</b>, <i></i>
  202. NtrOptions * <b>option</b> <i></i>
  203. )
  204. </pre>
  205. <dd> Tests BDD density-related functions. Returns 1 if successful; 0 otherwise.
  206. <p>
  207. <dd> <b>Side Effects</b> None
  208. <p>
  209. <dt><pre>
  210. int <i></i>
  211. <a name="Ntr_TestEquivAndContain"><b>Ntr_TestEquivAndContain</b></a>(
  212. DdManager * <b>dd</b>, <i></i>
  213. BnetNetwork * <b>net1</b>, <i></i>
  214. BnetNetwork * <b>net2</b>, <i></i>
  215. NtrOptions * <b>option</b> <i></i>
  216. )
  217. </pre>
  218. <dd> Tests functions for BDD equivalence and containment with don't cares, including Cudd_EquivDC and Cudd_bddLeqUnless. This function uses as care set the first output of net2 and checkes equivalence and containment for of all the output pairs of net1. Returns 1 if successful; 0 otherwise.
  219. <p>
  220. <dd> <b>Side Effects</b> None
  221. <p>
  222. <dt><pre>
  223. int <i></i>
  224. <a name="Ntr_TestHeap"><b>Ntr_TestHeap</b></a>(
  225. NtrHeap * <b>heap</b>, <i></i>
  226. int <b>i</b> <i></i>
  227. )
  228. </pre>
  229. <dd> Tests the heap property of a priority queue. Returns 1 if Successful; 0 otherwise.
  230. <p>
  231. <dd> <b>Side Effects</b> None
  232. <p>
  233. <dt><pre>
  234. int <i></i>
  235. <a name="Ntr_TestMinimization"><b>Ntr_TestMinimization</b></a>(
  236. DdManager * <b>dd</b>, <i></i>
  237. BnetNetwork * <b>net1</b>, <i></i>
  238. BnetNetwork * <b>net2</b>, <i></i>
  239. NtrOptions * <b>option</b> <i></i>
  240. )
  241. </pre>
  242. <dd> Tests BDD minimization functions, including leaf-identifying compaction, squeezing, and restrict. This function uses as constraint the first output of net2 and computes positive and negative cofactors of all the outputs of net1. For each cofactor, it checks whether compaction was safe (cofactor not larger than original function) and that the expansion based on each minimization function (used as a generalized cofactor) equals the original function. Returns 1 if successful; 0 otherwise.
  243. <p>
  244. <dd> <b>Side Effects</b> None
  245. <p>
  246. <dt><pre>
  247. DdNode * <i></i>
  248. <a name="Ntr_TransitiveClosure"><b>Ntr_TransitiveClosure</b></a>(
  249. DdManager * <b>dd</b>, <i></i>
  250. NtrPartTR * <b>TR</b>, <i></i>
  251. NtrOptions * <b>option</b> <i></i>
  252. )
  253. </pre>
  254. <dd> Builds the transitive closure of a transition relation. Returns a BDD if successful; NULL otherwise. Uses a simple squaring algorithm.
  255. <p>
  256. <dd> <b>Side Effects</b> None
  257. <p>
  258. <dt><pre>
  259. int <i></i>
  260. <a name="Ntr_Trav"><b>Ntr_Trav</b></a>(
  261. DdManager * <b>dd</b>, <i>DD manager</i>
  262. BnetNetwork * <b>net</b>, <i>network</i>
  263. NtrOptions * <b>option</b> <i>options</i>
  264. )
  265. </pre>
  266. <dd> Poor man's traversal procedure. based on the monolithic transition relation. Returns 1 in case of success; 0 otherwise.
  267. <p>
  268. <dd> <b>Side Effects</b> None
  269. <p>
  270. <dd> <b>See Also</b> <code><a href="ntrAllDet.html#Ntr_ClosureTrav">Ntr_ClosureTrav</a>
  271. </code>
  272. <dt><pre>
  273. int <i></i>
  274. <a name="Ntr_VerifyEquivalence"><b>Ntr_VerifyEquivalence</b></a>(
  275. DdManager * <b>dd</b>, <i></i>
  276. BnetNetwork * <b>net1</b>, <i></i>
  277. BnetNetwork * <b>net2</b>, <i></i>
  278. NtrOptions * <b>option</b> <i></i>
  279. )
  280. </pre>
  281. <dd> Verify equivalence of combinational networks. Returns 1 if successful and if the networks are equivalent; -1 if successful, but the networks are not equivalent; 0 otherwise. The two networks are supposed to have the same names for inputs and outputs. The only exception is that the second network may miss output buffers that are present in the first network. This function tries to match both the output and the input of the buffer.
  282. <p>
  283. <dd> <b>Side Effects</b> None
  284. <p>
  285. <dt><pre>
  286. int <i></i>
  287. <a name="Ntr_buildDDs"><b>Ntr_buildDDs</b></a>(
  288. BnetNetwork * <b>net</b>, <i>network for which DDs are to be built</i>
  289. DdManager * <b>dd</b>, <i>DD manager</i>
  290. NtrOptions * <b>option</b>, <i>option structure</i>
  291. BnetNetwork * <b>net2</b> <i>companion network with which inputs may be shared</i>
  292. )
  293. </pre>
  294. <dd> Builds DDs for a network outputs and next state functions. The method is really brain-dead, but it is very simple. Returns 1 in case of success; 0 otherwise. Some inputs to the network may be shared with another network whose DDs have already been built. In this case we want to share the DDs as well.
  295. <p>
  296. <dd> <b>Side Effects</b> the dd fields of the network nodes are modified. Uses the count fields of the nodes.
  297. <p>
  298. <dt><pre>
  299. NtrPartTR * <i></i>
  300. <a name="Ntr_buildTR"><b>Ntr_buildTR</b></a>(
  301. DdManager * <b>dd</b>, <i>manager</i>
  302. BnetNetwork * <b>net</b>, <i>network</i>
  303. NtrOptions * <b>option</b>, <i>options</i>
  304. int <b>image</b> <i>image type: monolithic ...</i>
  305. )
  306. </pre>
  307. <dd> Builds the transition relation for a network. Returns a pointer to the transition relation structure if successful; NULL otherwise.
  308. <p>
  309. <dd> <b>Side Effects</b> None
  310. <p>
  311. <dt><pre>
  312. NtrPartTR * <i></i>
  313. <a name="Ntr_cloneTR"><b>Ntr_cloneTR</b></a>(
  314. NtrPartTR * <b>TR</b> <i></i>
  315. )
  316. </pre>
  317. <dd> Makes a copy of a transition relation. Returns a pointer to the copy if successful; NULL otherwise.
  318. <p>
  319. <dd> <b>Side Effects</b> None
  320. <p>
  321. <dd> <b>See Also</b> <code><a href="ntrAllDet.html#Ntr_buildTR">Ntr_buildTR</a>
  322. <a href="ntrAllDet.html#Ntr_freeTR">Ntr_freeTR</a>
  323. </code>
  324. <dt><pre>
  325. void <i></i>
  326. <a name="Ntr_freeTR"><b>Ntr_freeTR</b></a>(
  327. DdManager * <b>dd</b>, <i></i>
  328. NtrPartTR * <b>TR</b> <i></i>
  329. )
  330. </pre>
  331. <dd> Frees the transition relation for a network.
  332. <p>
  333. <dd> <b>Side Effects</b> None
  334. <p>
  335. <dt><pre>
  336. DdNode * <i></i>
  337. <a name="Ntr_getStateCube"><b>Ntr_getStateCube</b></a>(
  338. DdManager * <b>dd</b>, <i></i>
  339. BnetNetwork * <b>net</b>, <i></i>
  340. char * <b>filename</b>, <i></i>
  341. int <b>pr</b> <i></i>
  342. )
  343. </pre>
  344. <dd> Reads a state cube from a file or create a random one. Returns a pointer to the BDD of the sink nodes if successful; NULL otherwise.
  345. <p>
  346. <dd> <b>Side Effects</b> None
  347. <p>
  348. <dt><pre>
  349. DdNode * <i></i>
  350. <a name="Ntr_initState"><b>Ntr_initState</b></a>(
  351. DdManager * <b>dd</b>, <i></i>
  352. BnetNetwork * <b>net</b>, <i></i>
  353. NtrOptions * <b>option</b> <i></i>
  354. )
  355. </pre>
  356. <dd> Builds the BDD of the initial state(s). Returns a BDD if successful; NULL otherwise.
  357. <p>
  358. <dd> <b>Side Effects</b> None
  359. <p>
  360. <dt><pre>
  361. int <i></i>
  362. <a name="Ntr_maxflow"><b>Ntr_maxflow</b></a>(
  363. DdManager * <b>dd</b>, <i></i>
  364. BnetNetwork * <b>net</b>, <i></i>
  365. NtrOptions * <b>option</b> <i></i>
  366. )
  367. </pre>
  368. <dd> Maximum 0-1 flow between source and sink states. Returns 1 in case of success; 0 otherwise.
  369. <p>
  370. <dd> <b>Side Effects</b> Creates two new sets of variables.
  371. <p>
  372. <dt><pre>
  373. double <i></i>
  374. <a name="Ntr_maximum01Flow"><b>Ntr_maximum01Flow</b></a>(
  375. DdManager * <b>bdd</b>, <i>manager</i>
  376. DdNode * <b>sx</b>, <i>source node</i>
  377. DdNode * <b>ty</b>, <i>sink node</i>
  378. DdNode * <b>E</b>, <i>edge relation</i>
  379. DdNode ** <b>F</b>, <i>flow relation</i>
  380. DdNode ** <b>cut</b>, <i>cutset relation</i>
  381. DdNode ** <b>x</b>, <i>array of row variables</i>
  382. DdNode ** <b>y</b>, <i>array of column variables</i>
  383. DdNode ** <b>z</b>, <i>arrays of auxiliary variables</i>
  384. int <b>n</b>, <i>number of variables in each array</i>
  385. int <b>pr</b> <i>verbosity level</i>
  386. )
  387. </pre>
  388. <dd> This function implements Dinits's algorithm for (0-1) max flow, using BDDs and a symbolic technique to trace multiple edge-disjoint augmenting paths to complete a phase. The outer forever loop is over phases, and the inner forever loop is to propagate a (not yet) maximal flow of edge-disjoint augmenting paths from one layer to the previous. The subprocedure call implements a least fixed point iteration to compute a (not yet) maximal flow update between layers. At the end of each phase (except the last one) the flow is actually pushed from the source to the sink. Data items: <ul> <li> sx(ty) BDD representations of s(t). <li> x(y) The variables encoding the from(to)-node u(v) of an edge (u,v) in the given digraph. <li> z Another set of variables. <li> E(x,y) The edge relation. <li> F(x,y) BDD representation of the current flow, initialized to 0 for each arc, and updated by +1, -1, or 0 at the end of each phase. <li> Ms Mt The maximum flow, that is, the cardinality of a minimum cut, measured at the source and at the sink, respectively. The two values should be identical. <li> reached The set of nodes already visited in the BFS of the digraph. <li> fos fanout of the source node s. <li> fit fanin of the sink node t. </ul>
  389. <p>
  390. <dd> <b>Side Effects</b> The flow realtion F and the cutset relation cut are returned as side effects.
  391. <p>
  392. <dt><pre>
  393. int <i></i>
  394. <a name="Ntr_testISOP"><b>Ntr_testISOP</b></a>(
  395. DdManager * <b>dd</b>, <i></i>
  396. BnetNetwork * <b>net</b>, <i></i>
  397. NtrOptions * <b>option</b> <i></i>
  398. )
  399. </pre>
  400. <dd> Builds ZDD covers.
  401. <p>
  402. <dd> <b>Side Effects</b> Creates ZDD variables in the manager.
  403. <p>
  404. <dt><pre>
  405. int <i></i>
  406. <a name="Ntr_testZDD"><b>Ntr_testZDD</b></a>(
  407. DdManager * <b>dd</b>, <i></i>
  408. BnetNetwork * <b>net</b>, <i></i>
  409. NtrOptions * <b>option</b> <i></i>
  410. )
  411. </pre>
  412. <dd> Tests ZDDs. Returns 1 if successful; 0 otherwise.
  413. <p>
  414. <dd> <b>Side Effects</b> Creates ZDD variables in the manager.
  415. <p>
  416. <dt><pre>
  417. <i></i>
  418. <a name="STRING_EQUAL"><b>STRING_EQUAL</b></a>(
  419. <b>s1</b>, <i></i>
  420. <b>s2</b> <i></i>
  421. )
  422. </pre>
  423. <dd> Returns 1 if the two arguments are identical strings.
  424. <p>
  425. <dd> <b>Side Effects</b> none
  426. <p>
  427. </dl>
  428. <hr>
  429. Generated automatically by <code>extdoc</code> on 1010215
  430. </body></html>