edu.isi.powerloom.logic
Class TruthValue

java.lang.Object
  extended by edu.isi.stella.Stella_Object
      extended by edu.isi.stella.StandardObject
          extended by edu.isi.stella.ContextSensitiveObject
              extended by edu.isi.powerloom.logic.LogicObject
                  extended by edu.isi.powerloom.logic.TruthValue

public class TruthValue
extends LogicObject


Field Summary
 Keyword polarity
          One of :TRUE, :FALSE, :UNKNOWN or :INCONSISTENT.
 double positiveScore
           
 Keyword strength
          Either NULL, :STRICT or :DEFAULT.
 
Fields inherited from class edu.isi.powerloom.logic.LogicObject
dependentPropositionsIndex, dynamicSlots, surrogateValueInverse, variableValueInverse
 
Fields inherited from class edu.isi.stella.ContextSensitiveObject
homeContext
 
Constructor Summary
TruthValue()
           
 
Method Summary
static Stella_Object accessTruthValueSlotValue(TruthValue self, Symbol slotname, Stella_Object value, boolean setvalueP)
           
static TruthValue conjoinTruthValues(TruthValue tv1, TruthValue tv2)
          Return the logical conjunction of truth values tv1 and tv2.
static boolean defaultTruthValueP(TruthValue self)
          Return TRUE if self is a default truth value.
static TruthValue disjoinTruthValues(TruthValue tv1, TruthValue tv2)
          Return the logical disjunction of truth values tv1 and tv2.
static boolean falseTruthValueP(TruthValue self)
          Return TRUE if self represents some form of falsehood.
static boolean inconsistentTruthValueP(TruthValue self)
          Return TRUE if self represents INCONSISTENT.
static TruthValue invertTruthValue(TruthValue self)
          Return the logical negation of self.
static TruthValue newTruthValue()
           
 Surrogate primaryType()
          Returns the primary type of self.
static void printTruthValue(TruthValue self, OutputStream stream)
           
static TruthValue strengthenTruthValue(TruthValue tv1, TruthValue tv2)
          If tv2 has greater strength than tv1, adapt the strength of tv1 (not its value!) and return the result.
static boolean strictTruthValueP(TruthValue self)
          Return TRUE if self is a strict truth value.
static boolean trueTruthValueP(TruthValue self)
          Return TRUE if self represents some form of truth.
static boolean unknownTruthValueP(TruthValue self)
          Return TRUE if self represents UNKNOWN.
static TruthValue weakenTruthValue(TruthValue tv1, TruthValue tv2)
          If tv2 has lesser strength than tv1, adapt the strength of tv1 (not its value!) and return the result.
 
Methods inherited from class edu.isi.powerloom.logic.LogicObject
accessLogicObjectSlotValue, addIsaLink, allDirectSubcollections, allDirectSubcollectionsWithEquivalents, allDirectSupercollections, allDirectSupercollectionsWithEquivalents, allEquivalentCollections, allInferableDirectSubcollections, allSlotValues, allSlotValueTypes, allSubcollections, allSupercollections, allSupportedNamedSubcollections, applicableRulesOfDescription, assertProperty, badP, bindToEquivalentValue, buildCaseFromInstance, cheapEmptyTermP, collectionImpliesCollectionP, collectSubsumingParentsBelow, conceptPrototypeOf, conceptPrototypeP, deletedP, deletedPSetter, derivePartitionMembershipsP, destroyTerm, downclassificationTimestamp, downclassifiedP, downclassifyOneDescription, elaboratedInWorlds, equivalenceCollections, equivalentCollectionPriority, evaluateLogicObjectTerm, evaluateReachableInequalities, evaluateRemainingArguments, expensiveEmptyTermP, filterInstanceP, generateCaseBasedAnswer, generateExpression, getMostSpecificClasses, getSlotMaximumCardinality, getSlotMinimumCardinality, getSlotValue, getSlotValueType, helpAllSupportedNamedSubcollections, helpCollectParentsBelowP, helpDerivePartitionMemberships, helpDownclassifyOneDescription, helpUpclassifyOneEntity, introductionTimestamp, logicObjectDinheritUnnamedDescription, logLogicObject, markAsIncoherent, matchInstances, namedCollectionP, newLogicObject, nonPolymorphicPredicateP, objectNameLessThanP, printKifLogicObject, printLogicObject, printObject, processDefinitionOptions, refreshDownclassificationTimestamp, removeAllDependentPropositionLinks, retractFactsOfInstance, retractProperty, testSlotValueP, unbindEquivalentValue, unlinkEquivalentValue, upclassifiedLaterThanP, upclassifyOneDescription, upclassifyOneInstance, updateProperty, variableValueInverse, visibleTermP
 
