|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jif.types.Constraint jif.types.LabelConstraint
public class LabelConstraint
A LabelConstraint
represents a constraint on labels, which
may either be an inequality or equality constraint.
LabelConstraint
s are generated during type checking.
LabelConstraint
s in turn produce Equations
which are what the Solver
will use to find a satisfying
assignment for Variables
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class jif.types.Constraint |
---|
Constraint.Kind |
Field Summary | |
---|---|
static Constraint.Kind |
EQUAL
An equality kind of constraint. |
static Constraint.Kind |
LEQ
An inequality kind of constraint. |
protected NamedLabel |
namedLHS
Names for the LHS |
protected NamedLabel |
namedRHS
Names for the RHS |
Fields inherited from class jif.types.Constraint |
---|
env, kind, lhs, messages, pos, report, rhs |
Constructor Summary | |
---|---|
LabelConstraint(NamedLabel lhs,
Constraint.Kind kind,
NamedLabel rhs,
LabelEnv env,
polyglot.util.Position pos,
ConstraintMessage msg,
boolean report)
|
Method Summary | |
---|---|
protected void |
addLEQEqns(java.util.Collection eqns,
Label left,
Label right)
Produce equations that require left to be less than or
equal to right , and add them to eqns . |
java.util.Map |
definitions(VarMap bounds)
Returns a Map of Strings to List[String]s which is the definitions/bounds of the NamedLabels, and the description of any components that appear in the NamedLabels. |
java.util.Collection |
getEquations()
Produce a Collection of Equations for this
constraint. |
boolean |
hasVariables()
|
Label |
lhsLabel()
|
protected java.util.Map |
namedDescrips()
Return a map from Strings to Strings, which are the descriptions of names in the left and right hand sides. |
protected java.util.Map |
namedLabels()
Return a map from Strings to Labels, which are the named elements of the left and right hand sides. |
NamedLabel |
namedLhs()
|
NamedLabel |
namedRhs()
|
Label |
rhsLabel()
|
Methods inherited from class jif.types.Constraint |
---|
detailMsg, env, isCanonical, kind, messages, msg, position, report, technicalMsg, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Constraint.Kind EQUAL
public static final Constraint.Kind LEQ
protected NamedLabel namedLHS
protected NamedLabel namedRHS
Constructor Detail |
---|
public LabelConstraint(NamedLabel lhs, Constraint.Kind kind, NamedLabel rhs, LabelEnv env, polyglot.util.Position pos, ConstraintMessage msg, boolean report)
Method Detail |
---|
public Label lhsLabel()
public Label rhsLabel()
public NamedLabel namedLhs()
public NamedLabel namedRhs()
protected java.util.Map namedLabels()
protected java.util.Map namedDescrips()
public java.util.Map definitions(VarMap bounds)
public java.util.Collection getEquations()
Collection
of Equations
for this
constraint.
getEquations
in class Constraint
protected void addLEQEqns(java.util.Collection eqns, Label left, Label right)
left
to be less than or
equal to right
, and add them to eqns
.
public boolean hasVariables()
hasVariables
in class Constraint
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |