RISC JKU

at.jku.risc.stout.urauc.algo

Class AntiUnifyProblem

  • All Implemented Interfaces:
    Equation, Cloneable


    public class AntiUnifyProblem
    extends Object
    implements Equation, Cloneable
    This class represents an anti-unification problem (AUP) which consists of one generalization variable (the most general generalization), and two Hedges. The hedges represent the left hand side and the right hand side of the equation.
    Author:
    Alexander Baumgartner
    • Field Detail

      • PRINT_EQ_SEPARATOR

        public static String PRINT_EQ_SEPARATOR
      • PRINT_SYS_SEPARATOR

        public static String PRINT_SYS_SEPARATOR
      • PRINT_VAR_SEPARATOR

        public static String PRINT_VAR_SEPARATOR
    • Constructor Detail

      • AntiUnifyProblem

        public AntiUnifyProblem()
        Obtain an empty AUP with fresh generalization variables.
      • AntiUnifyProblem

        public AntiUnifyProblem(Hedge left,
                        Hedge right,
                        Alignment alignment)
        Create an AUP with fresh generalization variables and the given hedges.
    • Method Detail

      • createMostGeneral

        public Hedge createMostGeneral()
      • getAlignment

        public Alignment getAlignment()
      • getHorizontalVarX

        public HedgeVar getHorizontalVarX()
        Returns the hedge generalization variable, which is used for horizontal abstraction. (It also represents the most general generalization of this AUP.)
      • getLeft

        public Hedge getLeft()
        Returns the left hedge of this AUP.
        Specified by:
        getLeft in interface Equation
      • getRight

        public Hedge getRight()
        Returns the right hedge of this AUP.
        Specified by:
        getRight in interface Equation
      • getVerticalVarC

        public ContextVar getVerticalVarC()
        Returns the context generalization variable, which is used for vertical abstraction.
      • init

        public void init()
        Description copied from interface: Equation
        This method is called automatically by the input parser after a new equation has been created. Override this method to implement an initialization for every newly generated equation.
        Specified by:
        init in interface Equation
      • initPositionIndexHorizontalPartX

        public void initPositionIndexHorizontalPartX(int[] holeParentIndexLeft,
                                            int[] holeParentIndexRight)
        Initialize the position indexes of the hedge (horizontal sequence getHorizontalPartX()) with the given hole position of the context (getVerticalPartC()). The child-position of the first element of the horizontal sequence is 0.
      • initPositionIndexVerticalPartC

        public void initPositionIndexVerticalPartC()
        Initialize the position indexes of the context (vertical sequence getVerticalPartC()). The child-position of the first element of the horizontal sequence is 0.
      • makeAssociative

        public void makeAssociative(Set<TermAtom> associativeSymbols)
        Make some symbols and/or the root hedge commutative.
      • makeCommutativ

        public void makeCommutativ(Set<TermAtom> commutativeSymbols,
                          boolean commutativeRootHedge)
        Make some symbols and/or the root hedge commutative.
      • setAlignment

        public void setAlignment(Alignment alignment)
      • setLeft

        public void setLeft(Hedge hedge)
        Set the left hedge of this AUP.
      • setRight

        public void setRight(Hedge hedge)
        Set the left hedge of this AUP.