|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.deri.iris.facts.FiniteUniverseFacts
public class FiniteUniverseFacts
Definition: Unsafe negation A rule has a variable in a negated sub-goal that also occurs in the head, but nowhere else. Definition: Unsafe A rule has a variable that does not occur in a positive ordinary literal. Create a $UNIVERSE$(?X) relation. To handle unsafe negation (Gelder, Well-founded semantics, p.24): 1. For every rule, extract every occurrence of a non-ground-term, e.g. ?X or f(?Y) 2. Substitute a distinct ground term (not found anywhere else) for the variable(s), e.g. '$X', f('$Y') 3. Add this term to $UNIVERSE$ To handle all unsafe rules (with free variables in head or built-ins): 5. Add all concrete terms that occur anywhere in the program (facts and rules) to $UNIVERSE$ For both: 6. Add $UNIVERSE$(?variable) sub-goals for each free variable in each rule
| Field Summary | |
|---|---|
static IPredicate |
UNIVERSE
The universe predicate. |
| Constructor Summary | |
|---|---|
FiniteUniverseFacts(IFacts facts,
Collection<IRule> rules)
Constructor. |
|
| Method Summary | |
|---|---|
IRelation |
get(IPredicate predicate)
Get the relation associated with the given predicate and create one if one does not already exist. |
Set<IPredicate> |
getPredicates()
Get the set of predicate identifying all relations known to this facts object. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final IPredicate UNIVERSE
| Constructor Detail |
|---|
public FiniteUniverseFacts(IFacts facts,
Collection<IRule> rules)
facts - The starting facts of the knowledge-base.rules - The rules of the knowledge-base.| Method Detail |
|---|
public IRelation get(IPredicate predicate)
IFacts
get in interface IFactspredicate - The predicate identifying the relation.
public Set<IPredicate> getPredicates()
IFacts
getPredicates in interface IFactspublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||