RESTRICTBDDNODE(3)
๐ RESTRICTBDDNODE(3) ๐
ok so this is a section-3 manpage from BDD FUNCTIONS and honestly? it's a little baddie. it swaps a variable out for a zero or a one inside a bdd. let's get into it bestie ๐ซถ
โจ NAME โจ
restrictbddnode โ substitutes a variable by a zero or one, in a bdd.
๐ธ ORIGIN ๐ธ
ok so this software belongs to the ALLIANCE CAD SYSTEM, which was developed by the ASIM team at the LIP6 laboratory of Universitรฉ Pierre et Marie CURIE, in Paris, France. iconic lineage tbh ๐ซ๐ทโจ
- Web :
http://asim.lip6.fr/recherche/alliance/ - E-mail :
alliance-users@asim.lip6.fr
like if u need to reach them, that's how ๐
๐ SYNOPSIS ๐
#include "bdd101.h"
bddnode โrestrictbddnode( BddSystem, BddNode, Variable, BddSubst )
bddsystem โBddSystem;
bddnode โBddNode;
bddvar Variable;
bddnode โBddSubst;
๐ฆ PARAMETERS ๐ฆ
BddSystemโ the bdd system. ur whole lil universe of nodes lives here.BddNodeโ the bdd node. the one we're doing surgery on ๐ชVariableโ the variable to find. we're hunting for this one, bestie.BddSubstโ the bdd to substitute with. what we're swapping it out for.
๐ DESCRIPTION ๐
so restrictbddnode substitutes all the occurency of the variable Variable in the bdd node BddNode by the bdd node BddSubst, in the bdd system BddSystem. it's giving find-and-replace but make it โจboolean algebraโจ
if a null pointer is given, the default bdd system is used. convenient, no cap.
๐จ important vibe check: theBddSubstmust be the nodeBddSystem->ONEorBddSystem->ZERO. like. those are the only two options. don't try anything else, we're not doing that today ๐
โญ RETURN VALUE โญ
restrictbddnode returns the resulting bdd node. that's the glow-up version of what you passed in ๐ซ
๐ ERRORS ๐
"variable xxx out of range, error !"โ theVariableparameter must be less or equal to theBddSystem->NUMBER_VARfield. stay in ur lane, variable."index xxx out of range, error !"โ theBddSubstparameter must have its index less thanBDD_INDEX_MIN. out of bounds = not the move ๐ญ
๐ฅ EXAMPLE ๐ฅ
here's the whole thing in action, copy-paste energy:
#include "bdd101.h"
bddsystem โBddSystem;
bddcircuit โBddCircuit;
bddnode โBddVariable;
bddnode โBddNode;
bddnode โBddSubst;
chain_list โExpr;
bddvar Variable;
BddSystem = createbddsystem( 100, 1000, 100, 50000 );
BddCircuit = createbddcircuit( "hello_world", 10, 10, BddSystem );
Expr = createablbinexpr( ABL_OR,
createablatom( "i0" ),
createablatom( "i1" ) );
BddNode = addbddcircuitabl( BddCircuit, Expr );
freeablexpr( Expr );
BddSubst = BddSystem->ONE;
BddVariable = searchbddcircuitin( (bddcircuit โ)0, "i0" );
Variable = getbddvarbyindex( (bddsystem โ)0, BddVariable->INDEX );
BddNode = restrictbddnode( (bddsystem โ)0, BddNode, Variable, BddSubst );
Expr = convertbddcircuitabl( BddCircuit, BddNode );
/* displays '1' */
viewablexpr( Expr, ABL_VIEW_VHDL );
freeablexpr( Expr );
destroybddsystem( (bddsystem โ)0 );
destroybddcircuit( (bddcircuit โ)0 );
and yeah, the /* displays '1' */ comment is real โ that's the actual output. ate and left no crumbs ๐
๐ SEE ALSO ๐
๐ BUG REPORT ๐
this tool is under development at the ASIM department of the LIP6 laboratory. they literally say: we need your feedback to improve documentation and tools. so likeโฆ spill, bestie ๐
that's the whole page!! mwah ๐
ASIM/LIP6 ยท October 1, 1997 ยท RESTRICTBDDNODE(3) โ ok that's a wrap, go restrict some nodes responsibly ๐งโโ๏ธโจ
๐ฆ 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