Class CompoundAccess

    • Constructor Detail

      • CompoundAccess

        CompoundAccess()
        Constructor for serialization.
      • CompoundAccess

        public CompoundAccess​(ConstraintSyntaxTree compoundExpression,
                              java.lang.String slotName)
        Creates a compound access node.
        Parameters:
        compoundExpression - an expression denoting a compound
        slotName - the name of the accessed slot
    • Method Detail

      • searchSlot

        private DecisionVariableDeclaration searchSlot​(Compound comp,
                                                       java.lang.String slotName)
        Searches for a slot in comp or its refined compounds.
        Parameters:
        comp - the compound to search
        slotName - the name to search
        Returns:
        the containing compound or null
      • getStaticType

        public IDatatype getStaticType()
                                throws CSTSemanticException
        Returns the static type in case that this compound access is a static access.
        Returns:
        the static type or null
        Throws:
        CSTSemanticException - in case of semantic errors
      • getCompoundExpression

        public ConstraintSyntaxTree getCompoundExpression()
        The expression denoting the compound to access.
        Returns:
        the compound expression
      • getSlotName

        public java.lang.String getSlotName()
        Returns the name of the slot.
        Returns:
        the name of the slot
      • getResolvedSlot

        public AbstractVariable getResolvedSlot()
        Returns the resolved compound slot. The result is only valid if inferDatatype() was called before this operation.
        Returns:
        the resolved slot, null if the slot cannot be resolved or inferDatatype() was not called before
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object