Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing rule for type of array #3389

Open
WolframPfeifer opened this issue Jan 26, 2024 · 1 comment
Open

Missing rule for type of array #3389

WolframPfeifer opened this issue Jan 26, 2024 · 1 comment
Labels
Calculus Completeness Feature New feature or request HacKeYthon Candidate Issue for HacKeYthon '24 🐞 Bug

Comments

@WolframPfeifer
Copy link
Member

Description

The exact dynamic type of arrays of primitive values are always known. However, KeY is missing a rule here.
There are also some real world cases, where the missing knowledge about the type on the sequent leads to unclosable goals.

For arrays of objects, it is not so easy, since there are subtypes of array types in Java. E.g., for a class A, A[] is a subtype of Object[].

However, for arrays of a final type F, we should have a rule that F[]::instance(x) = TRUE implies F[]::exactInstance(x) = TRUE.
For implementing this, we probably need an additional Varcond isFinal or similar.

Reproducible

always

Steps to reproduce

  1. Load a .key file with the following content:
    \programVariables {
        int[] x;
    }
    
    \problem {
        int[]::instance(x) = TRUE
        ->
        int[]::exactInstance(x) = TRUE
    }
    
    

This can not be closed in KeY.

@WolframPfeifer WolframPfeifer added 🐞 Bug Feature New feature or request Calculus Completeness HacKeYthon Candidate Issue for HacKeYthon '24 labels Jan 26, 2024
@WolframPfeifer WolframPfeifer moved this to Candidate issues in 2nd HacKeYthon Feb 19, 2024
@mattulbrich
Copy link
Member

As a matter of fact, I think the above problem should not close as the lhs of the implication evaluates to to true for x=null, but the rhs should not. Adding x != null to the premise would repair that. It is still not provable then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Calculus Completeness Feature New feature or request HacKeYthon Candidate Issue for HacKeYthon '24 🐞 Bug
Projects
Status: Candidate Issue
Development

No branches or pull requests

2 participants