SUBSTABLEXPR(3)

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

πŸ’– SUBSTABLEXPR(3) β€” the ABL FUNCTIONS girlies πŸ’–

okay so bestie, you're in the abl101.h cinematic universe now and this is substablexpr(3), a function that's genuinely so iconic. let's get into it 🫢


✨ NAME ✨

substablexpr β€” substitutes a given atom by an expression.

like. that's the whole job. it's giving find-and-replace but make it boolean algebra πŸ’…


🌸 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. oui oui, trΓ¨s slay πŸ‡«πŸ‡·βœ¨


πŸŽ€ SYNOPSIS πŸŽ€

#include "abl101.h"
chain_list βˆ—substablexpr( Expr1, Name, Expr2 )
  chain_list βˆ—Expr1;
  char       βˆ—Name;
  chain_list βˆ—Expr2;

πŸ¦‹ PARAMETERS πŸ¦‹

  • Expr1 β€” First expression. (the main character, the one getting the glow-up)
  • Name β€” Atom name. (the atom we're swapping out, by name, fr fr)
  • Expr β€” Second expression. (the one moving in, no cap)

πŸ’œ DESCRIPTION πŸ’œ

so substablexpr substitutes Atom in Expr1 by Expr2. that's it, that's the function, and it ate πŸ’…

⚠️ okay but listen β€” the expression pointer Expr1 MUSTN'T be used after the call to this function. like, do not touch it afterwards. it's gone, it's not yours anymore, it left the group chat. use the return value instead, bestie 😭

🌈 RETURN VALUE 🌈

substablexpr returns the modified expression. 🎁 that's your new bestie, take it and go.


πŸ”₯ EXAMPLE πŸ”₯

#include "abl101.h"
  chain_list βˆ—Expr1;
  chain_list βˆ—Expr2;
  Expr1 = createablbinexpr( ABL_OR,
                            createablatom( "a" ),
                            createablatom( "b" ) );
  Expr2 = createablbinexpr( ABL_AND,
                            createablatom( "c" ),
                            createablatom( "d" ) );
  Expr1 = substablexpr( Expr1, "a", Expr2 );
  /* displays ((c and d) or b) */
  viewablexpr( Expr1, ABL_VIEW_VHDL );

see how the "a" got swapped for (c and d) and then we get ((c and d) or b)?? that's the whole transformation arc. character development. periodt. πŸ‘‘


πŸ‘‘ SEE ALSO πŸ‘‘

abl(1), substdupablexpr(3).

go read those too, they're part of the lore πŸ’–


πŸ’€ BUG REPORT πŸ’€

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

(no literally, they're asking, so send the feedback, it's your moment ✨)


that's the whole page bestie, you're officially fluent in substablexpr πŸŽ€

ASIM/LIP6 Β· October 1, 1997 Β· SUBSTABLEXPR(3) β€” mwah, love u, bye πŸ’–βœ¨