Skip to content

Fix deprecation warnings in main sources (key.core, key.ncore, key.util, ...) - #4007

Closed
wadoon wants to merge 6 commits into
weigl/cw-unchecked-rawtypesfrom
weigl/cw-deprecation-main
Closed

wadoon wants to merge 6 commits into
weigl/cw-unchecked-rawtypesfrom
weigl/cw-deprecation-main

Conversation

@wadoon

@wadoon wadoon commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

What

Fix [deprecation] (plus [rawtypes]/[unchecked]) javac lint warnings in 31
main-source files of key.util, key.ncore, key.ncore.calculus,
key.ncore.matcher, key.core, key.core.infflow, key.core.testgen,
key.ui, keyext.isabelletranslation. 6 commits, one per module group.

Numbers

150 occurrences handled:

  • 5 migrated (provably safe, local): ImmutableArray → ImmutableList in
    BasicBlockExecutionSnippet; raw Assignment → Assignment<?> in
    BasicSymbolicExecutionSnippet.
  • 145 suppressed at the narrowest scope with one-line rationale.

0 targeted warnings remain in the 31 files (verified on a clean compile).

Reasoning highlights

  • The dominant deprecated symbol is ImmutableArray, whose contract is bound
    end-to-end through Term/TermBuilder/operator APIs — migrating single
    call sites would change cross-type equals/subs() semantics (e.g.
    TermLabelManager.replaceTerm compares newSubs.equals(term.subs())), so
    suppression with justification is the behavior-preserving choice.
    Full removal is the topic of Remove deprecated ImmutableArray in favor of ImmutableList #4001 (whose branch this stack is based on).
  • A clean rebuild surfaced 16 extra TermBuilder deprecations not in the
    incremental baseline inventory; all were fixed within the same 31-file scope.

History audit (serial/this-escape)

Audited for the campaign cleanup: this branch contains NO serial or this-escape
fixes (no serialVersionUID, transient or serial/this-escape suppressions
anywhere in its 6 commits) — nothing to remove; history unchanged, head
541e17d.

Draft — part of the warning-cleanup stack on weigl/cleanwarnings
(→ PR #4001). No logic, signature or behavior changes.

Commits carry Co-Authored-By: OpenCode (KIT Medium).

Linear-stack head: 729925645e (re-based on the rebuilt #4004).

@wadoon
wadoon changed the base branch from weigl/cleanwarnings to weigl/cw-unchecked-rawtypes October 24, 2026 22:26
@wadoon
wadoon added this pull request to stack #4010 October 24, 2026 22:26
@wadoon
wadoon force-pushed the weigl/cw-unchecked-rawtypes branch from 12b48da to 9ac3cb2 Compare October 24, 2026 22:31
@wadoon
wadoon removed this pull request from stack #4010 October 24, 2026 22:40
@wadoon
wadoon added this pull request to stack #4014 October 24, 2026 23:13
Suppress deprecated APIs where they are bound to external library
contracts (URL/URLStreamHandler constructors, recoder's
getMembers()/getParamTypes() returning ImmutableArray); no behavior
changes.

Co-Authored-By: OpenCode (KIT Medium)
ImmutableArray is baked into the public term API (TermImpl, TermFactory,
recoder); migration is not local, so annotate the bound methods and
classes.

Co-Authored-By: OpenCode (KIT Medium)
…core.matcher

ImmutableArray is part of the public instantiation/cache APIs; the
AssumesFormulaInstantiationCache union array requires a raw Pair array
(generic array creation is not possible).

Co-Authored-By: OpenCode (KIT Medium)
…e.testgen

Migrate the genuinely local sites (ImmutableArray->ImmutableList in
BasicBlockExecutionSnippet, raw Assignment->Assignment<?> in
BasicSymbolicExecutionSnippet); suppress settings overrides the Settings
interface still requires.

Co-Authored-By: OpenCode (KIT Medium)
ImmutableArray dominates the term/label APIs (JTerm, TermBuilder,
TermLabelManager, JavaInfo, SVInstantiations); all occurrences are bound
to deprecated library contracts, so they are suppressed at the narrowest
scope with explanatory comments. Unchecked casts in SVInstantiations are
inherent to the map-backed instantiation store.

Co-Authored-By: OpenCode (KIT Medium)
GeneralFailureEvent stays in use to preserve UI notification behavior;
the Properties-based readSettings/writeSettings overloads remain because
the Settings interface requires them.

Co-Authored-By: OpenCode (KIT Medium)
@wadoon
wadoon force-pushed the weigl/cw-unchecked-rawtypes branch from 9ac3cb2 to 5c28dc3 Compare October 25, 2026 00:57
@wadoon
wadoon force-pushed the weigl/cw-deprecation-main branch from 541e17d to 7299256 Compare October 25, 2026 00:57
@wadoon wadoon closed this Oct 25, 2026
@wadoon
wadoon deleted the weigl/cw-deprecation-main branch October 25, 2026 02:33
@wadoon
wadoon removed this pull request from stack #4014 October 26, 2026 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant