APPLYBDDNODE(3)

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

πŸ’… applybddnode(3) β€” the one where you smash two BDD nodes together

okay bestie, welcome to APPLYBDDNODE(3) from the BDD FUNCTIONS manual section β€” yes, section 3, the library-call girlies. this one's short and sweet and honestly kind of iconic, so let's get into it πŸŽ€


✨ NAME ✨

applybddnode β€” applies an operator on two bdd nodes.

like, that's it. that's the whole job. she takes two nodes and an operator and she does the thing. periodt. πŸ’…


🌸 ORIGIN 🌸

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

ngl, a whole CAD system born in Paris? it's giving main character energy and I'm obsessed. 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

#include "bdd101.h"
bddnode βˆ—applybddnode( BddSystem, Oper, BddNode1, BddNode2 )
  bddsystem βˆ—BddSystem;
  long       Oper;
  bddnode   βˆ—BddNode1;
  bddnode   βˆ—BddNode2;

look at her. four little params. no cap, this is the whole vibe check. πŸ’–


πŸŽ€ PARAMETERS πŸŽ€

  • BddSystem β€” the bdd system. your whole little universe, bestie. πŸͺ
  • Oper β€” the binary operator. the what-are-we-even-doing-here of it all.
  • BddNode1 β€” the first bdd node.
  • BddNode2 β€” the second bdd node. (yes, she's the second one. respect the order.) ✨

πŸ’œ DESCRIPTION πŸ’œ

applybddnode computes the boolean function BddNode1 Oper BddNode2 in the bdd system BddSystem. literally just "node one, [operator], node two" β€” like the most dramatic little math sandwich you've ever seen. πŸ₯ͺ

If a null pointer is given, the default bdd system is used. so if you're feeling lazy and pass a (bddsystem βˆ—)0, she's got you. no judgement, we've all been there. πŸ™ˆ


πŸ‘‘ RETURN VALUE πŸ‘‘

applybddnode returns a pointer to the resulting bdd node with its number of external reference incremented.

⚠️ bestie, hear me β€” that reference count goes UP. she's handing you a node that counts on you. don't ghost it. πŸ’€

🌈 ERRORS 🌈

  • "bad operator xxx error !" β€” The Oper parameter must be a valid binary operator.

that's the only error and honestly? relatable. give her a bad operator and she WILL say something. 😭


⭐ EXAMPLE ⭐

#include "bdd101.h"
   bddsystem  βˆ—BddSystem;
   bddcircuit βˆ—BddCircuit;
   bddnode    βˆ—BddNode;
   chain_list βˆ—Expr;
   BddSystem  = createbddsystem( 100, 1000, 100, 50000 );
   BddCircuit = createbddcircuit( "hello_world", 10, 10, BddSystem );
   addbddcircuitin( (bddcircuit βˆ—)0, "i0", 0, BDD_IN_MODE_FIRST );
   addbddcircuitin( (bddcircuit βˆ—)0, "i1", 0, BDD_IN_MODE_FIRST );
   BddNode = applybddnode( (bddsystem βˆ—)0,
                           ABL_AND,
                           searchbddcircuitin( (bddcircuit βˆ—)0, "i0" ),
                           searchbddcircuitin( (bddcircuit βˆ—)0, "i1" ) );
   Expr = convertbddcircuitabl( (bddcircuit βˆ—)0, BddNode );
   /* displays (i0 and i1) */
   viewablexpr( Expr, ABL_VIEW_VHDL );
   freeablexpr( Expr );
   destroybddsystem( (bddsystem βˆ—)0 );
   destroybddcircuit( (bddcircuit βˆ—)0 );

okay so the whole arc here: build a system, build a circuit called "hello_world" (iconic name, no notes), add inputs "i0" and "i1", ABL_AND them together, convert to an ABL expr, and it displays (i0 and i1). then she cleans up after herself β€” freeablexpr, destroybddsystem, destroybddcircuit. we LOVE a girl who cleans up. πŸ§šπŸ’–


πŸ”₯ SEE ALSO πŸ”₯

iykyk, go read that one too. πŸ’…


πŸ’€ 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 literally asking. if something's weird, tell them β€” it's giving community, it's giving glow-up era. 🫢

written by the ASIM/LIP6 girlies, dated <b>October 1, 1997</b> β€” and the page header was APPLYBDDNODE(3) while the footer said ASIM/LIP6 ... October 1, 1997 ... APPLYBDDNODE(3). yes bestie, that's the whole 411, mwah πŸ’‹βœ¨