Skip to content

perf(clone): pristine-to-pristine theory overrides as renamings - #1243

Merged
strub merged 1 commit into
mainfrom
perf/clone-pristine-override
Nov 24, 2026
Merged

strub merged 1 commit into
mainfrom
perf/clone-pristine-override

Conversation

@strub

@strub strub commented Nov 24, 2026

Copy link
Copy Markdown
Member

A clone that changes nothing (no override, rename, clear or include)
is a pristine copy of its source theory, and now records that source;
print theory shows it as a leading comment:

(* clone T as T1 *)

When a theory override replaces a pristine copy of a theory by another
pristine copy of the same theory, the two are indiscernible. The
replay used to substitute and compare every item of the replaced copy
before dropping it for an alias, which is costly when the copy is a
large theory. It now redirects the paths of the replaced copy to the
target instead.

Test in tests/clone-pristine-override.ec; the expected output of
tests/clone-alias-target.ec gains the source comment.

@strub
strub force-pushed the fix/clone-cleared-theory-alias branch from cf175a1 to 50371bd Compare November 24, 2026 16:57
Base automatically changed from fix/clone-cleared-theory-alias to main November 24, 2026 16:58
@strub
strub force-pushed the perf/clone-pristine-override branch from 07a36ee to 3a46305 Compare November 24, 2026 17:00
A clone that changes nothing (no override, rename, clear or include)
is a pristine copy of its source theory, and now records that source;
`print theory` shows it as a leading comment:

    (* clone T as T1 *)

When a theory override replaces a pristine copy of a theory by another
pristine copy of the same theory, the two are indiscernible. The
replay used to substitute and compare every item of the replaced copy
before dropping it for an alias, which is costly when the copy is a
large theory. It now redirects the paths of the replaced copy to the
target instead.

Test in tests/clone-pristine-override.ec; the expected output of
tests/clone-alias-target.ec gains the source comment.
@strub
strub force-pushed the perf/clone-pristine-override branch from 3a46305 to 01ab3cc Compare November 24, 2026 17:02
@strub strub self-assigned this Nov 24, 2026
@strub strub added the yolo-pr Don't bother reviewing, I will merge label Nov 24, 2026
@strub
strub merged commit 56b48a3 into main Nov 24, 2026
20 checks passed
@strub
strub deleted the perf/clone-pristine-override branch November 24, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

yolo-pr Don't bother reviewing, I will merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant