APPLYBDDNODEITE(3)

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

πŸ’– APPLYBDDNODEITE β€” the bdd bestie page πŸ’–

okay so this is applybddnodeite, from the BDD FUNCTIONS section of the manual (section 3, library calls, we love that for her). She computes an IF-THEN-ELSE logical operation and honestly? she ate. Let's get into it πŸ¦‹


🌸 NAME 🌸

applybddnodeite β€” computes the IF-THEN-ELSE logical operation.


✨ 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. Iconic. French. Academic. We stan πŸ‡«πŸ‡·πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include "bdd101.h"
bddnode βˆ—applybddnodeite( BddSystem, BddIf, BddThen, BddElse )
  bddnode   βˆ—BddSystem;
  bddnode   βˆ—BddIf;
  bddnode   βˆ—BddThen;
  bddnode   βˆ—BddElse;

like, four pointers in, one pointer out. simple. elegant. no cap. 🫢


πŸ’œ PARAMETERS πŸ’œ

  • BddSystem β€” the bdd system. the whole vibe, the whole setup, the main character of the data structures.
  • BddIf β€” the IF bdd node. the question being asked.
  • BddThen β€” the THEN bdd node. what happens when the answer is yes.
  • BddElse β€” the ELSE bdd node. what happens when it's a no. the plan b. we respect her.

πŸ”₯ DESCRIPTION πŸ”₯

so applybddnodeite computes this whole logical function:

(BddIf AND BddThen) OR ((NOT BddIf) AND BddElse)

…inside the bdd system BddSystem. it's giving "if this then that else the other thing" but make it boolean algebra ✨

lowkey important: if you hand her a null pointer, the default bdd system gets used instead. bestie will just pick one for you. periodt.

πŸ‘‘ RETURN VALUE πŸ‘‘

applybddnodeite returns a pointer to the resulting bdd node β€” and she's got her number of external reference incremented. so like, she's counting on you. literally. keep track of that ref count, bestie 😭


🌈 EXAMPLE 🌈

here's the whole little glow-up, verbatim:

#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 );
   addbddcircuitin( (bddcircuit βˆ—)0, "i2", 0, BDD_IN_MODE_FIRST );
   BddNode = applybddnodeite( (bddsystem βˆ—)0,
                              searchbddcircuitin( (bddcircuit βˆ—)0, "i0" ),
                              searchbddcircuitin( (bddcircuit βˆ—)0, "i1" ),
                              searchbddcircuitin( (bddcircuit βˆ—)0, "i2" ) );
   Expr = convertbddcircuitabl( (bddcircuit βˆ—)0, BddNode );
   /* displays ((i0 and i1) or ((not i0) and i2) */
   viewablexpr( Expr, ABL_VIEW_VHDL );
   freeablexpr( Expr );
   destroybddsystem( (bddsystem βˆ—)0 );
   destroybddcircuit( (bddcircuit βˆ—)0 );

notice the "hello_world" circuit name?? she's a hello world girlie fr fr πŸ“ and yes, the comment in there says /* displays ((i0 and i1) or ((not i0) and i2) */ β€” that's the output you get, keep it exact.


πŸ’€ SEE ALSO πŸ’€

that's it, that's the whole friend group. go read bdd(1) next, iykyk 🧚


πŸ™ˆ BUG REPORT πŸ™ˆ

This tool is under development at the ASIM department of the LIP6 laboratory. She's a work in progress, and that's okay β€” we're all growing πŸ’–

We need your feedback to improve documentation and tools. so like… email them. please. they literally asked. do it for the plot 🫢


⭐ sign-off ⭐

that's the whole page bestie!! brought to you by ASIM/LIP6, dated October 1, 1997 β€” yes, 1997, she's vintage, she's an elder statesman of EDA, and she still slays πŸ’…βœ¨πŸ’–