Package com.semedy.reasoner.api.logic
Class Literal
java.lang.Object
com.semedy.reasoner.api.logic.Compound
com.semedy.reasoner.api.logic.Literal
- All Implemented Interfaces:
Serializable
,Cloneable
object to represent a literal
- Author:
- angele
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
clone itboolean
get stored debug infoget a normalized version (all variables are renamed to Xi)get a normalized version and renumber variablesint
Partial evaluation means that a part of the facts are used for evaluation only
Is used for facts partitioning based threaded evaluationreturns the original of the literal.int
get end number for pathint
get start number for pathreturn the predicate symbol of the literalreturn a qualified predicate symbol with name and arity like add|2int
return the rule stratum the literal is inint
return a unique identifier of the literalint
hashCode()
boolean
is the literal positive?void
set debug info to literalvoid
setNumberOfParts
(int parts) Partial evaluation means that a part of the facts are used for evaluation only.void
setPathNumbers
(int start, int end) set numbers for pathvoid
setStratum
(int s) set the rule stratumtoString()
toString
(SymbolTable symbols) Methods inherited from class com.semedy.reasoner.api.logic.Compound
boundArguments, clearInternalBuffer, getArgument, getArguments, getArity, getInternalBuffer, getSubstitutedArgument, getSymbol, getSymbolAsString, getVariableOccurrences, getVariables, getVariablesAsBits, isArgumentGround, isGround
-
Constructor Details
-
Literal
-
Literal
-
Literal
-
Literal
-
Literal
-
Literal
-
-
Method Details
-
getOriginal
returns the original of the literal.
null otherwise- Returns:
-
getNormalized
get a normalized version (all variables are renamed to Xi)- Overrides:
getNormalized
in classCompound
- Returns:
-
getNormalizedRenumber
get a normalized version and renumber variables- Returns:
-
clone
clone it -
getStratum
public int getStratum()return the rule stratum the literal is in- Returns:
-
setStratum
public void setStratum(int s) set the rule stratum- Parameters:
s
-
-
setDebugInfo
set debug info to literal- Parameters:
s
-
-
getDebugInfo
get stored debug info- Returns:
-
isPositive
public boolean isPositive()is the literal positive?- Returns:
-
getUniqueIdentifier
public int getUniqueIdentifier()return a unique identifier of the literal- Returns:
-
getPredicateSymbol
return the predicate symbol of the literal- Returns:
-
getQualifiedPredicateSymbol
return a qualified predicate symbol with name and arity like add|2- Returns:
-
hashCode
public int hashCode() -
equals
-
setNumberOfParts
public void setNumberOfParts(int parts) Partial evaluation means that a part of the facts are used for evaluation only.
Is used for facts partitioning based threaded evaluation- Parameters:
parts
-
-
setPathNumbers
public void setPathNumbers(int start, int end) set numbers for path- Parameters:
start
-end
-
-
getPathStart
public int getPathStart()get start number for path- Returns:
-
getPathEnd
public int getPathEnd()get end number for path- Returns:
-
getNumberOfParts
public int getNumberOfParts()Partial evaluation means that a part of the facts are used for evaluation only
Is used for facts partitioning based threaded evaluation- Returns:
- parts
-
toString
-
toString
- Throws:
IOException
SemReasonerException
-