and perhaps that means that the optimized variants don't even use datalog
One thing you could do is have datalog be the slow but readable version and use it as a testing oracle for property based testing. Then you can throw randomized code at both and ensure that they have the same results. ￼
great point, and apart from having the randomized inputs or getting them via fuzzing, we already have a way to compare two variants (which we used to test that the Naive and Optimized variants behaved similarly, but only on rustc tests)
Then you can throw randomized code at both and ensure that they have the same results.
Might be useful: https://ieeexplore.ieee.org/abstract/document/7372036
syntactically-valid and semantically-valid are just optimizations :wink: