ADDBDDNODELIST(3)

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

πŸ’… ADDBDDNODELIST(3) β€” the addbddnodelist page

okay so this is addbddnodelist, straight out of the BDD FUNCTIONS manual, section 3, and honestly bestie it's giving "small function, huge glow-up" energy ✨


🌸 NAME 🌸

addbddnodelist β€” adds a node in a chain_list πŸ’«

that's it, that's the whole gig. one node, one list, no cap.


πŸŽ€ 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 πŸ—ΌπŸ₯–

like, real ones built this. iconic behavior fr.


✨ SYNOPSIS ✨

#include "bdd101.h"
chain_list βˆ—addbddnodelist( BddSystem, HeadList, BddNode )
  bddsystem  βˆ—BddSystem;
  chain_list βˆ—HeadList;
  bddnode    βˆ—BddNode;

three args, one include, and you're in πŸ’…


πŸ¦‹ PARAMETERS πŸ¦‹

  • BddSystem β€” the bdd system. yes. THE system. the one we're working in 🫢
  • HeadList β€” the head of the chain_list. the leader of the pack, the main character of the chain πŸ‘‘
  • BddNode β€” the bdd node to add. this is the one getting inserted, slay πŸ’–

πŸ’œ DESCRIPTION πŸ’œ

addbddnodelist adds the node BddNode in the ordered list HeadList, in the bdd system BddSystem 🌈

and here's the lil detail you cannot skip: if a null pointer is given, the default bdd system is used. so like, if you're lazy (affectionate) and pass (bddsystem βˆ—)0, the default one steps in for you. bestie energy honestly πŸ™ˆ

also super important: the number of external reference of BddNode is incremented. so the node is being counted, and you should lowkey remember that, because refs are whole thing πŸ‘€


⭐ RETURN VALUE ⭐

addbddnodelist returns the new head of the list πŸ’«

so like, catch it. don't just call it and ghost it, fr fr.


πŸ”₯ EXAMPLE πŸ”₯

okay here's the whole thing, verbatim, no edits, because accuracy is the vibe:

#include "bdd101.h"
   bddsystem  βˆ—BddSystem;
   bddcircuit βˆ—BddCircuit;
   bddnode    βˆ—BddNode;
   chain_list βˆ—BddList;
   chain_list βˆ—Expr;
   BddSystem  = createbddsystem( 100, 1000, 100, 50000 );
   BddCircuit = createbddcircuit( "hello_world", 10, 10, BddSystem );
   BddList    = (chain_list βˆ—)0;
   BddList = addbddnodelist( (bddsystem βˆ—)0, BddList,
                             addbddcircuitin( (bddcircuit βˆ—)0,
                                              "i0", 0, BDD_IN_MODE_FIRST ) );
   BddList = addbddnodelist( (bddsystem βˆ—)0, BddList,
                              addbddcircuitin( (bddcircuit βˆ—)0,
                                               "i1", 0, BDD_IN_MODE_FIRST );
   BddList = addbddnodelist( (bddsystem βˆ—)0, BddList,
                             addbddcircuitin( (bddcircuit βˆ—)0,
                                              "i2", 0, BDD_IN_MODE_FIRST ) );
   BddNode = applybddnodelist( (bddsystem βˆ—)0, ABL_AND, BddList );
   delbddnodelist( (bddsystem βˆ—)0, BddList );
   Expr = convertbddcircuitabl( (bddcircuit βˆ—)0, BddNode );
   /* displays (i0 and i1 and i2) */
   viewablexpr( Expr, ABL_VIEW_VHDL );
   freeablexpr( Expr );
   destroybddsystem( (bddsystem βˆ—)0 );
   destroybddcircuit( (bddsystem βˆ—)0 );

(wait β€” yes, that i1 line is exactly how it is in the original. i'm not touching it, i don't fix, i just vibe-check πŸ’€)

and see that comment? /* displays (i0 and i1 and i2) */ β€” that's the payoff, that's the whole point of the example, we're ANDing three inputs together and viewing it as VHDL πŸ”₯


🧚 SEE ALSO 🧚

bdd(1) β€” go read it, 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. like genuinely. send the feedback bestie, the docs won't fix themselves 😭🫢


🌈 sign-off 🌈

that's the page! brought to you by ASIM/LIP6, dated October 1, 1997, living forever as ADDBDDNODELIST(3) πŸŽ€βœ¨ go add some nodes to your list, you're gonna ate πŸ’…

πŸ“¦ where this page comes from