Repository navigation
fix(clone): alias a theory cleared by a theory override - #1242
Merged
Merged
Conversation
A theory override `theory B <- T` maps each item of `B` to the item
with the same name in `T`. When `T` was itself produced by a clone
that overrode one of its sub-theories with `theory A <- U`, that
sub-theory was cleared: the items of `B.A` have no target, and the
clone fails with:
unknown symbol: ...B.A.t
unless it also gives `theory B.A <- U`.
A clone now leaves a non-imported alias `theory A = U` in place of a
theory that `theory A <- U` has cleared, and theory overrides follow
these aliases, so that `theory B <- T` suffices. The alias is left
only when no more specific override departs from the theory override.
It also names `U` in qualified names: `T.A.u` is `U.u`.
Tests in tests/clone-theory-override-cleared.ec, and new cases in
tests/clone-theory-override-nested.ec and
tests/clone-theory-override-specific.ec.
strub
force-pushed
the
fix/clone-cleared-theory-alias
branch
from
November 24, 2026 16:57
cf175a1 to
50371bd
Compare
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.
A theory override
theory B <- Tmaps each item ofBto the itemwith the same name in
T. WhenTwas itself produced by a clonethat overrode one of its sub-theories with
theory A <- U, thatsub-theory was cleared: the items of
B.Ahave no target, and theclone fails with:
unless it also gives
theory B.A <- U.A clone now leaves a non-imported alias
theory A = Uin place of atheory that
theory A <- Uhas cleared, and theory overrides followthese aliases, so that
theory B <- Tsuffices. The alias is leftonly when no more specific override departs from the theory override.
It also names
Uin qualified names:T.A.uisU.u.Tests in tests/clone-theory-override-cleared.ec, and new cases in
tests/clone-theory-override-nested.ec and
tests/clone-theory-override-specific.ec.