APPLYBDDNODE(3)

πŸ“¦ version 5.1.1-unstable-2025-02, in nixos 26.05, nixpkgs unstable

πŸ’… applybddnode(3) β€” bdd functions, bestie!

okay so this one's from the APPLYBDDNODE(3) corner of the BDD FUNCTIONS manual, and it's literally the glow-up your boolean logic has been waiting for ✨


🌸 NAME 🌸

applybddnode β€” applies an operator on two bdd nodes. that's it, that's the whole vibe πŸŽ€


🧚 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 academic royalty, no cap πŸ‘‘

like, if you need to slide into their inbox, that's the address 🫢


✨ SYNOPSIS ✨

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

πŸ¦‹ PARAMETERS πŸ¦‹

  • BddSystem β€” the bdd system. your whole little bdd universe πŸͺ
  • Oper β€” the binary operator. the actual move being made πŸ’…
  • BddNode1 β€” the first bdd node. main character #1
  • BddNode2 β€” the second bdd node. main character #2

πŸ’– DESCRIPTION πŸ’–

so applybddnode computes the boolean function BddNode1 Oper BddNode2 inside the bdd system BddSystem. it's giving "put these two nodes in a room and make them do math" πŸ”₯

and listen β€” if a null pointer is given, the default bdd system is used. convenient? absolutely. slay 🌈


⭐ RETURN VALUE ⭐

applybddnode returns a pointer to the resulting bdd node, with its number of external reference incremented. so yes, the refcount goes up, that's on purpose, don't panic 🫢


πŸ’€ ERRORS πŸ’€

  • "bad operator xxx error !" β€” the Oper parameter must be a valid binary operator. like, it has to be. no fake operators allowed bestie 😭

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

look at that β€” hello_world, two inputs i0 and i1, ABL_AND doing its thing, and then the comment literally says it displays (i0 and i1). 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. fr fr, they're asking β€” so if something's wonky, tell them πŸ™ˆ


ngl this one's short but it does exactly what it says on the tin: two nodes, one operator, one very incremented reference count πŸ“

<div align="center">πŸ’œ mwah πŸ’œ</div>

signing off with all the love from ASIM/LIP6, dated October 1, 1997, page APPLYBDDNODE(3) β€” vintage but still slaying πŸ‘‘βœ¨

πŸ“¦ where this page comes from