Solver State
data class SolverState( baseDirectory: String, outputFileCreator: (String) -> Writer, val names: NameProvider = NameProvider(), val solver: Solver = Solver(names), val prover: ProverEnvironment = solver.newProverEnvironment(
SolverContext.ProverOptions.GENERATE_MODELS,
SolverContext.ProverOptions.GENERATE_UNSAT_CORE
), val callableConstraints: MutableMap<FqName, MutableList<DeclarationConstraints>> = mutableMapOf(), val solverTrace: MutableList<String> = mutableListOf(), val fieldProvider: FieldProvider = FieldProvider(solver, prover), reportedErrors: MutableSet<ReportedError> = mutableSetOf())
Content copied to clipboard
Constructors
Link copied to clipboard
fun SolverState( baseDirectory: String, outputFileCreator: (String) -> Writer, names: NameProvider = NameProvider(), solver: Solver = Solver(names), prover: ProverEnvironment = solver.newProverEnvironment(
SolverContext.ProverOptions.GENERATE_MODELS,
SolverContext.ProverOptions.GENERATE_UNSAT_CORE
), callableConstraints: MutableMap<FqName, MutableList<DeclarationConstraints>> = mutableMapOf(), solverTrace: MutableList<String> = mutableListOf(), fieldProvider: FieldProvider = FieldProvider(solver, prover), reportedErrors: MutableSet<ReportedError> = mutableSetOf())
Content copied to clipboard
Functions
Link copied to clipboard
fun addConstraint(constraint: NamedConstraint, context: ResolutionContext)
Content copied to clipboard
Link copied to clipboard
fun field(field: DeclarationDescriptor, formula: ObjectFormula): ObjectFormula
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun newName( context: ResolutionContext, prefix: String, element: Element?): String
Content copied to clipboard
fun newName( context: ResolutionContext, prefix: String, element: Element?, reference: Pair<ValueParameterDescriptor, ResolvedValueArgument>?): String
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Properties
Link copied to clipboard
val callableConstraints: MutableMap<FqName, MutableList<DeclarationConstraints>>
Content copied to clipboard
Extensions
Link copied to clipboard
fun SolverState.checkDeclarationConstraints( context: ResolutionContext, declaration: Declaration, descriptor: DeclarationDescriptor)
Content copied to clipboard
When the solver is in the prover state check this declaration body constraints
Link copied to clipboard
fun SolverState.collectConstraintsFromAnnotations( localDeclarations: List<DeclarationDescriptor>, module: ModuleDescriptor, bindingTrace: ResolutionContext): Pair<AnalysisResult, Set<FqName>>
Content copied to clipboard
Collects constraints by harvesting annotations. There are two sources: local declarations, and the entire CLASSPATH.
Link copied to clipboard
fun SolverState.findDescriptorFromLocalLaw(descriptor: DeclarationDescriptor, bindingContext: ResolutionContext): DeclarationDescriptor?
Content copied to clipboard
Finds the target of a particular law by looking at its last return, if marked with a arrow.analysis.Law annotation.
Link copied to clipboard
fun SolverState.getConstraintsFor(resolvedCall: ResolvedCall): DeclarationConstraints?
Content copied to clipboard
Looks up in the solver state previously collected constraints and returns the constraints associated to this resolvedCall resulting descriptor if any
fun SolverState.getConstraintsFor(descriptor: DeclarationDescriptor): DeclarationConstraints?
Content copied to clipboard
Looks up in the solver state previously collected constraints and returns the constraints associated to this descriptor, or any of the declaration it has overridden, if any