RESTRICTBDDNODE(3)

πŸ“¦ version 5.1.1, in fedora 43, fedora 44

πŸ’… restrictbddnode(3) β€” the BDD FUNCTIONS era πŸ’…

okay bestie, sit down, hydrate, because we're about to talk about restrictbddnode β€” she substitutes a variable by a zero or a one, in a bdd. that's the whole NAME energy. short. iconic. no notes. ✨


🌈 ORIGIN 🌈

so 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. yes, the Paris. πŸ‡«πŸ‡·

like, go say hi, they want to hear from you fr fr 🫢


✨ SYNOPSIS ✨

#include "bdd101.h"
bddnode βˆ—restrictbddnode( BddSystem, BddNode, Variable, BddSubst )
  bddsystem βˆ—BddSystem;
  bddnode   βˆ—BddNode;
  bddvar     Variable;
  bddnode   βˆ—BddSubst;

πŸŽ€ PARAMETERS πŸŽ€

  • BddSystem β€” the bdd system. the whole vibe container.
  • BddNode β€” the bdd node. the main character we're operating on.
  • Variable β€” the variable to find. we're hunting her down.
  • BddSubst β€” the bdd to substitute with. the swap-in.

πŸ’– DESCRIPTION πŸ’–

okay so here's the tea β˜• β€” restrictbddnode substitutes all the occurency of the variable Variable in the bdd node BddNode by the bdd node BddSubst, in the bdd system BddSystem.

if a null pointer is given, the default bdd system is used. classic default behaviour, we love her.

⚠️ important bestie: the BddSubst must be a the node BddSystem->ONE or BddSystem->ZERO. that's it. those are the only two options. no improvising. πŸ’€

πŸ”₯ RETURN VALUE πŸ”₯

restrictbddnode returns the resulting bdd node. she ate and left no crumbs πŸ‘‘


πŸ’€ ERRORS πŸ’€

  • "variable xxx out of range, error !" β€” the Variable parameter must be less or equal to the BddSystem->NUMBER_VAR field. don't push her past her limits.
  • "index xxx out of range, error !" β€” the BddSubst parameter must have its index less than BDD_INDEX_MIN.

🌸 EXAMPLE 🌸

here's a whole little scenario, run it and feel something:

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

see that /* displays '1' */? yeah. that's the payoff. ✨


πŸ¦‹ 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. like genuinely, please, they're asking nicely, send the feedback πŸ₯Ί


ASIM/LIP6 Β· October 1, 1997 Β· RESTRICTBDDNODE(3)

and that's the whole page bestie, dated October 1, 1997, from ASIM/LIP6, manual section 3 β€” periodt πŸ’…πŸŽ€πŸ¦‹