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

Update to EISOP 3.39-eisop1 from 3.34-eisop1 #96

Merged
merged 8 commits into from
Apr 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/main/java/universe/UniverseInferenceVisitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,10 @@ private boolean isCompatibleCastInInfer(
// comparable,
// but to infer more program, let this case fall back to "anycast" silently and continue
// inference.
return qualHierarchy.isSubtype(castCSSlot.getValue(), exprCSSlot.getValue())
|| qualHierarchy.isSubtype(exprCSSlot.getValue(), castCSSlot.getValue());
return qualHierarchy.isSubtypeQualifiersOnly(
castCSSlot.getValue(), exprCSSlot.getValue())
|| qualHierarchy.isSubtypeQualifiersOnly(
exprCSSlot.getValue(), castCSSlot.getValue());
} else {
// But if there is at least on Slot, inference guarantees that solutions don't include
// incomparable casts.
Expand Down Expand Up @@ -382,5 +384,5 @@ public boolean validateType(Tree tree, AnnotatedTypeMirror type) {

@Override
// Universe Type System does not need to check extends and implements
protected void checkExtendsImplements(ClassTree classTree) {}
protected void checkExtendsAndImplements(ClassTree classTree) {}
}
2 changes: 1 addition & 1 deletion src/main/java/universe/UniverseVisitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -326,5 +326,5 @@ public boolean validateType(Tree tree, AnnotatedTypeMirror type) {

@Override
// Universe Type System does not need to check extends and implements
protected void checkExtendsImplements(ClassTree classTree) {}
protected void checkExtendsAndImplements(ClassTree classTree) {}
}
2 changes: 0 additions & 2 deletions src/main/java/universe/qual/Bottom.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import org.checkerframework.framework.qual.LiteralKind;
import org.checkerframework.framework.qual.QualifierForLiterals;
import org.checkerframework.framework.qual.SubtypeOf;
import org.checkerframework.framework.qual.TargetLocations;
import org.checkerframework.framework.qual.TypeKind;
import org.checkerframework.framework.qual.TypeUseLocation;

Expand All @@ -22,7 +21,6 @@
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE_PARAMETER, ElementType.TYPE_USE})
@TargetLocations({TypeUseLocation.EXPLICIT_LOWER_BOUND})
@SubtypeOf({Self.class, Rep.class})
@QualifierForLiterals({LiteralKind.ALL})
@DefaultFor(
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/universe/qual/Lost.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package universe.qual;

import org.checkerframework.framework.qual.SubtypeOf;
import org.checkerframework.framework.qual.TargetLocations;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
Expand All @@ -19,5 +18,4 @@
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE_PARAMETER, ElementType.TYPE_USE})
@SubtypeOf({Any.class})
@TargetLocations({})
public @interface Lost {}
6 changes: 3 additions & 3 deletions src/test/java/inference/UniverseInferenceTest.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package universe;

import org.checkerframework.framework.test.TestUtilities;
import org.checkerframework.javacutil.Pair;
import org.junit.runners.Parameterized.Parameters;
import org.plumelib.util.IPair;

import java.io.File;
import java.util.ArrayList;
Expand All @@ -27,8 +27,8 @@ public UniverseInferenceTest(File testFile) {
}

@Override
public Pair<String, List<String>> getSolverNameAndOptions() {
return Pair.of(
public IPair<String, List<String>> getSolverNameAndOptions() {
return IPair.of(
UniverseSolverEngine.class.getCanonicalName(),
new ArrayList<String>(Arrays.asList("useGraph=false", "collectStatistic=true")));
}
Expand Down
Loading