GETBDDVARINDEX(3)

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

🌸 GETBDDVARINDEX 🌸

ok so bestie, you've stumbled into the BDD FUNCTIONS section of the manual (that's section 3, iykyk) and this little icon is called getbddvarindex. she's small, she's focused, and she does exactly one thing. let's get into it πŸ’…


✨ NAME ✨

getbddvarindex β€” converts a variable number in a bdd index.

like, that's the whole job. one job. she's employed. periodt.


πŸŽ€ 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. very chic, very french, very "we invented this and you're welcome" ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include "bdd101.h"
bddindex getbddvarindex( BddSystem, Variable )
  bddsystem *BddSystem;
  bddvar     Variable;

two args. that's it. no chaos, no surprises, just vibes 🫢


πŸ’– PARAMETERS πŸ’–

  • BddSystem β€” the bdd system. the whole system, bestie. the container. the moment.
  • Variable β€” the variable number you want converted. the number in question. the one we're translating.

🌈 DESCRIPTION 🌈

okay so here's the tea: getbddvarindex converts the variable number Variable to a bdd index, inside the bdd system BddSystem. that's the entire plot πŸ“

and the plot twist? if you hand her a null pointer, she just uses the default bdd system. no drama, she's flexible like that.

how does she do it so fast? she's not out here doing math, she's literally just reading the translation table BddSystem->VAR_TO_INDEX. it's giving "lookup table queen" πŸ‘‘ the function uses simply the translation table, no cap.


πŸ”₯ RETURN VALUE πŸ”₯

getbddvarindex returns the bdd index of Variable. that's your gift. you're welcome πŸ’œ


πŸ’€ ERRORS πŸ’€

  • "variable xxx out of range, error !" β€” okay so this happens when you're doing too much πŸ™ˆ the Variable parameter must be less or equal to the BddSystem->NUMBER_VAR field. not greater. less or equal. don't push her.

⭐ EXAMPLE ⭐

#include "bdd101.h"
   bddsystem  *BddSystem;
   bddnode    *BddNode;
   BddSystem  = createbddsystem( 100, 1000, 100, 50000 );
   BddNode = addbddvar( (bddsystem *)0, 0 );
   /* displays 2 */
   printf( "%d", getbddvarindex( (bddsystem *)0, 0 ) );
   destroybddsystem( (bddsystem *)0 );

see that /* displays 2 */ comment? that's not me lying to you, that's literally in the source πŸ’… she ate and left crumbs.


🧚 SEE ALSO 🧚

  • bdd(1) β€” go read it, bestie, i'll wait πŸŽ€

πŸ™ˆ BUG REPORT πŸ™ˆ

This tool is under development at the ASIM department of the LIP6 laboratory.

We need your feedback to improve documentation and tools. fr fr, they're asking. send the feedback. be the main character of open source 🫢


ngl the whole page is short but she's valid and she works hard. treat her well πŸ’–

okay that's the whole thing!! this page came to you from ASIM/LIP6, dated October 1, 1997 β€” yes, 1997, she's been iconic since the 90s and she's still here 🌸 mwah, go convert some variables bestie βœ¨πŸ’…

πŸ“¦ where this page comes from