GCNODEBDD(3)

πŸ“¦ version 5.1.1, in fedora 43, fedora 44

πŸ’– GCNODEBDD(3) β€” the BDD functions era πŸ’–

okay bestie, so this one's a manual page for gcNodeBdd, from the BDD functions corner of the universe. Sit down, grab a strawberry drink πŸ“, and let's get into it.


🌸 ORIGIN 🌸

This software belongs to the ALLIANCE CAD SYSTEM, developed by the ASIM team at the LIP6 laboratory of UniversitΓ© Pierre et Marie CURIE, in Paris, France. πŸ‡«πŸ‡·βœ¨


✨ NAME ✨

gcNodeBdd β€” literally does a garbage collection. That's it, that's the job. πŸ—‘οΈπŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include "logmmm.h"
void gcNodeBdd(pt)
chain_list *pt;

πŸŽ€ PARAMETER πŸŽ€

  • pt β€” chained list of BDD to rescue. yes bestie, a rescue list. the nodes on it are the ones that get to survive the purge. 🫢

πŸ‘‘ DESCRIPTION πŸ‘‘

gcNodeBdd() removes all the nodes that aren't used in the BDD pointed in the chained list pt.

so like… everything not reachable from your pt list? gone. ghosted. not invited to the group chat. πŸ”₯


🌈 EXAMPLE 🌈

#include "mutnnn.h"      /* mbk utilities */
#include "logmmm.h"
pNode nodeA,nodeB,nodeC;
pNode res1,res2;
chain_list *ptCL;

initializeBdd(SMALL_BDD);
nodeA = createNodeTermBdd(3);
nodeB = createNodeTermBdd(3);
nodeC = createNodeTermBdd(4);

res1 = applyBinBdd(OR,applyBinBdd(OR,nodeA,nodeB),nodeC);
res2 = applyBinBdd(AND,applyBinBdd(AND,nodeA,nodeB),nodeC);
printf("number of nodes in memory = %d",numberAllNodeBdd());

/* it will display
7
*/
ptCL = addchain(NULL,res1);
gcNodeBdd(ptCL);         /* only res1 nodes are saved */

freechain(ptCL);
printf("number of nodes in memory = %d",numberAllNodeBdd());

/* it will display
number of nodes in memory = 5
*/
destroyBdd(1);

so watch the glow-up: 7 nodes hanging out in memory, then you build ptCL with just res1 on it, call gcNodeBdd(ptCL), and suddenly number of nodes in memory = 5. the res2 crew got collected. not me feeling bad for res2 😭 (only res1 nodes are saved, that's the rule, iykyk)


πŸ’œ SEE ALSO πŸ’œ

log(1), bdd(1), markBdd(3), supportChain_listBdd(3), markAllBdd(3), numberNodeBdd(3)


πŸ™ˆ BUG REPORT πŸ™ˆ

This tool is under development at the ASIM department of the LIP6 laboratory.

We need your feedback to improve documentation and tools. fr fr, they're asking. slide into that inbox. πŸ“¬


⭐ ASIM/LIP6 β€” dated October 1, 1997 ⭐

and that's the whole page bestie, mwah πŸ’…πŸ’– no cap, go free some nodes.