Interface ILsaMolecule

  • All Implemented Interfaces:
    it.unibo.alchemist.model.Dependency , it.unibo.alchemist.model.Molecule , java.io.Serializable , java.lang.Comparable , java.lang.Iterable

    
    public interface ILsaMolecule
     implements Molecule, Iterable<T>, Comparable<T>
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • argsNumber

         abstract int argsNumber()
        Returns:

        the arguments number of the LSA structure.

      • equals

         abstract boolean equals(Object mol)
        Parameters:
        mol - the ILsaMolecule to compare.
        Returns:

        true if the molecule arguments match with mol arguments.

      • getArg

         abstract IExpression getArg(int i)
        Parameters:
        i - : position of the argument to get
        Returns:

        the Expression represent the argument i.

      • hasDuplicateVariables

         abstract boolean hasDuplicateVariables()
        Returns:

        true if this variable makes use of variables defined within the molecule itself

      • isIdenticalTo

         abstract boolean isIdenticalTo(ILsaMolecule mol)
        Parameters:
        mol - the molecule to compare to
        Returns:

        true if lsaMolecule is identical to mol, namely that all the arguments are equal

      • isIstance

         abstract boolean isIstance()
        Returns:

        true if the molecule is an instance (not variable in the argouments).

      • matches

         abstract boolean matches(ILsaMolecule mol)
        Parameters:
        mol - the LsaMolecule to try to match with.
        Returns:

        true if the two molecules match

      • matches

         abstract boolean matches(List<out IExpression> mol, boolean duplicateVariables)
        Parameters:
        mol - the LsaMolecule to try to match with
        duplicateVariables - if true, the matching of variables reused within the same tuple is enabled
        Returns:

        true if the two molecules match

      • moreGenericOf

         abstract boolean moreGenericOf(ILsaMolecule mol)
        Parameters:
        mol - the molecule to compare to
        Returns:

        true if the molecule is more generic than the one passed

      • size

         abstract int size()
        Returns:

        the number of arguments

      • toHashString

         abstract HashString toHashString()
        Returns:

        the string representing the molecule, in a faster implementation.

      • toString

         abstract String toString()
        Returns:

        the string representing the molecule.