doc: refine kernel code comments (#6150)

I just spent too much time being confused about the kernel type checker
until I noticed that `lazy_delta_reduction` modifies its arguments.
This commit is contained in:
Joachim Breitner 2024-11-23 18:13:51 +01:00 committed by GitHub
parent 51d1cc61d7
commit bf13b24692
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -981,6 +981,7 @@ lbool type_checker::is_def_eq_offset(expr const & t, expr const & s) {
return l_undef;
}
/** \remark t_n, s_n are updated. */
lbool type_checker::lazy_delta_reduction(expr & t_n, expr & s_n) {
while (true) {
lbool r = is_def_eq_offset(t_n, s_n);
@ -1098,6 +1099,7 @@ bool type_checker::is_def_eq_core(expr const & t, expr const & s) {
r = is_def_eq_proof_irrel(t_n, s_n);
if (r != l_undef) return r == l_true;
/* NB: `lazy_delta_reduction` updates `t_n` and `s_n` even when returning `l_undef`. */
r = lazy_delta_reduction(t_n, s_n);
if (r != l_undef) return r == l_true;