DECBDDREFEXT(3)
π 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 π)
- Web :
http://asim.lip6.fr/recherche/alliance/ - E-mail :
alliance-users@asim.lip6.fr
β¨ 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: theBddNodemust 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
- nixos 26.05: alliance 5.1.1-unstable-2025-02-24
- nixpkgs unstable: alliance 5.1.1-unstable-2025-02-24
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms