SINGLEDELTA(1)
π 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 π
multidelta(1)topformflat(1)- Delta Debugging project
http://www.st.cs.uni-sb.de/dd/
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
- debian bookworm: delta 2006.08.03-13 Β· BSD-3-Clause
- debian trixie: delta 2006.08.03-13 Β· BSD-3-Clause
- ubuntu noble: delta 2006.08.03-13 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms