Reminds me of functional logical programming languages like Verse. when you specify the output and ask for the inputs, you get all possible inputs.
Came here to say the same thing but with reference to Prolog.