DELBDDNODEASSOC(3)

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

πŸ’– DELBDDNODEASSOC πŸ’–

okay bestie, we're looking at delbddnodeassoc from the BDD FUNCTIONS manual (section 3 ofc, we're library girlies today) and it's literally so much simpler than it looks, i promise 🫢


✨ NAME ✨

delbddnodeassoc β€” deletes a bdd node in a variable association. yeah. that's the whole job. she's a deleter, she's an icon, she shows up, she removes one (1) association, she leaves πŸ’…


🌸 ORIGIN 🌸

So this software is part of the ALLIANCE CAD SYSTEM, which was developed by the ASIM team over at the LIP6 laboratory of UniversitΓ© Pierre and Marie CURIE, in Paris, France. oui oui baguette, academic royalty fr fr πŸ‘‘

like they really said "here's the link, here's the email, come hang out" and honestly? slay.


πŸŽ€ SYNOPSIS πŸŽ€

#include "bdd101.h"
int delbddnodeassoc( BddSystem, BddAssoc, Variable )
  bddsystem  βˆ—BddSystem;
  bddassoc   βˆ—BddAssoc;
  bddvar      Variable;

three args, one int back, no drama. the way that this signature is just clean 😌


πŸ¦‹ PARAMETERS πŸ¦‹

  • BddSystem β€” The bdd system. the whole universe she's living in 🌌
  • BddAssoc β€” The variable association. the little buddy getting a glow-down (a node removed, not a haircut) βœ‚οΈ
  • Variable β€” The variable number. the specific lil number we're pointing at πŸ”’

πŸ’œ DESCRIPTION πŸ’œ

okay so here's the tea, bestie: delbddnodeassoc deletes the bdd node associated to the variable number Variable, in the variable association BddAssoc, in the bdd system BddSystem. one node, one association, gone. poof. 🫧

and listen β€” if a null pointer is given, the default bdd system is used. so like, you don't have to name your system, she'll just assume the default one. lowkey convenient ngl.

also important, don't skip this part: the number of external reference of the associated bdd node is incremented. so yeah, the node gets deleted from the assoc but the refcount goes up, not down. no cap, that's what it says, write it in your notes πŸ“


⭐ RETURN VALUE ⭐

delbddnodeassoc returns 1 if the variable is found, and 0 otherwise.

that's it. that's the return value. binary queen, no in-between, no "maybe", no "it depends". 1 or 0 and she means it πŸ‘‘


πŸ’€ ERRORS πŸ’€

  • "variable xxx out of range, error !" β€” The Variable parameter must be less or equal to the BddSystem->NUMBER_VAR field. so if you're out here passing a variable number that's too big, she WILL yell that exact string at you. not me getting read to filth by a C function 😭

πŸ”₯ EXAMPLE πŸ”₯

here's the whole vibe in code, copy-paste-able and everything:

#include "bdd101.h"
   bddsystem  βˆ—BddSystem;
   bddcircuit βˆ—BddCircuit;
   bddnode    βˆ—BddNode;
   bddnode    βˆ—BddSubst;
   bddnode    βˆ—BddVariable;
   bddassoc   βˆ—Assoc;
   chain_list βˆ—Expr;
   bddvar         Variable;
   BddSystem  = createbddsystem( 100, 1000, 100, 50000 );
   BddCircuit = createbddcircuit( "hello_world", 10, 10, BddSystem );
   Expr = createablbinexpr( ABL_AND,
                            createablatom( "i0" ),
                            createablatom( "i1" ) );
   BddNode = addbddcircuitabl( BddCircuit, Expr );
   freeablexpr( Expr );
   Expr = createablbinexpr( ABL_OR,
                            createablatom( "i2" ),
                            createablatom( "i3" ) );
   BddSubst = addbddcircuitabl( BddCircuit, Expr );
   freeablexpr( Expr );
   BddVariable = searchbddcircuitin( (bddcircuit βˆ—)0, "i0" );
   Variable = getbddvarbyindex( (bddsystem βˆ—)0, BddVariable->INDEX );
   Assoc = addbddassoc( (bddsystem βˆ—)0 );
   addbddnodeassoc( (bddsystem βˆ—)0, Assoc, Variable, BddSubst );
   BddNode = substbddnodeassoc( (bddsystem βˆ—)0, BddSubst, Assoc );
   delbddnodeassoc( (bddsystem βˆ—)0, Assoc, Variable );
   Expr = convertbddcircuitabl( BddCircuit, BddNode );
   /* displays ((i3 or i2) and i1) */
   viewablexpr( Expr, ABL_VIEW_VHDL );
   freeablexpr( Expr );
   destroybddassoc( (bddsystem βˆ—)0 );
   destroybddsystem( (bddsystem βˆ—)0 );
   destroybddcircuit( (bddcircuit βˆ—)0 );

and yes, that comment in the middle literally says it displays ((i3 or i2) and i1) β€” so if you run this, that's what you should see. ate and left no crumbs πŸ“


🌈 SEE ALSO 🌈


πŸ™ˆ BUG REPORT πŸ™ˆ

This tool is under development at the ASIM department of the LIP6 laboratory. We need your feedback to improve documentation and tools. so like, if something's weird, TELL THEM. they literally asked. constructive feedback is self care fr fr 🫢


and that's the page bestie!! ASIM/LIP6, dated October 1, 1997 β€” so this manual is older than most of us and still serving ✨ go delete that node, you've got this πŸ’–