Skip to content

Universe Type Rules - #4047

Draft
PiIsRational wants to merge 9 commits into
KeYProject:mainfrom
PiIsRational:universe-types
Draft

PiIsRational wants to merge 9 commits into
KeYProject:mainfrom
PiIsRational:universe-types

Conversation

@PiIsRational

@PiIsRational PiIsRational commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Intended Change

This PR intends to add support for taclets that make use of an extended version of the Universe Type System. The basic Idea behind the type rules is to make use of the Java Annotations of a program that is accepted by the Universe Type Checker to simplify heap reasoning for hierarchical data structures.

The following constructions are used to track the ownership relation:

  • owner(Object) -> Object: maps every object to its unique owner.
  • dominates(Object, Object): the transitive version of the owner function. Because the type system is ownership based, ownership loops are not possible, so an object cannot dominate itself.
  • createdRepfp(Heap, Object) -> locset: creates a location set of all locations, that are dominated by the current object and part of the current object and created in the heap.
  • undom(Object, Object): neither object dominates the other. Due to the guarantees of the type system, it is guaranteed that neither object can access the other. This especially means that the two createdRepfps are disjoint.

Plan

  • Add Examples
  • Add tests cases
  • Document the changes

Type of pull request

  • New feature (non-breaking change which adds functionality)
  • There are changes to the (Java) code
  • There are changes to the taclet rule base

Ensuring quality

  • I made sure that introduced/changed code is well documented (javadoc and inline comments).
  • (I made sure that new/changed end-user features are well documented (https://github.com/KeYProject/key-docs).)
  • (I added new test case(s) for new functionality.)
  • I have tested the feature as follows:
    • I used it to prove example datastructures
    • I used it to check a few examples

Additional information and contact(s)

@WolframPfeifer is involved in this pull request.

The contributions within this pull request are licensed under GPLv2, or (at your option) any later version, for inclusion in KeY.

PiIsRational and others added 9 commits October 29, 2026 18:42
230f842 # add the ownership rules
6a195dd # added the new rules
415f9db # extend the javac extension
f37d143 # change the way the universe rules are treated
c337d49 # update to add the latest changes
82f0bcc # do some bugfixes in the recoder parsers
912cc8c # the last changes
94763f1 # update the match conditions
19f98e9 # add support for args and results in contracts
0d932a9 # some changes
a82c2c2 # the new rule files
2f35dcf # add the proofs
85a0e6d # update the rules
902c17c # remove unneeded assertion
3f0dea8 # remove logs in the default lemma generator
29dabd9 # all the universe lemmas have a corresponding runnable proof
ac9124d # remove factorypaths
88187a0 # add support for dom references
16e29d2 # update the heuristics
519a11c # update the heap simplification macro with universe rules
2cb864d # apply spotless
eae3d25 # refactoring
86d605e # a first try with the new parser
23d12f4 # a minor change
67995b6 # tried to get types to wor
8bc0407 # add annotations to type references
bbd5a1b # try to get Annotation Declarations to properly load
8a1112a # the Annotation Declarations now get loaded correctly
3c8bff8 # a first somewhat functional state
85fd964 # formatting
a1f56a6 # a few changes:
90c2968 # some small changes
26ca483 # remove special case, as it is already coeverd by the base case
26cf894 # remove incorrect proof rules
74e547e # completed the addAnnotation variable condition
76c00be # create the RemoveAnnotation varcond
1cc43d5 # fix a testcase
7b1e680 # formatting
6104e0a # have clean variable conditions
d3bf37c # reduced the various lemmas
228a069 # deactivated the universe rules
34da918 # remove universe rules
34a15df # remove automatic proofs
c2a059f # run spotless
6cd0ba1 # add back proof files
32a9fa5 # the conract adder works!
cf12853 # make the annotation interface member be a real member declaration
04eaa6b # move to ImmutableList
7efd1f4 # fix the lemma proofs
87ff5cd # remove unused axiom from the rules
6e737e4 # cleanup
c5a911e # move the annotation-declaration test and some cleanup
f9c48b7 # remove the limiting
374eca3 # fix the proofs of the universe rules
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.

2 participants