|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjif.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 VarLabels
.
A LabelConstraint
is not the same as a LabelConstraint
, which by contrast is assumed to be satisfied.
Nested Class Summary | |
---|---|
static class |
LabelConstraint.Kind
Kinds of constraint, either equality or inequality. |
Field Summary | |
---|---|
static LabelConstraint.Kind |
EQUAL
An equality kind of constraint. |
static LabelConstraint.Kind |
LEQ
An inequality kind of constraint. |
Constructor Summary | |
---|---|
LabelConstraint(NamedLabel lhs,
LabelConstraint.Kind kind,
NamedLabel rhs,
LabelEnv env,
polyglot.util.Position pos)
|
|
LabelConstraint(NamedLabel lhs,
LabelConstraint.Kind kind,
NamedLabel rhs,
LabelEnv env,
polyglot.util.Position pos,
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.lang.String |
detailMsg()
A detailed message to display if this constraint is violated. |
LabelEnv |
env()
|
java.util.Collection |
getEquations()
Produce a Collection of Equations for this
constraint. |
LabelConstraint.Kind |
kind()
|
Label |
lhs()
|
java.lang.String |
msg()
A message to display if this constraint is violated. |
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()
|
PrincipalHierarchy |
ph()
|
polyglot.util.Position |
position()
|
boolean |
report()
|
Label |
rhs()
|
java.lang.String |
technicalMsg()
A technical message to display if this constraint is violated. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final LabelConstraint.Kind EQUAL
public static final LabelConstraint.Kind LEQ
Constructor Detail |
---|
public LabelConstraint(NamedLabel lhs, LabelConstraint.Kind kind, NamedLabel rhs, LabelEnv env, polyglot.util.Position pos)
public LabelConstraint(NamedLabel lhs, LabelConstraint.Kind kind, NamedLabel rhs, LabelEnv env, polyglot.util.Position pos, boolean report)
Method Detail |
---|
public Label lhs()
public LabelConstraint.Kind kind()
public Label rhs()
public NamedLabel namedLhs()
public NamedLabel namedRhs()
public LabelEnv env()
public PrincipalHierarchy ph()
public polyglot.util.Position position()
public boolean report()
public java.lang.String msg()
NamedLabel
s.
public java.lang.String detailMsg()
NamedLabel
s are used.
public java.lang.String technicalMsg()
NamedLabel
s are used.
public java.lang.String toString()
toString
in class java.lang.Object
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.
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
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |