Skip to content

Commit

Permalink
Update to EISOP 3.39-eisop1 from 3.34-eisop1 (#96)
Browse files Browse the repository at this point in the history
Co-authored-by: Haifeng Shi <[email protected]>
  • Loading branch information
Ao-senXiong and AndrewShf authored Apr 7, 2024
1 parent c04ec6c commit 9910edf
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
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

0 comments on commit 9910edf

Please sign in to comment.