Skip to content

Commit

Permalink
UNknown<S, A>
Browse files Browse the repository at this point in the history
  • Loading branch information
leventeBajczi committed Feb 15, 2024
1 parent cdeaed3 commit 017cad8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ public static Unsafe<State, Action> unsafe() {
return new Unsafe<>();
}

public static Unknown unknown() {
return new Unknown();
public static <S extends State, A extends Action> Unknown<S, A> unknown() {
return new Unknown<>();
}

public abstract boolean isSafe();
Expand Down Expand Up @@ -195,7 +195,7 @@ public String toString() {
}
}

public static final class Unknown extends SafetyResult<State, Action> {
public static final class Unknown<S extends State, A extends Action> extends SafetyResult<S, A> {
@Override
public boolean isSafe() {
return false;
Expand All @@ -207,12 +207,12 @@ public boolean isUnsafe() {
}

@Override
public Safe<State, Action> asSafe() {
public Safe<S, A> asSafe() {
return null;
}

@Override
public Unsafe<State, Action> asUnsafe() {
public Unsafe<S, A> asUnsafe() {
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class BoundedChecker<S : ExprState, A : StmtAction> @JvmOverloads constructor(
lastIterLookup = lastIterLookup.copy(second = iteration)
}
}
return SafetyResult.unknown() as SafetyResult<S, A>
return SafetyResult.unknown()
}

private fun bmc(): SafetyResult<S, A>? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fun getChecker(xcfa: XCFA, mcm: MCM, config: XcfaConfig<*, *>, parseContext: Par
Backend.BOUNDED -> getBoundedChecker(xcfa, mcm, config, logger)
Backend.LAZY -> TODO()
Backend.PORTFOLIO -> getPortfolioChecker(xcfa, mcm, config, parseContext, logger, uniqueLogger)
Backend.NONE -> SafetyChecker<XcfaState<*>, XcfaAction, XcfaPrec<*>> { _ -> SafetyResult.unknown() as SafetyResult<XcfaState<*>, XcfaAction> }
Backend.NONE -> SafetyChecker<XcfaState<*>, XcfaAction, XcfaPrec<*>> { _ -> SafetyResult.unknown() }
}
}

0 comments on commit 017cad8

Please sign in to comment.