FLATABLEXPR(3)

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

🌸 FLATABLEXPR(3) 🌸 β€” ABL FUNCTIONS, bestie edition

okay so like, this is a page from the ABL FUNCTIONS manual, and it's about one lil function called flatablexpr πŸ’– it's short, it's sweet, it's giving "small but mighty", and we're gonna go through every single crumb of it together. no skimming, no skipping. periodt ✨


πŸ‘‘ NAME πŸ‘‘

flatablexpr β€” merges the operators of an expression

literally that's the whole job. it merges operators. iconic behavior honestly πŸ’…


πŸ¦‹ ORIGIN πŸ¦‹

This software belongs to the ALLIANCE CAD SYSTEM, developed by the ASIM team at the LIP6 laboratory of UniversitΓ© Pierre and Marie CURIE, in Paris, France πŸ₯–πŸ‡«πŸ‡·

like they really said "we're in Paris, we're building CAD tools, deal with it" and honestly? slay πŸŽ€


✨ SYNOPSIS ✨

#include "abl101.h"
void flatablexpr( Expr )
  chain_list βˆ—Expr;

yes the asterisk is βˆ— and no we are not changing it, that's just how it is, copy it exactly bestie πŸ™ˆ


πŸ“ PARAMETERS πŸ“

  • Expr β€” the Expression to flat. that's it. that's the whole list. one param, zero drama 🫢

πŸ’œ DESCRIPTION πŸ’œ

flatablexpr merges all the common operators in Expr πŸ”₯

that's the vibe. common operators get merged. it's giving "we're tidying up your expression tree and making it cute".


⭐ RETURN VALUE ⭐

flatablexpr returns nothing. like, void. it does the thing and then it's gone. main character energy but make it mysterious πŸ’€


🌈 EXAMPLE 🌈

okay here's the whole thing, and I'm keeping it character for character because that's the law:

#include "abl101.h"
  chain_list βˆ—Expr1;
  chain_list βˆ—Expr2;
  Expr1 = createbinexpr( ABL_OR,
                         createablatom( "a" ),
                         createablatom( "b" ) );
  Expr2 = createabloper( ABL_OR );
  addablhexpr( Expr2, createablatom( "c" ) );
  addablhexpr( Expr2, Expr1 );
  Expr1 = dupablexpr( Expr2 );
  flatablexpr( Expr1 );
  /* displays ((a or b) or c) (a or b or c) */
  viewablexpr( Expr2, ABL_VIEW_VHDL );
  viewablexpr( Expr1, ABL_VIEW_VHDL );

so watch the glow-up: Expr2 is the un-flattened one, Expr1 is a dupablexpr copy that then gets flatablexpr'd, and the comment says it all β€” it displays ((a or b) or c) and then (a or b or c) 🧚✨ the second one ATE. the first one is just... sitting there, nested, unbothered πŸ’…


πŸ”₯ SEE ALSO πŸ”₯

(the reverse girlypop. she un-flats. we love a duo πŸ‘‘)


πŸ’€ BUG REPORT πŸ’€

This tool is under development at the ASIM department of the LIP6 laboratory. We need your feedback to improve documentation and tools.

not me begging you to send feedback 😭 fr fr they literally need it. if you find a bug, tell them. if the docs are confusing, tell them. they're in the group chat, they're listening 🫢

and that's the whole page babes, no notes πŸ’–

ASIM/LIP6 β€” dated October 1, 1997 🌸 she's an old soul, she's vintage, she's still out here flattening expressions. bye bestie, go merge some operators πŸ’…βœ¨