RISC JKU

at.jku.risc.stout.nau.data.atom

Class FunctionSymbol

  • All Implemented Interfaces:
    HasSort<SortData>


    public class FunctionSymbol
    extends Object
    implements HasSort<SortData>
    A FunctionSymbol has a unique name and may be typed by a sort of data. The arity and the sorts of its arguments can be specified explicitly. If the arity is unknown, then the value is set to -1 (see isArityUnknown()).
    Author:
    Alexander Baumgartner
    • Constructor Detail

      • FunctionSymbol

        public FunctionSymbol(String name)
        Instantiates a function symbol of the specified name. Use the NodeFactory to create new FunctionSymbols! The use of NodeFactory guarantees the uniqueness of equal FunctionSymbols. This uniqueness enables very fast equality testing, hash-code generation, comparison of symbols,... and it keeps the memory overhead as small as possible.
    • Method Detail

      • getArity

        public int getArity()
        Returns the arity which has been set by the user or could be inferred by the type system.
      • getName

        public String getName()
      • getSortArgs

        public Sort[] getSortArgs()
      • isArityUnknown

        public boolean isArityUnknown()
        Returns true if the arity has not been set and could not be inferred so far.