Methods inherited from class edu.isi.stella.ContextSensitiveObject
homeModule
 
Methods inherited from class edu.isi.stella.StandardObject
arrayTypeSpecifierP, baseTypeToTypeSpec, cantOverwriteActiveCollectionSlot, compatibleParameterTypesP, computeAnchoredTypeSpec, computeRelativeTypeSpec, conformingTypeSpecP, copyWrappedLiteral, cppReferenceTypeP, cppReferencizeType, cppTranslateAndPointerizeTypeSpec, cppTranslateAndReferencizeTypeSpec, cppTranslateTypeSpec, dropSlotValue, extractParameterType, extractRequiredArgumentValues, getSlot, hashCode_, idlTranslateTypeSpec, inverseSlotDemon, javaLiteralP, javaNativeLiteralWrapperNames, javaSpecialSetterName, javaTranslateArrayOfTypeSpec, javaTranslateTypeSpec, javaTranslateTypeSpecForFunction, javaTranslateTypeSpecHelper, javaYieldClassObjectArrayExpression, javaYieldClassObjectExpression, javaYieldFullyQualifiedTypeName, javaYieldTranslatedClassAndMethodNames, listifyTypeSpec, lookupClTypeFromStellaType, objectEqlP, putSlotValue, readSlotValue, runConstructorDemons, runDestructorDemons, runSlotDemons, runSlotGuardDemonsP, standardObjectP, subTypeSpecOfP, twoArgumentLeastCommonSupertype, typeSpecToBaseType, typeSpecToClass, typeToWalkedNullValueTree, validateTypeSpecifier, voidP, walkTypeSpecIsNativeTypeP, writeSlotValue, yieldTypeSpecTree
 
