SINGLEDELTA(1)

πŸ“¦
version 2006.08.03 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble

πŸ‘‘ SINGLEDELTA(1) β€” the girlies' guide to singledelta πŸ’…

okay bestie, sit down, hydrate, because we're about to talk about singledelta, and it's genuinely iconic. this is the tool that shrinks your messy "interesting" files down to the bare minimum that still does the thing. no cap.


✨ NAME ✨

singledelta β€” heuristic minimizer of interesting files πŸ¦‹


🌸 SYNOPSIS 🌸

singledelta -test=test-script [options] [initial-file]

πŸ’– DESCRIPTION πŸ’–

okay so. Delta is your bestie who helps you minimize "interesting" files, subject to a test of their interestingness. the classic scenario: you've got a HUGE input, your program is bugging out, and you're trying to isolate the tiny little failure-inducing substring that's actually causing it. that's the whole vibe. πŸ”₯

so you hand singledelta two things:

  • a test shell script that decides if its input file is "interesting" (test-script), and
  • an initial interesting input file (initial-file, or standard input if you don't give one).

then Delta uses heuristics to find a sub-file of your input file that is still "interesting" according to your test. slay. ✨

Delta also has a notion of the granularity of the file β€” that's the smallest atomic elements the file is seen as a sequence of. the default is line granularity: in this mode, delta will attempt to delete entire lines, but will never try deleting a smaller element than that. periodt. πŸ’…

if your file is in a nested language, you can filter a program through topformflat(1) to produce a file where the line-granularity only goes to a specified nesting depth. and multidelta(1) does this for you. 🫢


πŸŽ€ OPTIONS πŸŽ€

  • -test=test-script β€” use test-script as the test program. this option is mandatory, bestie, you literally cannot skip it.

the test program accepts a single argument: the name of the candidate file to test. it's run within a directory containing only that file, and it can make temporary files/directories in that directory. it should return zero for a candidate that exhibits the desired property, and nonzero for one that does not. iykyk.

  • -suffix=suffix β€” set the filename suffix to suffix. the default is ".c".
  • -dump_input β€” dump the contents of the initial file after reading it. little peek, little reveal. πŸ™ˆ
  • -cp_minimal=file β€” copy the minimal successful test to file. your trophy file, honestly. πŸ†
  • -granularity=line β€” use lines as the granularity. this is the default, and it's giving main character energy.
  • -granularity=top_form β€” use C top-level forms as the granularity. this currently only works with CIL output. lowkey niche but okay. πŸ’œ
  • -log=file β€” log main events to file.
  • -quiet β€” do not produce any output. not a single peep. 🀫
  • -verbose β€” produce more verbose output. she's chatty, we love her. πŸ’¬
  • -in_place β€” overwrite initial-file with inputs. heads up: this one overwrites your file, so like... be careful, bestie. 😭
  • -help β€” print out usage information. when in doubt, ask for help. 🌈

🧚 NOTES 🧚

the name singledelta is Debian-specific. the upstream name of this program is simply delta. so if you go looking for her elsewhere, that's her government name. πŸ‘‘


🌟 SEE ALSO 🌟


and that's the whole page, bestie. this version is Delta 2006.08.03, dated 2022-05-27, and honestly? she ate. go minimize something. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from