rules
Class Conj

java.lang.Object
  extended byrules.Conj
All Implemented Interfaces:
java.lang.Cloneable

public class Conj
extends java.lang.Object
implements java.lang.Cloneable


Constructor Summary
Conj()
           
Conj(Conj other)
           
Conj(Lang l)
           
Conj(java.util.List ls, Lang l)
           
Conj(java.lang.String in, Lang l)
           
 
Method Summary
 int actualSize()
           
 void addLit(Lit l)
           
 void addLits(Conj other)
           
 void addLits(java.util.List other)
           
 void addNonMatchingLits(Conj other)
           
 boolean allIn(Conj other, Subs s)
           
 Conj apply(Subs s)
           
 Conj applyInPlace(Subs s)
           
 void clear()
           
 java.lang.Object clone()
           
 java.lang.Object cloneFalses(World w)
           
 java.lang.Object cloneTrues(World w)
           
 void computeStrVal()
           
 boolean couldCover(World w, Subs s)
           
 boolean covers(World w, Subs s)
          Returns true if after we apply the substitution s every lit is ground and they all appear in w
 boolean coversMoreThan(Conj oldCon, java.util.List egs)
           
 boolean coversSomeOf(java.util.List egs)
           
 boolean equals(java.lang.Object other)
           
 void fixType()
           
 void generalize()
          Removes a random Lit from the Conj
 java.util.List getAllLiteralsContaining(Term t)
           
 java.util.Set getConsts()
           
 java.util.List getFLits()
           
 java.util.List getFuns()
           
 Lang getLang()
           
 Lang getLanguage()
           
 Lit getLit(int i)
           
 java.util.List getLits()
           
 java.util.List getLitsContainingNothingBut(java.util.Set terms)
           
 Lit getMatchingLit(Lit l)
           
 java.util.List getPreds()
           
 java.util.Set getVars()
           
 boolean hasFreeVars()
           
 boolean hasFreeVars(Subs s)
           
 boolean hasLit(Lit l)
           
 boolean hasLit(Lit l, Subs s)
           
 boolean hasMatchingLit(Lit l)
           
 boolean hasMatchingLitOrItsEquals(Lit l)
           
 boolean hasMatchingLitsEquals(Lit l)
           
 boolean hasVar(Var v)
           
 int indexOfLit(Lit l, Subs s)
           
 int indexOfMatchingLit(Lit l)
           
 boolean isFalse(Lit l)
           
 boolean isNull()
           
 boolean isTrue(Lit l)
           
 java.util.Iterator litsIterator()
           
static void main(java.lang.String[] args)
          testing code
 Conj merge(Conj other)
           
 boolean mistyped()
           
 boolean mistyped(Subs s)
           
 Type mostSpecificType(Const c)
           
 Conj notOccursConj(Term t)
           
 int numOccurs(Term t)
           
 boolean occurs(Term t)
           
 Conj occursConj(Term t)
           
 Conj occursNoConstsConj(Var t)
           
 void raiseAllConsts()
           
 Lit randomLit()
           
 void removeAllLiteralsContaining(Term t)
           
 void removeAllLiteralsContainingConsts()
           
 void removeAllLiteralsOfArity(int a)
           
 void removeAllNegLiteralsOfArity(int a)
           
 void removeAllPLiteralsOfArity(int a)
           
 void removeLit(int i)
           
 void removeLit(Lit l)
           
 void removeLits(Conj other)
           
 void removeLits(java.util.List other)
           
 Conj reverse()
           
 void setTruth(Lit l, boolean v)
           
 void setValue(Lit l)
           
 int size()
           
 boolean someMatch(Conj other)
           
 java.lang.String toFileString()
           
 java.lang.String toShortString()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Conj

public Conj()

Conj

public Conj(Lang l)

Conj

public Conj(java.util.List ls,
            Lang l)

Conj

public Conj(Conj other)

Conj

public Conj(java.lang.String in,
            Lang l)
Method Detail

raiseAllConsts

public void raiseAllConsts()

getLanguage

public Lang getLanguage()

clone

public java.lang.Object clone()

