satore: robust confluence — one-literal critical pairs and max-steps=1 - #741
Open
PratikDhanave wants to merge 1 commit into
Open
Conversation
…teps=1
Two fixes in the rewrite-tree confluence code:
1. find-critical-pairs: the bounded-size filter used
(max (literal-size (first cl)) (literal-size (second cl))), hard-coding two
literals. But `cl` is (clause-normalize (substitute (list to-lit1 to-lit2) s)),
and safe-factoring can collapse the two `to` literals into a single literal
(e.g. rules p(X)->q(X) and ~p(Y)->q(Y) resolve to [q(Y) q(Y)] -> [q(Y)]).
`(second cl)` then raises an index error. Take the max literal-size over the
whole clause instead; identical to the old behavior for two-literal clauses,
and matches the docstring ("a literal heavier than a `from` literal").
2. rewrite-tree-confluence!: the terminating branch returned `any-change?`,
which omits the current iteration's `changed?`. When the loop stops because of
max-steps (e.g. max-steps = 1) after making a change, it wrongly reported "no
change". Return (or any-change? changed?). Contradicts the docstring "Returns
whether any change has been made."
|
Dooray! 메일 발송 실패 안내
메일 발송
실패 안내
***@***.***)
님께
보낸
메일이
전송되지
못하였습니다.
실패 사유를 확인해보세요.
* 받는 사람 :
***@***.***)
* 발송 시간 :
2026-07-25T15:21:24
* 메일 제목 :
[google-deepmind/deepmind-research] satore: robust confluence — one-literal critical pairs and max-steps=1 (PR #741)
* 실패 사유 :
받는 사람이 현재 메일 수신을 제한하고 있습니다.
이 설정은 개인 또는 조직의 메일 수신 정책에 의해 적용되었습니다.
이 메일은 발신전용으로 회신되지 않습니다.
더 궁금하신 사항은
***@***.***
으로 문의해 주시기 바랍니다.
© Dooray!.
|
Author
|
satore: makes confluence robust (one-literal critical pairs, max-steps=1). CI green — ready for review. |
|
Dooray! 메일 발송 실패 안내
메일 발송
실패 안내
***@***.***)
님께
보낸
메일이
전송되지
못하였습니다.
실패 사유를 확인해보세요.
* 받는 사람 :
***@***.***)
* 발송 시간 :
2026-08-21T14:39:20
* 메일 제목 :
Re: [google-deepmind/deepmind-research] satore: robust confluence — one-literal critical pairs and max-steps=1 (PR #741)
* 실패 사유 :
받는 사람이 현재 메일 수신을 제한하고 있습니다.
이 설정은 개인 또는 조직의 메일 수신 정책에 의해 적용되었습니다.
이 메일은 발신전용으로 회신되지 않습니다.
더 궁금하신 사항은
***@***.***
으로 문의해 주시기 바랍니다.
© Dooray!.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two fixes in the rewrite-tree confluence code (
satore/rewrite-tree.rkt).1.
find-critical-pairscrashes on a one-literal critical pairThe bounded-size filter hard-codes two literals:
But
clis(clause-normalize (substitute (list to-lit1 to-lit2) s)), andsafe-factoring(insideclause-normalize) can collapse the twotoliterals into a single literal — e.g. rulesp(X) -> q(X)and~p(Y) -> q(Y)produce the resolvent[q(Y) q(Y)], which normalizes to[q(Y)].(second cl)then raises an index error.Fix — take the max literal-size over the whole clause (identical to the old behavior for two-literal clauses, and matching the docstring "a literal heavier than a
fromliteral"):(> (apply max 0 (map literal-size cl)) max-size)2.
rewrite-tree-confluence!drops the final step's change from its resultThe terminating branch returns
any-change?, which never OR-s in the current iteration'schanged?. When the loop stops because ofmax-steps(e.g.max-steps = 1) after a step that did add a rule, it wrongly returns#false, contradicting the docstring "Returns whether any change has been made." Fixed with(or any-change? changed?).Testing
Verified by static tracing (
clause-normalize/safe-factoringcan reduce a 2-literal resolvent to 1 literal; themax-steps = 1boundary returns before OR-ing the change). No Racket toolchain available locally; reviewers can runraco test satore/tests/.