public abstract class LiteralAbstract2 extends LiteralAbstract1
Because so many methods are defined at the Literal level, the code files are broken into 3 classes:
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
stdLitType |
argCodes, args, cancellingPredsA, cancellingPredsB, cancelPredsA, cancelPredsB, debugSerial, expansionSerial, failReason, generalPreds, genPreds, negativeConstraintPhase, oppoPredsA, oppoPredsB, oppositePredsA, oppositePredsB, predicate, stdAlter, stdEgo
Constructor and Description |
---|
LiteralAbstract2()
Generic zero-arg constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addToPCString(java.util.ArrayList<java.lang.Object> pcStr,
boolean divReq,
Individual preBound,
Individual newBound) |
void |
addToPCString(java.util.ArrayList<java.lang.Object> pcStr,
Individual preBound,
Individual newBound,
boolean preIsKid) |
void |
assignDivDate(Family fam,
java.lang.String divSpec)
Assign a date to the divorce (OR a date = "" as positive absence of a divorce) in
fam . |
void |
createPersonalStarLink(Individual person2,
java.lang.String predName,
java.util.ArrayList<java.lang.Object> starBindings) |
java.util.ArrayList<java.lang.Object> |
lastChanceToValue(Argument arg,
java.util.TreeMap bindings,
java.util.ArrayList<java.lang.Object> starBindings,
ConstraintObj constraints)
Return a list with the arg's value -- bound or internal.
|
boolean |
meetsStarSpecsStrictly(Individual cand,
Variable candVar,
java.util.ArrayList<java.lang.Object> starBindings,
java.util.TreeMap bindings,
ConstraintObj constraints)
Similar to
meetsStarSpecs , but with no changes permitted to the Individual or her values. |
boolean |
newUDPVal(java.lang.String failedProp,
Variable theVar,
java.lang.String bindingMade,
java.util.TreeMap bindings,
java.util.ArrayList<java.lang.Object> starBindings,
ConstraintObj constraints,
ClauseBody cb) |
java.util.ArrayList<UserDefinedProperty> |
pickUDPs(java.lang.String starProp,
Individual candidate,
ClauseBody cb,
Context cucCtxt) |
static java.util.ArrayList<java.lang.Object> |
setDifference(java.util.ArrayList<java.lang.Object> list1,
java.util.ArrayList<java.lang.Object> list2)
Produce the set-difference of list1 minus list2; remove each item in list2 from list1 -- if it's there.
|
void |
undoPersonalStarLink(Individual linkee,
java.lang.String predName,
java.util.TreeMap bindings) |
apply, computeLevel, constraintCheck, constraintPred, containsAll, copy, countArgs, expand, finalConstraintCheck, finishExpansion, genderInferences, isEquivalent, lits2MiniStrings, mergeWith, neg_expand, setClosureOf, toString, updatePath
public static final java.lang.String stdLitType
public LiteralAbstract2()
public static java.util.ArrayList<java.lang.Object> setDifference(java.util.ArrayList<java.lang.Object> list1, java.util.ArrayList<java.lang.Object> list2)
list1
- the base list, from which we will subtract.list2
- the list of items to be subtracted.public boolean newUDPVal(java.lang.String failedProp, Variable theVar, java.lang.String bindingMade, java.util.TreeMap bindings, java.util.ArrayList<java.lang.Object> starBindings, ConstraintObj constraints, ClauseBody cb) throws KSInternalErrorException, KSBadHornClauseException, java.lang.ClassNotFoundException, KSConstraintInconsistency
KSInternalErrorException
KSBadHornClauseException
java.lang.ClassNotFoundException
KSConstraintInconsistency
public void addToPCString(java.util.ArrayList<java.lang.Object> pcStr, Individual preBound, Individual newBound, boolean preIsKid)
public void addToPCString(java.util.ArrayList<java.lang.Object> pcStr, boolean divReq, Individual preBound, Individual newBound)
public void createPersonalStarLink(Individual person2, java.lang.String predName, java.util.ArrayList<java.lang.Object> starBindings) throws KSInternalErrorException
KSInternalErrorException
public void undoPersonalStarLink(Individual linkee, java.lang.String predName, java.util.TreeMap bindings) throws KSInternalErrorException
KSInternalErrorException
public java.util.ArrayList<java.lang.Object> lastChanceToValue(Argument arg, java.util.TreeMap bindings, java.util.ArrayList<java.lang.Object> starBindings, ConstraintObj constraints) throws KSBadHornClauseException, java.lang.ClassNotFoundException, KSConstraintInconsistency, KSInternalErrorException
KSBadHornClauseException
java.lang.ClassNotFoundException
KSConstraintInconsistency
KSInternalErrorException
public java.util.ArrayList<UserDefinedProperty> pickUDPs(java.lang.String starProp, Individual candidate, ClauseBody cb, Context cucCtxt) throws KSInternalErrorException
KSInternalErrorException
public boolean meetsStarSpecsStrictly(Individual cand, Variable candVar, java.util.ArrayList<java.lang.Object> starBindings, java.util.TreeMap bindings, ConstraintObj constraints) throws KSInternalErrorException, java.lang.ClassNotFoundException, KSConstraintInconsistency
meetsStarSpecs
, but with no changes permitted to the Individual or her values.
Here, a constraint implies that candidate's value must exist & must agree with the mVarOrConst's constraints.
Hence, if candidate has no value, return false.
If mVarOrConst is a Constant, the constraint is simple: candidate must have that value.
If mVarOrConst is not a Constant, then it must be a MathVariable or a Variable.
For a single-valued property, if cand has a specific value but the MathVariable has some other value, then return false. If cand has the required value, do not return false; continue checking.
If the MathVariable is not yet bound to a value, and cand already has a "conforming value," bind it to the MathVariable's value field & go on.
If the property is multi-valued, and the MathVariable is bound to a particular set of values, then cand must already have that exact set of values, or else we must return false. If cand has the values, do not return false.
If the Variable has a constraint requiring that candidate's value-set must be contained by some other MathVariable, then if it's true do not return false. Continue checking.
If the property is multi-valued, and the MathVariable has a constraint requiring that cand's value-set must contain some specific value, then if that value is in cand's value-set do not return false. Continue checking.
We check each star-property that applies to cand in this manner. If no property causes us to return false, then we return true.
KSInternalErrorException
java.lang.ClassNotFoundException
KSConstraintInconsistency