DECBDDREFEXT(3)

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

πŸ’… DECBDDREFEXT(3) β€” like, the external-ref decrement one

okay so bestie, welcome to the BDD FUNCTIONS corner of the (3) manual ✨ this whole page is about decbddrefext, and it's genuinely one of the simplest little guys in the whole BDD crew, so you're gonna slay this πŸŽ€


🌸 ORIGIN 🌸

so this software belongs to the ALLIANCE CAD SYSTEM, built by the ASIM team at the LIP6 laboratory of UniversitΓ© Pierre et Marie CURIE, in Paris, France πŸ₯–πŸ’– (the original page renders that university name with a slightly cursed accent byte, no cap, but you get the vibe β€” it's Paris, it's iconic πŸ‘‘)


✨ SYNOPSIS ✨

#include "bdd101.h"
bddnode βˆ—decbddrefext( BddNode )
  bddnode βˆ—BddNode;

like, you pass in one node pointer and you get a node pointer back. that's the whole plot 🫢


πŸŽ€ PARAMETERS πŸŽ€

  • BddNode β€” the bdd node, obviously πŸ’… this is the guy whose external reference count is about to take a little dip.

πŸ¦‹ DESCRIPTION πŸ¦‹

decbddrefext decrements the number of external references on the bdd node BddNode. that's it. that's the function. she's a one-trick pony and she does her trick flawlessly ✨

think of it as "i'm done holding this node from the outside, you can let go of one of my fingers now" 🫳 lowkey the most honest function on the whole page.


πŸ’– RETURN VALUE πŸ’–

decbddrefext returns the BddNode pointer. same pointer you handed in, coming right back at you like a boomerang πŸͺƒ periodt.


πŸ’€ ERRORS πŸ’€

  • "negative reference, index xxx error !" β€” dramatic but fair: the BddNode must have a positive number of external references. if you try to decrement a count that's already at zero, you get this error message and honestly, deserved πŸ™ˆ don't decrement what you didn't increment, bestie.

πŸ”₯ EXAMPLE πŸ”₯

okay this is the main character example, study it because it's cute:

#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 );
   BddNode = addbddcircuitin( (bddcircuit βˆ—)0, "i0", 0, BDD_IN_MODE_FIRST );
   BddNode = addbddnode( (bddsystem βˆ—)0, BddNode->INDEX, BddNode->LOW, BddNode->HIGH );
   Expr = convertbddcircuitabl( (bddcircuit βˆ—)0, BddNode );
   decbddrefext( BddNode );
   /* displays Node VAR: 0  INDEX: 2  MARK: 0  REF_EXT: 0  REF_INT: 0 */
   viewbddnode( (bddsystem βˆ—)0, BddNode );
   /* displays (not i0) */
   viewablexpr( Expr, ABL_VIEW_VHDL );
   freeablexpr( Expr );
   destroybddsystem( (bddsystem βˆ—)0 );
   destroybddcircuit( (bddcircuit βˆ—)0 );

so you create a system, create a circuit called "hello_world" (iconic name, no notes πŸ’…), make an input node, wrap it with addbddnode, convert it to an ABL expression, then β€” the moment we've all been waiting for β€” call decbddrefext( BddNode ) πŸŽ‰

after that, viewbddnode displays:

Node VAR: 0  INDEX: 2  MARK: 0  REF_EXT: 0  REF_INT: 0

like look at that REF_EXT: 0 β€” she ate and left zero crumbs πŸ”₯ and viewablexpr( Expr, ABL_VIEW_VHDL ) displays:

(not i0)

then we tidy up: freeablexpr, destroybddsystem, destroybddcircuit. clean up your room bestie, always 🌸


🧚 SEE ALSO 🧚

  • bdd(1) β€” go read this too, iykyk

🫢 BUG REPORT 🫢

this tool is under development at the ASIM department of the LIP6 laboratory ⭐ and fr fr, they need your feedback to improve documentation and tools. so like, if something's off, tell them πŸ’Œ


okay that's the whole page, you're a decbddrefext expert now, go decrement responsibly πŸ’…βœ¨

this little number comes to you from ASIM/LIP6, dated October 1, 1997 β€” vintage, iconic, still slaying πŸ’–πŸŽ€

πŸ“¦ where this page comes from