UNSETBDDREFEXT(3)
π unsetbddrefext β the BDD reference-swapper of your dreams π
okay so bestie, this is unsetbddrefext(3) from the BDD FUNCTIONS manual, and it's lowkey one of those tiny little functions that just does one thing and does it gorgeously. no cap. let's get into it π«Ά
β¨ NAME β¨
unsetbddrefext β increments the internal reference, and decrements the external reference of a bdd node.
likeβ¦ it's giving "swap the vibes on your refcounts" and honestly? iconic π
π 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. π₯β¨
- Web :
http://asim.lip6.fr/recherche/alliance/ - E-mail :
alliance-users@asim.lip6.fr
so yes, it's French, it's academic, it's serving laboratoire realness π«π·π
π¦ SYNOPSIS π¦
#include "bdd101.h"
bddnode βunsetbddrefext( BddNode )
bddnode βBddNode;
(yeah that β is exactly how it's written, don't come for me π copy it character for character fr fr)
π PARAMETERS π
BddNodeβ the bdd node. that's it. that's the whole cast. one (1) little node, main character energy π
π DESCRIPTION π
So here's the tea β β unsetbddrefext increments the number of internal reference of the bdd node BddNode and decrements its number of external reference.
that's the whole plot. one goes up, one goes down. balance. symmetry. art πΈ
β RETURN VALUE β
unsetbddrefext returns the BddNode pointer. it hands you back the same node you gave it, like "here bestie, as promised" π«Άβ¨
π ERRORS π
"negative reference, index xxx error !"β theBddNodemust have a positive number of external reference.
okay so this is the part where you do not try to decrement something that's already at zero. the node needs a positive number of external reference, periodt. if you don't give it that, you get the error above and honestly? deserved. π
π₯ EXAMPLE π₯
this is the whole little demo, verbatim, don't touch a single character:
#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 );
incbddrefext( BddNode );
unsetbddrefext( BddNode );
/* displays Node VAR: 0 INDEX: 2 MARK: 0 REF_EXT: 0 REF_INT: 1 */
viewbddnode( (bddsystem β)0, BddNode );
/* displays (not i0) */
viewablexpr( Expr, ABL_VIEW_VHDL );
freeablexpr( Expr );
destroybddsystem( (bddsystem β)0 );
destroybddcircuit( (bddcircuit β)0 );
see how incbddrefext( BddNode ); comes in first and then unsetbddrefext( BddNode ); undoes the external side? and then viewbddnode shows you:
/* displays Node VAR: 0 INDEX: 2 MARK: 0 REF_EXT: 0 REF_INT: 1 */
and viewablexpr( Expr, ABL_VIEW_VHDL ); gives you:
/* displays (not i0) */
then everybody gets cleaned up. chef's kiss π¨π³π
π SEE ALSO π
go read it. it's the parent lore. iykyk πβ¨
π§ BUG REPORT π§
This tool is under development at the ASIM department of the LIP6 laboratory.
We need your feedback to improve documentation and tools.
bestie they are literally asking for your feedback, so if something's wonky, tell them. this is your moment to be the helpful icon you were born to be π
and that's the whole page!! πβ¨ππ¦πΈπ π«Ά
this was UNSETBDDREFEXT(3) from the ASIM/LIP6 crew, dated October 1, 1997 β yes, 1997, it's vintage, it's classic, it predates most of us and it still slays π β mwah, stay reference-safe bestie ππ
π¦ where this page comes from
- fedora 43: alliance-devel 5.1.1-35.20160506gitd8c05cd.fc42 Β· GPL-2.0-only
- fedora 43: alliance-devel 5.1.1-35.20160506gitd8c05cd.fc42 Β· GPL-2.0-only
- fedora 44: alliance-devel 5.1.1-35.20160506gitd8c05cd.fc42 Β· GPL-2.0-only
- fedora 44: alliance-devel 5.1.1-35.20160506gitd8c05cd.fc42 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms