Idea
An idea behind the tools
Ask any function why
When a result looks wrong, you want to know where it came from. Which inputs moved it? Which inputs could never reach it at all? What was each intermediate value on this run? Usually you find out with a debugger or print statements, changing one input at a time.
Why works on any definition in a program: a data app output, a helper, a service handler. Give it inputs and Yichus runs it, shows each step's value, varies each input to show what moves, and proves which inputs can reach the result at all. What one run showed and what holds for every input are labelled apart.
An example: an invoice with a planted bug
A small invoice program from the project's tests: expenses are taxed but
never added to the total. Output of yichus why --brief, trimmed:
invoice(hours = 12, rate_cents = 9500, expenses_cents = 20000, tax_pct = 13, loyal = True)
labour = 114000
discount = 11400
taxable = 134000
tax = 17420
total = 120020
What each input moves (this run's variations, not proof):
hours 12 -> 13 (+1): labour +9500, discount +950, tax +1235, total +9785
expenses_cents 20000 -> 22000 (+2000): expenses +2000, tax +260, total +260
Adding 2000 in expenses moves the total by only the 260 of tax on it. No step value is wrong; the move is what gives the bug away.
“May reach the result” means a path exists in the program, not that this input changes this result, and no answer says the formula is the one you intended.
Credit: tracing a result back to what produced it comes from spreadsheet trace-precedents, program slicing (Weiser, 1981) and why-provenance in databases (Buneman, Khanna and Tan, 2001); varying one input at a time is one-at-a-time sensitivity analysis. Yichus applies them to any named definition in a compiled program and keeps what is proven apart from what one run showed.
Ask your agent about anything here; it has the detail.