Skip to content

In clone, allow applying renamings pre-emptively#903

Merged
strub merged 1 commit intomainfrom
pre-rename-in-clone
Feb 19, 2026
Merged

In clone, allow applying renamings pre-emptively#903
strub merged 1 commit intomainfrom
pre-rename-in-clone

Conversation

@strub
Copy link
Member

@strub strub commented Feb 19, 2026

When cloning a theory and subtituting a sub-theory by some other one, it is now possible to apply renamings on the target sub-theory.

The syntax is:

clone T ... with theory T <- U { rename ... }

This allows to substitute one theory by some other one that got some of its components renamed by a
previous clone.

For example:

abstract theory Word.
  op foo_XX = ...
end Word.

clone Word as W16 rename "_XX" as "_16".

abstract theory UseWord.
  clone Word as W.
end UseWord.

clone UseWord as UseWord16 with
  theory W <- W16 { rename "_XX" as "_16" }.

@strub strub self-assigned this Feb 19, 2026
@strub strub force-pushed the pre-rename-in-clone branch from 222aade to 5bf4800 Compare February 19, 2026 10:42
When cloning a theory and subtituting a sub-theory by
some other one, it is now possible to apply renamings
on the target sub-theory.

The syntax is:

```
clone T ... with theory T <- U { rename ... }
```

This allows to substitute one theory by some other
one that got some of its components renamed by a
previous clone.

For example:

```
abstract theory Word.
  op foo_XX = ...
end Word.

clone Word as W16 rename "_XX" as "_16".

abstract theory UseWord.
  clone Word as W.
end UseWord.

clone UseWord as UseWord16 with
  theory W <- W16 { rename "_XX" as "_16" }.
```
@strub strub force-pushed the pre-rename-in-clone branch from 5bf4800 to d6d771e Compare February 19, 2026 11:02
@strub strub merged commit e9aec65 into main Feb 19, 2026
16 checks passed
@strub strub deleted the pre-rename-in-clone branch February 19, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments