SUBSTBDDNODEASSOC(3)

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

πŸ’– substbddnodeassoc β€” the bdd glow-up page πŸ’–

okay bestie, sit down, hydrate, and let me tell you about substbddnodeassoc, a real one from the BDD FUNCTIONS section of the manual (section 3, we're fancy like that). no cap, this is the function that swaps your variables out for whole entire bdd nodes. it's giving substitution but make it iconic. πŸ’…


✨ NAME ✨

substbddnodeassoc β€” substitutes a set of variables with a set of bdd node.

yes. that's the whole name. short, sweet, ate. 🌸


πŸŽ€ ORIGIN πŸŽ€

so this software? it belongs to the ALLIANCE CAD SYSTEM, developed by the ASIM team at the LIP6 laboratory of UniversitΓ© Pierre et Marie CURIE, in Paris, France. πŸ‡«πŸ‡· like, actual Paris. main character laboratory energy.

πŸ¦‹


🌈 SYNOPSIS 🌈

lowkey the vibe check of the whole page, here it is, verbatim, don't @ me:

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

πŸ’œ PARAMETERS πŸ’œ

three little inputs, three little besties:

  • BddSystem β€” the bdd system. that's it, that's the whole description. the system of the bdd variety. 🫢
  • BddNode β€” the bdd node to treat. yes, we are treating it. it deserves it. ✨
  • BddAssoc β€” the variable association. the lil matchmaking list of variables and what they're linked to. πŸ’Œ

πŸ‘‘ DESCRIPTION πŸ‘‘

okay so here's the tea, and it's actually really good tea: substbddnodeassoc substitutes, in the bdd node BddNode, all the variables that are associated to something in the variable association BddAssoc β€” and it swaps each one out with the corresponding bdd node. all of this happens inside the bdd system BddSystem. πŸ”₯

and listen, if you hand it a null pointer? no drama. it just uses the default bdd system. bestie is flexible, we love that for her. πŸ’…


⭐ RETURN VALUE ⭐

substbddnodeassoc returns the computed bdd node. that's the whole thing. it gives you the node. you say thank you. the end. πŸŽ€


πŸ’€ ERRORS πŸ’€

things can go sideways, and here's exactly how, quoted for accuracy because we do not paraphrase errors in this house:

  • "variable xxx out of range, error !" the Variable parameter must be less or equal to the BddSystem->NUMBER_VAR field. so like, stay in your lane, variable. 🚫
  • "bad variable association xxx, error !" the BddAssoc parameter must a valid variable association. (that's literally what the page says, we're keeping it fr fr.) so make sure your association is actually valid before you come for this function. πŸ™ˆ

πŸ“ EXAMPLE πŸ“

here's a whole entire example, and yes, we're keeping every single character because it's iconic:

#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 );

see that comment in there? /* displays ((i3 or i2) and i1) */ β€” that's the payoff, that's the plot twist, that's the moment. the function did that. 🫢✨


🌸 SEE ALSO 🌸

go read it, bestie, iykyk. πŸ“š


πŸ™ˆ BUG REPORT πŸ™ˆ

so this tool is under development at the ASIM department of the LIP6 laboratory. (not me telling you it's still cooking 😭)

and fr fr: they need your feedback to improve documentation and tools. so if something's weird, say something. your girl loves a group chat. πŸ’Œ


⚠️ gentle reminder bestie: the errors above are quoted exactly as written, and the parameter rules are real rules β€” Variable must be less or equal to the BddSystem->NUMBER_VAR field, and BddAssoc must be a valid variable association. don't skip the vibe check on your inputs. πŸ’…

and that's the page! brought to you by ASIM/LIP6, dated October 1, 1997, living in the SUBSTBDDNODEASSOC(3) era. mwah. slay. periodt. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