org.deri.iris.basics
Class Rule

java.lang.Object
  extended by org.deri.iris.basics.Rule
All Implemented Interfaces:
IRule

public class Rule
extends Object
implements IRule

Represents a datalog rule.

$Id$

Version:
$Revision$
Author:
Richard P??ttler (richard dot poettler at deri dot at)

Method Summary
 boolean equals(Object o)
           
 List<ILiteral> getBody()
          Get the rule body.
 List<ILiteral> getHead()
          Get the rule head-
 int hashCode()
           
 boolean isRectified()
           A rule is rectified if its head has the same form as heads of the other rules from the program, e.g.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getHead

public List<ILiteral> getHead()
Description copied from interface: IRule
Get the rule head-

Specified by:
getHead in interface IRule
Returns:
The rule head.

getBody

public List<ILiteral> getBody()
Description copied from interface: IRule
Get the rule body.

Specified by:
getBody in interface IRule
Returns:
The rule body.

isRectified

public boolean isRectified()
Description copied from interface: IRule

A rule is rectified if its head has the same form as heads of the other rules from the program, e.g. p(X1,...,Xk) for variables X1,...,Xk.

For a given pair of rules:

after the rectification we get the following rules:

where both rules have heads of the same form.

Specified by:
isRectified in interface IRule
Returns:
True if the rule is rectified; otherwise false.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object