rules
Class Lit
java.lang.Object
rules.Formula
rules.Lit
- All Implemented Interfaces:
- java.lang.Cloneable
- Direct Known Subclasses:
- FLit, PLit
- public abstract class Lit
- extends Formula
- implements java.lang.Cloneable
|
Constructor Summary |
Lit()
|
|
Method Summary |
int |
actualSize()
|
Lit |
apply(Subs s)
|
java.util.List |
applyAll(Subs s)
|
int |
arity()
|
java.lang.Object |
clone()
|
java.util.List |
conceptObjects(World world,
Var freeVar,
Subs s)
|
boolean |
contains(Term tc)
|
boolean |
contradicts(java.lang.Object other)
|
boolean |
equals(Lit other,
Subs s)
|
boolean |
equals(java.lang.Object other)
|
void |
fixType()
|
Var |
freeVar(java.util.Set boundVars)
|
java.util.Set |
getConsts()
|
java.util.Set |
getFuns()
|
java.util.Set |
getLits()
|
java.lang.String |
getName()
|
java.util.Set |
getPreds()
|
java.util.Set |
getVars()
|
boolean |
hasConsts()
|
boolean |
hasFreeVars()
|
boolean |
hasFreeVars(Subs s)
|
int |
hashCode()
|
boolean |
hasTerm(Term t)
|
boolean |
hasUnboundVars(Subs s)
|
boolean |
isEquality()
|
boolean |
isFalseIn(World w)
|
boolean |
isFalseIn(World w,
Subs s)
|
boolean |
isInequality()
|
boolean |
isNegative()
|
boolean |
isPositive()
|
boolean |
isTrueIn(World w)
|
abstract boolean |
isTrueIn(World w,
Subs s)
|
boolean |
isTyped()
|
boolean |
isTypeLit()
|
static void |
main(java.lang.String[] args)
testing code |
boolean |
matchEquals(java.lang.Object other)
|
boolean |
matches(java.lang.Object other)
|
boolean |
matchesButForArgs(java.lang.Object other)
|
boolean |
matchesWithType(java.lang.Object other)
|
boolean |
mistyped()
|
boolean |
mistyped(Subs s)
|
Type |
mostSpecificType(Const c)
|
Lit |
negateClone()
|
int |
numOccurs(Term t)
|
boolean |
occurs(Term t)
|
static Lit |
readLit(java.lang.String p,
Lang l)
|
void |
setFunConcepts(Lang l)
|
void |
setTruth(boolean t)
|
java.lang.String |
toFileString()
|
java.lang.String |
toShortString()
|
java.lang.String |
toSS()
|
java.lang.String |
toString()
|
boolean |
typeLitTruth()
|
boolean |
typeLitTruth(Subs s)
|
Subs |
unify(Lit p)
|
Subs |
unify(Lit p,
Subs s)
|
java.util.List |
usedConceptObjects(World world,
Var freeVar,
Subs s,
java.util.Set consts)
|
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
onlyleaves
public static boolean onlyleaves
conceptPenalty
public static boolean conceptPenalty
Lit
public Lit()
readLit
public static Lit readLit(java.lang.String p,
Lang l)
clone
public java.lang.Object clone()
negateClone
public Lit negateClone()
setFunConcepts
public void setFunConcepts(Lang l)
- Overrides:
setFunConcepts in class Formula
fixType
public void fixType()
actualSize
public int actualSize()
- Overrides:
actualSize in class Formula
mistyped
public boolean mistyped()
mistyped
public boolean mistyped(Subs s)
apply
public Lit apply(Subs s)
occurs
public boolean occurs(Term t)
numOccurs
public int numOccurs(Term t)
arity
public int arity()
applyAll
public java.util.List applyAll(Subs s)
contains
public boolean contains(Term tc)
mostSpecificType
public Type mostSpecificType(Const c)
unify
public Subs unify(Lit p)
unify
public Subs unify(Lit p,
Subs s)
isTypeLit
public boolean isTypeLit()
typeLitTruth
public boolean typeLitTruth(Subs s)
typeLitTruth
public boolean typeLitTruth()
getLits
public java.util.Set getLits()
- Overrides:
getLits in class Formula
getPreds
public java.util.Set getPreds()
- Overrides:
getPreds in class Formula
getFuns
public java.util.Set getFuns()
- Overrides:
getFuns in class Formula
isPositive
public boolean isPositive()
isNegative
public boolean isNegative()
setTruth
public void setTruth(boolean t)
freeVar
public Var freeVar(java.util.Set boundVars)
hasUnboundVars
public boolean hasUnboundVars(Subs s)
hasConsts
public boolean hasConsts()
hasTerm
public boolean hasTerm(Term t)
isInequality
public boolean isInequality()
isEquality
public boolean isEquality()
getVars
public java.util.Set getVars()
getConsts
public java.util.Set getConsts()
conceptObjects
public java.util.List conceptObjects(World world,
Var freeVar,
Subs s)
usedConceptObjects
public java.util.List usedConceptObjects(World world,
Var freeVar,
Subs s,
java.util.Set consts)
toFileString
public java.lang.String toFileString()
toString
public java.lang.String toString()
- Overrides:
toString in class Formula
toShortString
public java.lang.String toShortString()
toSS
public java.lang.String toSS()
equals
public boolean equals(java.lang.Object other)
equals
public boolean equals(Lit other,
Subs s)
matchesButForArgs
public boolean matchesButForArgs(java.lang.Object other)
matches
public boolean matches(java.lang.Object other)
matchesWithType
public boolean matchesWithType(java.lang.Object other)
matchEquals
public boolean matchEquals(java.lang.Object other)
contradicts
public boolean contradicts(java.lang.Object other)
getName
public java.lang.String getName()
hashCode
public int hashCode()
isFalseIn
public boolean isFalseIn(World w,
Subs s)
- Overrides:
isFalseIn in class Formula
isFalseIn
public boolean isFalseIn(World w)
- Overrides:
isFalseIn in class Formula
isTyped
public boolean isTyped()
hasFreeVars
public boolean hasFreeVars()
- Overrides:
hasFreeVars in class Formula
hasFreeVars
public boolean hasFreeVars(Subs s)
- Overrides:
hasFreeVars in class Formula
isTrueIn
public boolean isTrueIn(World w)
- Overrides:
isTrueIn in class Formula
isTrueIn
public abstract boolean isTrueIn(World w,
Subs s)
- Overrides:
isTrueIn in class Formula
main
public static void main(java.lang.String[] args)
- testing code