|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jif.types.AbstractSolver jif.types.SolverGLB
public class SolverGLB
A solver of Jif constraints. Finds solution to constraints essentially by propogating lower bounds forwards.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class jif.types.AbstractSolver |
---|
AbstractSolver.EquationQueue, AbstractSolver.Frame |
Field Summary |
---|
Fields inherited from class jif.types.AbstractSolver |
---|
bounds, compiler, constraint_counter, currentSCC, equations, fixedValueVars, Q, scc, solverCounter, staticFailedConstraints, status, STATUS_NO_SOLUTION, STATUS_NOT_SOLVED, STATUS_SOLVED, STATUS_SOLVING, THROW_STATIC_FAILED_CONSTRAINTS, topics, traces, ts, useSCC |
Constructor Summary | |
---|---|
|
SolverGLB(JifTypeSystem ts,
polyglot.frontend.Compiler compiler,
java.lang.String solverName)
Constructor |
protected |
SolverGLB(SolverGLB js)
Constructor |
Method Summary | |
---|---|
protected void |
addDependencies(Equation eqn)
This method adds the correct dependencies from Equation eqn to varaiables occuring in eqn, and dependencies in the other direction (that is, from variables occuring in eqn to eqn). |
protected boolean |
allActivesAreMultiVarRHS()
return true if every active constraint has multi vars on the RHS. |
protected void |
checkEquation(LabelEquation eqn)
Check that the equation eqn is satisfied. |
protected void |
checkEquation(PrincipalEquation eqn)
Check that the equation eqn is satisfied. |
protected Equation |
findContradictiveEqn(LabelConstraint c)
Find a contradicting equation. |
protected ConfPolicy |
findNeeded(ConfPolicy lhs,
ConfPolicy rhs,
LabelEnv env)
|
protected IntegPolicy |
findNeeded(IntegPolicy lhs,
IntegPolicy rhs,
LabelEnv env)
|
protected Label |
findNeeded(Label lhs,
Label rhs,
LabelEnv env)
Return the most permissive label L such that lhs <= rhs join L |
protected Label |
getDefaultLabelBound()
The default bound of label variables in this solver is bottom |
protected Principal |
getDefaultPrincipalBound()
The default bound of label variables in this solver is bottom |
protected void |
refineVariableEquation(VarLabel v,
LabelEquation eqn)
Raise the bound on the label variable v, which is a component of the RHS of the equation eqn. |
protected void |
refineVariableEquation(VarPrincipal v,
PrincipalEquation eqn)
Raise the bound on the label variable v, which is a component of the equation eqn. |
protected boolean |
search(Equation eqn)
Search recursively for solution to system of constraints. |
protected void |
solve_eqn(LabelEquation eqn)
This method changes the bounds of variables in the RHS of Equation eqn, to make the equation satisfied. |
protected void |
solve_eqn(PrincipalEquation eqn)
This method changes the bounds of variables in the Equation eqn, to make the equation satisfied. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SolverGLB(JifTypeSystem ts, polyglot.frontend.Compiler compiler, java.lang.String solverName)
protected SolverGLB(SolverGLB js)
Method Detail |
---|
protected void addDependencies(Equation eqn)
addDependencies
in class AbstractSolver
protected Label getDefaultLabelBound()
getDefaultLabelBound
in class AbstractSolver
protected Principal getDefaultPrincipalBound()
getDefaultPrincipalBound
in class AbstractSolver
protected void solve_eqn(LabelEquation eqn) throws polyglot.types.SemanticException
solve_eqn
in class AbstractSolver
polyglot.types.SemanticException
protected void solve_eqn(PrincipalEquation eqn) throws polyglot.types.SemanticException
AbstractSolver
solve_eqn
in class AbstractSolver
polyglot.types.SemanticException
protected boolean allActivesAreMultiVarRHS()
protected void refineVariableEquation(VarLabel v, LabelEquation eqn) throws polyglot.types.SemanticException
polyglot.types.SemanticException
protected void refineVariableEquation(VarPrincipal v, PrincipalEquation eqn) throws polyglot.types.SemanticException
polyglot.types.SemanticException
protected Label findNeeded(Label lhs, Label rhs, LabelEnv env)
protected ConfPolicy findNeeded(ConfPolicy lhs, ConfPolicy rhs, LabelEnv env)
protected IntegPolicy findNeeded(IntegPolicy lhs, IntegPolicy rhs, LabelEnv env)
protected boolean search(Equation eqn)
protected void checkEquation(LabelEquation eqn) throws polyglot.types.SemanticException
polyglot.types.SemanticException
- if eqn is not satisfied.
polyglot.util.InternalCompilerError
- if eqn contains variablesprotected void checkEquation(PrincipalEquation eqn) throws polyglot.types.SemanticException
polyglot.types.SemanticException
- if eqn is not satisfied.
polyglot.util.InternalCompilerError
- if eqn contains variablesprotected Equation findContradictiveEqn(LabelConstraint c)
findContradictiveEqn
in class AbstractSolver
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |