ChatGTP: Yes — I think I see it.
For a nondeterministic d-rule, take the current hypothesis list and consider all permutations of it. Run the ordinary deterministic compiled rule on each permutation. Every legal choice of matching hypotheses is thereby exposed as a first-match case.
That is exactly what I was thinking. I don't want to sound harsh, but ... how many human beings could pull my thought out of the air like that? Its scary in a way in the implications for a lot of white collar work, that something this smart can be around.
Now there was a solution forming in my mind about looking at restricted permutations. But before I could articulate it ChatGPT beat me to the punch.
ChatGPT: The semantics are elegant; the brute-force realization is not.
But the permutation view tells us exactly what the efficient algorithm should avoid: exploring reorderings that differ only in irrelevant positions. For a rule with schematic hypotheses against a context of size , what matters is not all permutations, but the distinct ordered selections of hypotheses that satisfy the schematic matches. In the worst case that is
rather than n! .
If is small—and most derivation rules have only a few schematic hypotheses—that is a huge improvement.
That is really really smart. So I said - OK write the restricted permutation program and it did.
Just amazing really; the intellectual development in one year alone. :O
Mark