Methods inherited from class edu.isi.stella.Stella_Object
_, accessInContext, amPm, anchoredTypeSpecifierP, andOrNotTreeP, applyCoercionMethod, atomicExpressionP, bindToSurrogateP, booleanP, bootstrapIsaP, bquotify, cast, characterP, clTranslateAtomicTree, clTranslateATree, clTranslateBooleanTest, clTranslatePlainBooleanTest, clTranslateVerbatimBodySymbols, clYieldTypedExpressionTree, coerceATree, coerceEvaluatedTree, coerceMvTree, coerceToBoolean, coerceToModule, coerceToModuleName, coerceToSymbol, coerceToXmlElement, coercibleP, collectFeatureList, collectKeyValueList, commonLispSymbolP, computeExpressionType, cons, consify, consifyListsAndIterators, consP, consTreeMatchP, convertToLiteral, copyConsTree, cppArgumentIsStreamP, cppBinaryOperatorP, cppBlockP, cppMaybeOutputStatementWithParentheses, cppOperatorP, cppOutputAtomicExpression, cppOutputLiteral, cppOutputOneActualParameter, cppOutputStatement, cppOutputTypedEntity, cppPrognifyStatement, cppPrognP, cppStatementToList, cppStreamIsStandardOutputP, cpptrans, cppTranslateAtomicTree, cppTranslateATree, cppTranslatedArrayTypeP, csValueP, dateDivider, dateTimeDivider, day, dealWithAmPm, dealWithEra, dealWithNoonMidn, decrementReferenceCount, defaultOptionHandler, defineSystem, defmodule, describe, describeObject, describeTersely, destructureMethodNameTree, deUglifyParseTree, either, eqlP, eqlToBooleanP, eqlToCharacterP, eqlToFloatP, eqlToIntegerP, eqlToStringP, equalConsTreesP, equalHashCode, equalP, era, estimatedEvaluationCost, evaluate, evaluateArgumentTree, evaluateAtomicTree, evaluateCommand, expandBquoteTree, filterModuleP, floatP, free, get, getObject, hashlist, hashMemoizedArguments, helpBquotify, helpClTranslateATree, helpCoerceATree, helpLptrans, helpPrintOutline, helpTransformBooleanProceduralExpression, helpWalkATree, hour, idlOutputAtomicExpression, idlOutputLiteral, idlOutputStatement, idlTranslateAtomicTree, idlTranslateATree, illegalTreeP, implodePathname, incrementallyTranslate, incrementReferenceCount, inlineUnwrapBoolean, inlineWrapBoolean, inModule, integerP, isaP, javaBinaryOperatorP, javaBlockP, javaEndOfLineTokenP, javaHelpOutputPrintStream, javaMaybeOutputStatementWithParentheses, javaOperatorP, javaOutputLiteral, javaOutputStatement, javaPrognP, javaStreamIsStandardOutputP, javaSymbolCaseP, javaTranslateAtomicTree, javaTranslateATree, javaTranslateWithNativeWrapper, jptrans, keywordP, kvCons, legalTokenizerFromStateP, legalTokenizerStateP, legalTokenizerToStateP, literalEqlP, logLevelLE, lptrans, makeFileNameFromRelativePath, makeMemoizedValueEntry, makeMemoizedValueEntryn, matchConsTree, methodSlotP, minute, month, nameToString, nilP, noonMidn, numberWrapperToFloat, objectEqualP, objectHashCode, one, oneI, onlyIf, parametricTypeSpecifierP, parseArrayDimensionsSpec, parseTokenizerCharacterSpec, parseTokenizerStateModifiers, permanentCopy, permanentify, permanentifyForm, po, prettyPrintLiteral, primaryClass, printOutline, printStellaCode, printStellaDefinition, printUndefinedSuperClasses, proceduralExpressionP, ptrans, publicSlots, registerRecycledItem, runOptionHandlerP, safeEqualHashCode, safeHashCode, safePrimaryType, safeYieldTypeSpecifier, searchConsTreeP, searchConsTreeWithFilterP, searchForObject, secondp, sideEffectFreeExpressionP, simplifyBquoteTree, specialp, stella_Increment, stellaClassP, stellaCollectionP, stellaNeedToCompileP, stellaNeedToTranslateP, stellaObjectP, stellify, storageSlotP, stringifyInModule, stringP, substituteConsTree, substituteOnce, surrogateP, surrogatify, sweep, symbolCaseP, symbolP, sysTree, targetLanguageType, taxonomyIsaP, timeDivider, timeMultiply, tokenizerIncludeSpecP, tokenizerToStateAlias, tokenizerToStateName, toString, traceIf, traceKeywordP, transientifyForm, transientObjectP, transientSymbolP, translateWalkedTree, treeSize, treeToTrees, trueOptionP, tryToEvaluate, typeP, typify, unmake, unregisterRecycledItem, updateInContext, valuesTreeP, variableExpressionP, verbatimStringP, verbatimTreeP, vetOptions, vrletExpressionP, walkAtomicTree, walkATree, walkCollectionTree, walkDontCallMeTree, walkedExpressionType, walkExpressionTree, walkMvExpressionTree, walkMvTree, walkStatement, walkTopLevelExpression, walkWithoutTypeTree, warnAboutUnknownSourceType, weekday, withinContext, withinModule, withinWorld, withStellaTokenizer, withSystemDefinition, withTokenizer, wrapperP, wrapWhereTest, xmlAttributeP, xmlCdataFormP, xmlCdataP, xmlDeclarationFormP, xmlDeclarationP, xmlDoctypeFormP, xmlElementFormP, xmlElementP, xmlnsAttributeP, xmlProcessingInstructionFormP, xmlProcessingInstructionP, xmlTagCase, year, yieldCondTest, yieldCondTestOrTests, yieldHardcodedCaseSymbolIdOrIds, yieldInCursorClausesForArgumentList, yieldInCursorClausesForGeneralCollection, yieldInCursorClausesForVector, yieldTypeSpecifier, zone, zoneMinute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

