Class Symbol


public class Symbol extends ModuleItem
A Maude symbol (operator at the kind level).
  • Method Details

    • delete

      public void delete()
      Overrides:
      delete in class ModuleItem
    • arity

      public int arity()
      Get the number of arguments.
    • domainKind

      public Kind domainKind(int argNr)
      Get the kind for the given argument.

      Parameters:
      argNr - The argument index.
    • getRangeSort

      public Sort getRangeSort()
      Get the range sort of the symbol.
    • hash

      public long hash()
      Get the hash value of the symbol.
    • equal

      public boolean equal(Symbol other)
      Check whether two symbols are the same.
    • getOpDeclarations

      public OpDeclVector getOpDeclarations()
      Get the declarations of the symbol.
    • makeTerm

      public Term makeTerm(TermVector args)
      Build a term with this symbol and the given terms as arguments.
    • getMetadata

      public String getMetadata(int index)
      Get the metadata attribute of the given declaration of this symbol.

      Parameters:
      index - Index of the operator declaration.
    • hasAttr

      public boolean hasAttr(int attr)
      Whether the symbol has the given attribute.

      Parameters:
      attr - One of the OP_* constants for operator attributes.
    • getIdentity

      public Term getIdentity()
      Get the identity element for this symbol (if any).
    • getStrategy

      public IntVector getStrategy()
      Get the reduction strategy of the symbol.
    • getFrozen

      public IntVector getFrozen()
      Get the frozen attribute of the symbol.

      Returns:
      The sequence of indices in the frozen attribute,
      where arguments are numbered from 0 instead of 1.
    • getFormat

      public StringVector getFormat()
      Get the format attribute of the symbol.

      Returns:
      The sequence of instruction words of the format
      specification, each of them a string.
    • getPrec

      public int getPrec()
      Get the syntactic precedence of the symbol.
    • getIdHooks

      public StringVectorVector getIdHooks()
      Get the id-hooks of the special operator (or an empty sequence otherwise).

      Returns:
      A sequence of string sequences representing each an id-hook of
      the operator with its name followed by its arguments.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getLineNumber

      public String getLineNumber()
      Get the line number information for this item as formatted by Maude.

      The format of the string is usually filename, line line (module)
      where the second line is the integral line number, and module is
      the module type and name where this item was originally defined. The
      filename may be an actual quoted filename or some special name
      between angle brackets.