cloneTrues

public java.lang.Object cloneTrues(World w)

cloneFalses

public java.lang.Object cloneFalses(World w)

getAllLiteralsContaining

public java.util.List getAllLiteralsContaining(Term t)

reverse

public Conj reverse()

getLitsContainingNothingBut

public java.util.List getLitsContainingNothingBut(java.util.Set terms)

removeAllLiteralsContaining

public void removeAllLiteralsContaining(Term t)

removeAllLiteralsOfArity

public void removeAllLiteralsOfArity(int a)

removeAllNegLiteralsOfArity

public void removeAllNegLiteralsOfArity(int a)

removeAllPLiteralsOfArity

public void removeAllPLiteralsOfArity(int a)

removeAllLiteralsContainingConsts

public void removeAllLiteralsContainingConsts()

merge

public Conj merge(Conj other)

allIn

public boolean allIn(Conj other,
                     Subs s)

someMatch

public boolean someMatch(Conj other)

equals

public boolean equals(java.lang.Object other)

hasMatchingLit

public boolean hasMatchingLit(Lit l)

hasMatchingLitOrItsEquals

public boolean hasMatchingLitOrItsEquals(Lit l)

hasMatchingLitsEquals

public boolean hasMatchingLitsEquals(Lit l)

indexOfMatchingLit

public int indexOfMatchingLit(Lit l)

getMatchingLit

public Lit getMatchingLit(Lit l)

hasLit

public boolean hasLit(Lit l,
                      Subs s)

indexOfLit

public int indexOfLit(Lit l,
                      Subs s)

addNonMatchingLits

public void addNonMatchingLits(Conj other)

addLits

public void addLits(Conj other)

addLits

public void addLits(java.util.List other)

removeLits

public void removeLits(Conj other)

removeLits

public void removeLits(java.util.List other)

hasFreeVars

public boolean hasFreeVars()

hasFreeVars

public boolean hasFreeVars(Subs s)

addLit

public void addLit(Lit l)

removeLit

public void removeLit(Lit l)

removeLit

public void removeLit(int i)

getLit

public Lit getLit(int i)

hasLit

public boolean hasLit(Lit l)

setTruth

public void setTruth(Lit l,
                     boolean v)

setValue

public void setValue(Lit l)

isTrue

public boolean isTrue(Lit l)

isFalse

public boolean isFalse(Lit l)

size

public int size()

isNull

public boolean isNull()

getLits

public java.util.List getLits()

getPreds

public java.util.List getPreds()

getFuns

public java.util.List getFuns()

getFLits

public java.util.List getFLits()

hasVar

public boolean hasVar(Var v)

getVars

public java.util.Set getVars()

getConsts

public java.util.Set getConsts()

applyInPlace

public Conj applyInPlace(Subs s)

mistyped

public boolean mistyped()

fixType

public void fixType()

mistyped

public boolean mistyped(Subs s)

apply

public Conj apply(Subs s)

randomLit

public Lit randomLit()

mostSpecificType

public Type mostSpecificType(Const c)

computeStrVal

public void computeStrVal()

toString

public java.lang.String toString()

toFileString

public java.lang.String toFileString()

toShortString

public java.lang.String toShortString()

coversSomeOf

public boolean coversSomeOf(java.util.List egs)

coversMoreThan

public boolean coversMoreThan(Conj oldCon,
                              java.util.List egs)

couldCover

public boolean couldCover(World w,
                          Subs s)

covers

public boolean covers(World w,
                      Subs s)
Returns true if after we apply the substitution s every lit is ground and they all appear in w


occurs

public boolean occurs(Term t)

numOccurs

public int numOccurs(Term t)

occursNoConstsConj

public Conj occursNoConstsConj(Var t)

occursConj

public Conj occursConj(Term t)

notOccursConj

public Conj notOccursConj(Term t)

actualSize

public int actualSize()

litsIterator

public java.util.Iterator litsIterator()

getLang

public Lang getLang()

generalize

public void generalize()
Removes a random Lit from the Conj


clear

public void clear()

main

public static void main(java.lang.String[] args)
testing code