public class LabelConstraint extends Constraint
Constraint.Kind
Modifier and Type | Field and Description |
---|---|
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
|
Constructor and Description |
---|
LabelConstraint(NamedLabel lhs,
Constraint.Kind kind,
NamedLabel rhs,
LabelEnv env,
polyglot.util.Position pos,
ConstraintMessage msg,
boolean report) |
Modifier and Type | Method and Description |
---|---|
protected void |
addLEQEqns(java.util.Collection<Equation> 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<java.lang.String,java.util.List<java.lang.String>> |
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<Equation> |
getEquations()
Produce a
Collection of Equations for this
constraint. |
boolean |
hasVariables() |
Label |
lhsLabel() |
protected java.util.Map<java.lang.String,java.lang.String> |
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<java.lang.String,Label> |
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() |
detailMsg, env, isCanonical, kind, messages, msg, position, report, technicalMsg, toString
public static final Constraint.Kind EQUAL
public static final Constraint.Kind LEQ
protected NamedLabel namedLHS
protected NamedLabel namedRHS
public LabelConstraint(NamedLabel lhs, Constraint.Kind kind, NamedLabel rhs, LabelEnv env, polyglot.util.Position pos, ConstraintMessage msg, boolean report)
public Label lhsLabel()
public Label rhsLabel()
public NamedLabel namedLhs()
public NamedLabel namedRhs()
protected java.util.Map<java.lang.String,Label> namedLabels()
protected java.util.Map<java.lang.String,java.lang.String> namedDescrips()
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> definitions(VarMap bounds)
public java.util.Collection<Equation> getEquations()
Collection
of Equations
for this
constraint.getEquations
in class Constraint
protected void addLEQEqns(java.util.Collection<Equation> 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