ELPI(1)

πŸ’– ELPI(1) β€” User Commands πŸ’–

okay bestie, welcome to the elpi page, aka the embeddable lambda-Prolog interpreter. she's giving language-implementation realness and we're gonna go through everything, no skipping, no cap. πŸ¦‹


✨ NAME ✨

elpi β€” embeddable lambda-Prolog interpreter. that's the whole vibe. she interprets, she embeds, she slays. πŸ’…


✨ SYNOPSIS ✨

elpi [OPTION].. [FILE].. [-- ARGS..]

like, options first, then files, then -- and then whatever args you wanna yeet at her. 🌸


✨ DESCRIPTION ✨

πŸ’œ Main options:

  • -test β€” runs the query "main". just straight up runs main, that's it, that's the girl. ✨
  • -exec pred β€” runs the query "pred ARGS". so you hand her a predicate and she runs it with ARGS. iconic.
  • -D var β€” Define variable. this is the conditional compilation one, iykyk. πŸŽ€
  • -document-builtins β€” Print documentation for built-in predicates. free docs, we love that for us. πŸ“š
  • -no-tc β€” don't typecheck the program. living dangerously, I see. 😭
  • -delay-problems-outside-pattern-fragment β€” deprecated, for Teyjus compatibility. it's giving legacy era, bestie. still works, still counts. πŸ’€
  • -version β€” prints the version of Elpi. she'll tell you who she is. πŸ’–

🧚 Parsing options:

  • -I PATH β€” search for accumulated files in PATH. so when stuff gets accumulated, this is where she looks. 🌈

πŸ”₯ Tracing options:

  • -trace-at FNAME START STOP β€” print trace between call START and STOP of function FNAME (FNAME can be omitted, default is run). so it's a lil window of trace, very targeted. πŸ‘‘
  • -trace-on KIND FILE β€” enable trace printing. KIND is tty or json (default is tty). FILE is stdout or stderr (default) or host:port or /path or ./path. yes she can send it over the network, she's flexible like that. πŸ’…
  • -trace-skip REX β€” ignore trace items matching REX. not interested, blocked. πŸ™ˆ
  • -trace-only REX β€” trace only items matching REX. the opposite energy, obsessed with exactly this. ✨
  • -trace-only-pred REX β€” trace only when the current predicate matches REX. predicate-specific attention, main character energy. πŸŽ€
  • -trace-tty-maxbox NUM β€” Format max_boxes set to NUM. literally just sets max_boxes to NUM. 🫢
  • -trace-tty-maxcols NUM β€” Format margin set to NUM. sets margin to NUM, no notes. 🌸
  • -stats-on β€” Collect statistics. numbers girlies rise. πŸ“Š
  • -perf-on β€” Disable trace output, but keep perf. so: no trace noise, all the perf data. best of both. πŸ”₯

Tracing options can be used to debug your programs and the Elpi interpreter. fr fr, that's what they're for.

Tracing points for the user are prefixed with 'user:' while the ones for the Elpi developer with 'dev:'. so you can tell who's talking. πŸ¦‹

A sensible set of options to debug your programs is:

-trace-on -trace-at 1 9999 -trace-only '\(run\|select\|user:\)'

copy that, paste that, thank me later. πŸ’–

πŸ’€ Debug options (for debugging Elpi, not your program):

bestie, read the parenthetical. these are for debugging Elpi herself, not your cute lil program. don't come for me when you use them and get confused. 😭
  • -print-accumulated-files β€” prints files loaded via accumulate. the receipts of what got accumulated. 🧾
  • -print-ast β€” prints files as parsed, then exit. right after parsing, nothing more. ✨
  • -print β€” prints files after most compilation passes, then exit. she's been through some things at this point. πŸ’…
  • -print-passes β€” prints intermediate data during compilation, then exit. all the messy in-between stages. 🌈
  • -print-units β€” prints compilation units data, then exit. unit by unit, very thorough. πŸ‘‘

and that's the whole page, bestie!! πŸ’œ every flag, every arg, every default, all present and accounted for. now go trace something and have the best day. mwah! πŸŽ€βœ¨

β€” signing off: elpi 1.13.7, October 2021, that's the version and the date, love u bye!! πŸ¦‹πŸ’–