|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.deri.iris.optimisations.magicsets.AdornedProgram.AdornedRule
public static class AdornedProgram.AdornedRule
Simple representation of an adorned rule. The only difference to an ordinary rule is, that it has a sip attached, and that you can exchange literals.
ATTENTION: the replaceHeadLiteral and replaceBodyLiteral are slow, because they copy the head and body for each invocation.
| Constructor Summary | |
|---|---|
AdornedProgram.AdornedRule(IRule rule,
ISip sip)
Constructs a new adorned rule. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object object)
|
IRule |
getRule()
Returns the plain rule object. |
ISip |
getSip()
Returns the sip associated with this rule. |
int |
hashCode()
|
AdornedProgram.AdornedRule |
replaceBodyLiteral(ILiteral literal,
IPredicate predicate)
Replaces the predicate of a given body literal with another one. |
AdornedProgram.AdornedRule |
replaceHeadLiteral(ILiteral literal,
IPredicate predicate)
Replaces the predicate of a given head literal with another one. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AdornedProgram.AdornedRule(IRule rule,
ISip sip)
rule - the rulesip - the sip for this rule
IllegalArgumentException - if the rule is
null
IllegalArgumentException - if the sip is
null| Method Detail |
|---|
public ISip getSip()
public IRule getRule()
public AdornedProgram.AdornedRule replaceHeadLiteral(ILiteral literal,
IPredicate predicate)
literal - the literal, for which to exchange the predicatepredicate - the new predicate which should be set
IllegalArgumentException - if the literal is null
IllegalArgumentException - if the predicate is null
IllegalArgumentException - if the arity of the
predicate of the literal and the new predicate doesn't match.
public AdornedProgram.AdornedRule replaceBodyLiteral(ILiteral literal,
IPredicate predicate)
literal - the literal, for which to exchange the predicatepredicate - the new predicate which should be set
IllegalArgumentException - if the literal is null
IllegalArgumentException - if the predicate is null
IllegalArgumentException - if the arity of the
predicate of the literal and the new predicate doesn't match.public String toString()
toString in class Objectpublic boolean equals(Object object)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||