jif.types
Interface Solver

All Known Implementing Classes:
AbstractSolver, SolverGLB

public interface Solver

A solver of Jif constraints.


Method Summary
 void addConstraint(Constraint c)
          Add the constraint c to the system
 Label applyBoundsTo(Label L)
          Substitute variables in L with the solution for the variables.
 VarMap solve()
          Solve the system of constraints.
 

Method Detail

addConstraint

void addConstraint(Constraint c)
                   throws polyglot.types.SemanticException
Add the constraint c to the system

Throws:
polyglot.types.SemanticException

solve

VarMap solve()
             throws polyglot.types.SemanticException
Solve the system of constraints.

Throws:
polyglot.types.SemanticException - if the Solver cannot find a solution to the system of contraints.

applyBoundsTo

Label applyBoundsTo(Label L)
Substitute variables in L with the solution for the variables. Should only be called after solve() has been called successfully.

Parameters:
L -
Returns:
L with variables replaced appropriately according to the solution.