ADDBDDNODEASSOC(3)

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

πŸ’– ADDBDDNODEASSOC πŸ’–

okay bestie, welcome to the BDD FUNCTIONS corner of the manual β€” this page is all about addbddnodeassoc, and no cap, it's a lil function that does one very specific thing and does it slay. πŸŽ€


✨ NAME ✨

addbddnodeassoc β€” adds a bdd node in a variable association. periodt. πŸ’…


🌍 ORIGIN 🌍

so this software belongs to the ALLIANCE CAD SYSTEM, developed by the ASIM team at LIP6 laboratory of UniversitΓ© Pierre and Marie CURIE, in Paris, France. iconic academic lineage fr fr. πŸ‡«πŸ‡·


πŸ“œ SYNOPSIS πŸ“œ

#include "bdd101.h"
bddassoc βˆ—addbddnodeassoc( BddSystem, BddAssoc, Variable, BddNode )
  bddsystem  βˆ—BddSystem;
  bddassoc   βˆ—BddAssoc;
  bddvar      Variable;
  bddnode    βˆ—BddNode;

🫢 PARAMETERS 🫢

  • BddSystem β€” the bdd system. the whole universe this function lives in, basically. 🌌
  • BddAssoc β€” the variable association. this is where the new association gets dropped. πŸŽ€
  • Variable β€” the variable number. which variable we're hooking up. πŸ”’
  • BddNode β€” the bdd node to add. the little guy getting associated. πŸ¦‹

πŸ’« DESCRIPTION πŸ’«

addbddnodeassoc adds the bdd node BddNode, associated to the variable number Variable, in the variable association BddAssoc, in the bdd system BddSystem. it's giving matchmaker energy β€” variable meets node, they're officially linked. πŸ’ž

lowkey important detail: if a null pointer is given, the default bdd system is used. so you don't always have to pass a system, the function will just assume the default one. no thoughts, defaults. πŸ™ˆ

also, the number of external reference of BddNode is incremented. yes bestie, the refcount goes up β€” that node is now booked and busy. πŸ‘‘


🎁 RETURN VALUE 🎁

addbddnodeassoc returns a pointer to the variable association. that's it, that's the gift. 🫢


πŸ’€ ERRORS πŸ’€

  • "variable xxx out of range, error !" β€” the Variable parameter must be less or equal to the BddSystem->NUMBER_VAR field. go past that and it's over for you, bestie. 🚫

🌈 EXAMPLE 🌈

okay here's the whole vibe in code, copy-paste energy:

#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 );
   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 yeah, that comment in there says it displays ((i3 or i2) and i1) β€” the substitution actually works, we love to see it. πŸ”₯


πŸ‘€ 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 off, tell them β€” they're literally asking. 🫢


sign-off time, bestie: this page came from ASIM/LIP6, dated October 1, 1997, and it lives in manual section 3 as ADDBDDNODEASSOC(3). vintage but still serving. βœ¨πŸ’–πŸŽ€