differential-datalog
differential-datalog copied to clipboard
Custom `Ord` trait for DDlog values.
The default Ord
implementation for Intern
relies on pointer comparison and is therefore non-deterministic across DDlog runs. This is necessary to speedup sorting inside DD. We still want DDlog outputs to be deterministic, though, which requires a different, less efficient, but predictable comparison trait. DDlog expressions should be evaluated using this trait. DDlog sets should also use this trait to order things internally.
This is even more important in distributed settings, as we will end up with inconsistent across hosts, potentially compromising correctness.