ILsaMolecule

A molecule of the SAPERE incarnation (LSA), whose arguments are expressions.

Inheritors

Functions

Link copied to clipboard
abstract fun allocateVar(matches: Map<HashString, ITreeNode<out Any>>): List<IExpression>
Allocates the variables of this molecule using the provided bindings.
Link copied to clipboard
abstract fun argsNumber(): Int
Returns the number of arguments of this molecule.
Link copied to clipboard
abstract fun compareTo(p: T): Int
Link copied to clipboard
abstract fun equals(mol: Any): Boolean
Checks whether this molecule is equal to the provided object.
Link copied to clipboard
open fun forEach(action: Consumer<in T>)
Link copied to clipboard
abstract fun generalize(): ILsaMolecule
Generalizes this molecule by replacing its non-atomic and non-numeric values with variables.
Link copied to clipboard
abstract fun getArg(i: Int): IExpression
Returns the argument at the provided position.
Link copied to clipboard
abstract fun getName(): String
Link copied to clipboard
Checks whether this molecule reuses its own variables.
Link copied to clipboard
abstract fun isIdenticalTo(mol: ILsaMolecule): Boolean
Checks whether this molecule is identical to the provided one.
Link copied to clipboard
abstract fun isIstance(): Boolean
Checks whether this molecule is an instance, namely it has no variables in its arguments.
Link copied to clipboard
abstract fun iterator(): Iterator<T>
Link copied to clipboard
abstract fun matches(mol: ILsaMolecule): Boolean
Checks whether this molecule matches the provided one.
abstract fun matches(mol: List<out IExpression>, duplicateVariables: Boolean): Boolean
Checks whether this molecule matches the provided list of arguments.
Link copied to clipboard
abstract fun moreGenericOf(mol: ILsaMolecule): Boolean
Checks whether this molecule is more generic than the provided one.
Link copied to clipboard
abstract fun size(): Int
Returns the number of arguments of this molecule.
Link copied to clipboard
Link copied to clipboard
abstract fun toHashString(): HashString
Returns a HashString representation of this molecule.
Link copied to clipboard
abstract fun toString(): String
Returns a string representation of this molecule.