Class C_pop

All Implemented Interfaces:
ICommand, ICommand.Ipop, INode, IPos.IPosable

public class C_pop extends Command implements ICommand.Ipop
Implements the pop command
  • Field Details

    • commandName

      public static final String commandName
      The command name
      See Also:
    • numeral

      protected IExpr.INumeral numeral
      The (non-negative) number of stack frames to pop
    • number

      protected int number
      The int value giving the number of stack frames to pop (set by check()), if the value is in the range of an int type
  • Constructor Details

    • C_pop

      public C_pop(IExpr.INumeral n)
      Constructs a command instance
  • Method Details

    • commandName

      public String commandName()
      The command name
      Specified by:
      commandName in interface ICommand
      Specified by:
      commandName in class Command
    • number

      public IExpr.INumeral number()
      The number of assertion set stack items to pop
      Specified by:
      number in interface ICommand.Ipop
    • parse

      public static C_pop parse(Parser p) throws IParser.ParserException
      Parses the arguments of the command, producing a new command instance
      Throws:
      IParser.ParserException
    • execute

      public IResponse execute(ISolver solver)
      Description copied from interface: ICommand
      Executes the command on the given solver; presumes that the command type-checked successfully.
      Specified by:
      execute in interface ICommand
      Parameters:
      solver - the instance of the solver to use (note that solvers have state)
      Returns:
      the result of the command
    • accept

      public <T> T accept(IVisitor<T> v) throws IVisitor.VisitorException
      Description copied from interface: INode
      The accept method corresponding to IVisitor, to be implemented in each subclass as { return v.visit(this); }
      Specified by:
      accept in interface INode
      Type Parameters:
      T - the return type desired from the visit methods
      Parameters:
      v - the visitor class
      Returns:
      the value returned by the visit method
      Throws:
      IVisitor.VisitorException