I spent my day instrumenting the paths taken by a piece of code under different configurations and lunch reading up on logic programming. On the way back from lunch it occurred to me to combine the two ideas.
So the idea is to leave the free variables in the configuration and then let the logic engine vary them til the code path is what is expected.
(≡ (the-program configuration) known-results)