polarity

public Keyword polarity
One of :TRUE, :FALSE, :UNKNOWN or :INCONSISTENT.


strength

public Keyword strength
Either NULL, :STRICT or :DEFAULT.


positiveScore

public double positiveScore
Constructor Detail

TruthValue

public TruthValue()
Method Detail

newTruthValue

public static TruthValue newTruthValue()

printTruthValue

public static void printTruthValue(TruthValue self,
                                   OutputStream stream)

inconsistentTruthValueP

public static boolean inconsistentTruthValueP(TruthValue self)
Return TRUE if self represents INCONSISTENT.

Parameters:
self -
Returns:
boolean

unknownTruthValueP

public static boolean unknownTruthValueP(TruthValue self)
Return TRUE if self represents UNKNOWN.

Parameters:
self -
Returns:
boolean

defaultTruthValueP

public static boolean defaultTruthValueP(TruthValue self)
Return TRUE if self is a default truth value.

Parameters:
self -
Returns:
boolean

strictTruthValueP

public static boolean strictTruthValueP(TruthValue self)
Return TRUE if self is a strict truth value.

Parameters:
self -
Returns:
boolean

falseTruthValueP

public static boolean falseTruthValueP(TruthValue self)
Return TRUE if self represents some form of falsehood.

Parameters:
self -
Returns:
boolean

trueTruthValueP

public static boolean trueTruthValueP(TruthValue self)
Return TRUE if self represents some form of truth.

Parameters:
self -
Returns:
boolean

strengthenTruthValue

public static TruthValue strengthenTruthValue(TruthValue tv1,
                                              TruthValue tv2)
If tv2 has greater strength than tv1, adapt the strength of tv1 (not its value!) and return the result. Otherwise, return tv1 unmodified.

Parameters:
tv1 -
tv2 -
Returns:
TruthValue

weakenTruthValue

public static TruthValue weakenTruthValue(TruthValue tv1,
                                          TruthValue tv2)
If tv2 has lesser strength than tv1, adapt the strength of tv1 (not its value!) and return the result. Otherwise, return tv1 unmodified.

Parameters:
tv1 -
tv2 -
Returns:
TruthValue

invertTruthValue

public static TruthValue invertTruthValue(TruthValue self)
Return the logical negation of self.

Parameters:
self -
Returns:
TruthValue

disjoinTruthValues

public static TruthValue disjoinTruthValues(TruthValue tv1,
                                            TruthValue tv2)
Return the logical disjunction of truth values tv1 and tv2.

Parameters:
tv1 -
tv2 -
Returns:
TruthValue

conjoinTruthValues

public static TruthValue conjoinTruthValues(TruthValue tv1,
                                            TruthValue tv2)
Return the logical conjunction of truth values tv1 and tv2.

Parameters:
tv1 -
tv2 -
Returns:
TruthValue

accessTruthValueSlotValue

public static Stella_Object accessTruthValueSlotValue(TruthValue self,
                                                      Symbol slotname,
                                                      Stella_Object value,
                                                      boolean setvalueP)

primaryType

public Surrogate primaryType()
Description copied from class: Stella_Object
Returns the primary type of self. Gets defined automatically for every non-abstract subclass of OBJECT.

Overrides:
primaryType in class LogicObject
Returns:
Surrogate