ConstraintSolver

class ConstraintSolver<T : Throwable>

Given a set of information flow constraints, finds a label assignment to all variables that minimizes the trust assigned to each variable (if one exists).

Parameters

T

type of exceptions thrown when there are unsatisfiable constraints

Constructors

ConstraintSolver
Link copied to clipboard
fun ConstraintSolver()

Functions

addEqualToConstraint
Link copied to clipboard
fun addEqualToConstraint(lhs: AtomicLabelTerm, rhs: AtomicLabelTerm, failWith: (from: Label, to: Label) -> T)

Add the constraint lhs == rhs to the system.

addFlowsToConstraint
Link copied to clipboard
fun addFlowsToConstraint(lhs: AtomicLabelTerm, rhs: LabelTerm, failWith: (from: Label, to: Label) -> T)

Add the constraint lhs.flowsTo(rhs) to the system.

addNewVariable
Link copied to clipboard
fun addNewVariable(label: Any): LabelVariable

Create a fresh variable and add it to the system.

exportDotGraph
Link copied to clipboard
fun exportDotGraph(writer: Writer?)

Output the constraints as a DOT graph.

solve
Link copied to clipboard
fun solve(): ConstraintSolution

Find the least trust solution to the set of constraints in the system.

variableCount
Link copied to clipboard
fun variableCount(): Int

Return the number of variables in the constraint system.