at.jku.risc.stout.nau.data.atom
public class FunctionSymbol extends Object implements HasSort<SortData>
Constructor and Description |
---|
FunctionSymbol(String name)
Instantiates a function symbol of the specified name.
|
Modifier and Type | Method and Description |
---|---|
int |
getArity()
Returns the arity which has been set by the user or could be inferred by
the type system.
|
String |
getName() |
SortData |
getSort() |
Sort[] |
getSortArgs() |
boolean |
isArityUnknown()
Returns true if the arity has not been set and could not be inferred so
far.
|
void |
setArity(int arity)
Sets the arity and checks whether it is consistent with the defined sorts
of the arguments.
|
void |
setSort(SortData sortRet) |
void |
setSortArgs(Sort[] sortArgs)
Defines the sorts of the arguments and checks whether it is consistent
with the defined arity.
|
String |
toString() |
public FunctionSymbol(String name)
NodeFactory
to create new FunctionSymbol
s! The use of
NodeFactory
guarantees the uniqueness of equal
FunctionSymbol
s. This uniqueness enables very fast equality
testing, hash-code generation, comparison of symbols,... and it keeps the
memory overhead as small as possible.public int getArity()
public String getName()
public Sort[] getSortArgs()
public boolean isArityUnknown()
public void setArity(int arity) throws MalformedSortException
MalformedSortException
public void setSortArgs(Sort[] sortArgs) throws MalformedSortException
MalformedSortException