RISC JKU

at.jku.risc.stout.urau.algo

Class Substitution

  • All Implemented Interfaces:
    Cloneable


    public class Substitution
    extends Object
    implements Cloneable
    This class represents a substitution, which is a mapping from variables to terms.
    It is used inside the rule based system AntiUnifySystem to compute generalizations for given AntiUnifyProblems. In this case, the left hand side of the mapping is the generalization variable of an anti-unification problem (AUP) and the right hand side is the generalization computed so far.
    Author:
    Alexander Baumgartner
    • Field Detail

      • RAN_PRINT_SEPARATOR

        public static String RAN_PRINT_SEPARATOR
        Default = "; "
      • SIGMA_END

        public static String SIGMA_END
        Default = "} "
      • SIGMA_MAPTO

        public static String SIGMA_MAPTO
        Default = " -> "
      • SIGMA_START

        public static String SIGMA_START
        Default = "{"
    • Constructor Detail

      • Substitution

        public Substitution()
    • Method Detail

      • clear

        public void clear()
        Removes all the mappings from a substitution.
      • composeInRange

        public void composeInRange(Variable fromVar,
                          TermNode toTerm)
        Substitution composition which does not add new variables to the mapping. (This is useful for generalization computation of AUPs.)
      • put

        public void put(Variable fromVar,
               TermNode toTerm)
        Add a new mapping of the form: Variable -> Term
      • toRanString

        public String toRanString()
        Only prints the range of the mapping, which is actually useful to display a computed generalization of an AUP without the generalization variable (which presents the most general generalization).