Class Throw

    • Constructor Detail

      • Throw

        public Throw​(CFG cfg,
                     CodeLocation location,
                     Expression expression)
        Builds the throw, raising expression as error, happening at the given location in the program.
        Parameters:
        cfg - the cfg that this statement belongs to
        location - the location where the expression is defined within the program
        expression - the expression to raise as error
    • Method Detail

      • stopsExecution

        public boolean stopsExecution()
        Description copied from class: Statement
        Whether or not this statement stops the execution of the containing cfg, either by throwing an error or returning a value. To distinguish error-raising halting statements and normal ones, use Statement.throwsError().
        Overrides:
        stopsExecution in class Statement
        Returns:
        true only if that condition holds
      • throwsError

        public boolean throwsError()
        Description copied from class: Statement
        Whether or not this statement throws an error, halting the normal execution of the containing cfg.
        Overrides:
        throwsError in class Statement
        Returns:
        true only if that condition holds
      • fwdUnarySemantics

        public <A extends AbstractState<A>> AnalysisState<A> fwdUnarySemantics​(InterproceduralAnalysis<A> interprocedural,
                                                                               AnalysisState<A> state,
                                                                               SymbolicExpression expr,
                                                                               StatementStore<A> expressions)
                                                                        throws SemanticException
        Description copied from class: UnaryStatement
        Computes the forward semantics of the statement, after the semantics of the sub-expression has been computed. Meta variables from the sub-expression will be forgotten after this statement returns.
        Specified by:
        fwdUnarySemantics in class UnaryStatement
        Type Parameters:
        A - the type of AbstractState
        Parameters:
        interprocedural - the interprocedural analysis of the program to analyze
        state - the state where the statement is to be evaluated
        expr - the symbolic expressions representing the computed value of the sub-expression of this expression
        expressions - the cache where analysis states of intermediate expressions are stored and that can be accessed to query for post-states of parameters expressions
        Returns:
        the AnalysisState representing the abstract result of the execution of this statement
        Throws:
        SemanticException - if something goes wrong during the computation