Class ActorProductLatticeConstraintsDefinitionAdapter


  • public class ActorProductLatticeConstraintsDefinitionAdapter
    extends ActorConstraintsDefinitionAdapter
    A class that creates a product lattice-based ontology adapter from a model-based actor constraints definition attribute.
    Since:
    Ptolemy II 10.0
    Version:
    $Id$
    Author:
    Charles Shelton
    See Also:
    ActorConstraintsDefinitionAttribute
    Pt.AcceptedRating:
    Red (cshelton)
    Pt.ProposedRating:
    Green (cshelton)
    • Field Detail

      • INHERIT

        public static final java.lang.String INHERIT
        String representing that the actor port or attribute should inherit its constraints from the tuple ontology solvers for the product lattice ontology solver.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ActorProductLatticeConstraintsDefinitionAdapter

        public ActorProductLatticeConstraintsDefinitionAdapter​(ProductLatticeOntologySolver solver,
                                                               ComponentEntity component,
                                                               java.util.List<StringParameter> constraintExpressions)
                                                        throws IllegalActionException
        Construct the lattice ontology adapter for the given component and property lattice.
        Parameters:
        solver - The specified lattice-based ontology solver.
        component - The given component.
        constraintExpressions - The list of constraint expressions for each port or component in the actor.
        Throws:
        IllegalActionException - Thrown if the adapter cannot be initialized.
    • Method Detail

      • areActorElementConstraintsInherited

        public static boolean areActorElementConstraintsInherited​(StringParameter actorElementConstraintExpression)
                                                           throws IllegalActionException
        Return true if the actor element is set to inherit its constraints from the tuple ontologies that comprise the product lattice ontology, false otherwise.
        Parameters:
        actorElementConstraintExpression - The constraint expression for the actor element.
        Returns:
        true if the actor element is set to inherit its constraints from the tuple ontologies that comprise the product lattice ontology, false otherwise.
        Throws:
        IllegalActionException - If the constrain expression parameter is null.
      • constraintList

        public java.util.List<Inequality> constraintList()
                                                  throws IllegalActionException
        Return the constraints of this component. The constraints are generated from the expressions passed in from an ActorConstraintsDefinitionAttribute that allows the user to define actor constraints in the OntologySolver model.
        Overrides:
        constraintList in class ActorConstraintsDefinitionAdapter
        Returns:
        The list of constraints for this component.
        Throws:
        IllegalActionException - If there is a problem parsing the constraint expression strings to create the actor constraints.