Package arrow.meta.plugins.analysis.phases.analysis.solver.check.model

Types

Link copied to clipboard
typealias Branch = List<BooleanFormula>
Link copied to clipboard
data class CheckData(    val context: ResolutionContext,     val returnPoints: ReturnPoints,     val varInfo: CurrentVarInfo,     val branch: CurrentBranch)
Link copied to clipboard
sealed class Condition

Data type used to handle if and when without subject uniformly.

Link copied to clipboard
data class ControlFlowFn(    val target: Expression?,     val body: Expression,     val argumentName: String,     val returnBehavior: ControlFlowFn.ReturnBehavior)

Describes the characteristics of a call to special control flow functions namely also, apply, let, run, with https://kotlinlang.org/docs/scope-functions.html#function-selection

Link copied to clipboard
class CurrentBranch(branches: List<BooleanFormula>)
Link copied to clipboard
data class CurrentVarInfo(varInfo: List<VarInfo>)
Link copied to clipboard
data class ExplicitBlockReturn(val returnPoint: String?) : ExplicitReturn

Explicit 'return', maybe with a name

Link copied to clipboard
data class ExplicitLoopReturn(val returnPoint: String?) : ExplicitReturn

'break' or 'continue' inside a loop

Link copied to clipboard
interface ExplicitReturn : Return

This encompasses all possible was to exit a block: 'return', 'break', 'continue'

Link copied to clipboard
data class ExplicitThrowReturn(val exceptionType: Type?) : ExplicitReturn

'throw'

Link copied to clipboard
enum LoopPlace : Enum<LoopPlace>
Link copied to clipboard
class MissingElseBlockExpression(val whole: Expression, val thenExpression: Expression) : BlockExpression
Link copied to clipboard
object NoReturn : Return

The block exited via its last statement, or has not exited yet

Link copied to clipboard
interface Return

Ways to return from a block

Link copied to clipboard
data class ReturnPoints(val topMostReturnPointVariableName: Pair<String?, ObjectFormula>, val namedReturnPointVariableNames: Map<String, ObjectFormula>)

Maps return points to the SMT variables representing that place.

Link copied to clipboard
class SimpleCondition(    val predicate: Expression?,     val isElse: Boolean,     val body: Expression,     val whole: Element) : Condition
Link copied to clipboard
data class StateAfter(val returnInfo: Return, val data: CheckData)

Describes the state of the analysis after a check:

Link copied to clipboard
class SubjectCondition(    val check: WhenCondition?,     val isElse: Boolean,     val body: Expression,     val whole: Element) : Condition
Link copied to clipboard
data class VarInfo

For each variable, we keep two pieces of data:

Functions

Link copied to clipboard
fun CheckData.noReturn(): StateAfter

fun CheckData.noReturn(f: () -> Unit): ContSeq<StateAfter>

Execute some operation but keep the overall state the same