Interface Proof
public interface Proof
Represents a proof tree. Proof tree provides an explanation for an inference or an
inconsistency in a hierarchical structure. A proof may simply represent an
assertion in the database. More complex proofs are nested where the immediate children
of a proof provides a concise explanation for the expression associated with that proof.
An example proof (serialized by ProofWriter) looks like as follows:
INFERRED :Alice rdf:type :Employee
ASSERTED :Manager rdfs:subClassOf :Employee
INFERRED :Alice rdf:type :Manager
ASSERTED :Alice :supervises :Bob
ASSERTED :supervises rdfs:domain :Manager
- Since:
- 2.0
- Version:
- 6.0
- Author:
- Evren Sirin
-
Method Summary
Modifier and TypeMethodDescriptionReturns the alternate proof.Returns the child nodes.Returns the expression associated with this proof instance.Returns the union of all asserted expressions in this proof tree.getExpressions(com.complexible.stardog.reasoning.ProofType theType) Returns the union of all expressions for all nodes in this proof tree with the given type.Returns the URIs of named graphs where the expression for this proof node is asserted if thetypeisassertedor empty set otherwise.Returns the union of all asserted statements in this proof tree.getStatements(com.complexible.stardog.reasoning.ProofType theType) Returns the union of all statements for all nodes in this proof tree with the given type.com.complexible.stardog.reasoning.ProofTypegetType()Returns the type of this proof instance.booleanReturnstrueif the proof has an alternate.booleanReturnstrueif this element has any children orfalseotherwise.Returns the string representation of this proof using the given namespaces for abbreviations.
-
Method Details
-
getExpression
Axiom getExpression()Returns the expression associated with this proof instance.- Returns:
- expression associated with this proof instance
-
getType
com.complexible.stardog.reasoning.ProofType getType()Returns the type of this proof instance.- Returns:
- proof type
-
getNamedGraphs
Returns the URIs of named graphs where the expression for this proof node is asserted if thetypeisassertedor empty set otherwise. If the expression is asserted in the default graph, the specialdefault graph URIwill be returned. This set might be empty if the explainer was not configured tocompute named graphs.- Returns:
- named graphs of this proof
-
getChildren
Returns the child nodes.- Returns:
- the child proofs
-
hasChildren
boolean hasChildren()Returnstrueif this element has any children orfalseotherwise.- Returns:
trueif this element has any children orfalseotherwise
-
getAlternate
Proof getAlternate()Returns the alternate proof. An alternate proof is another way to explain the inference.- Returns:
- alternate proof or
nullif there are not alternatives
-
hasAlternate
boolean hasAlternate()Returnstrueif the proof has an alternate.- Returns:
trueif this element has an alterantive orfalseotherwise
-
getExpressions
Returns the union of all asserted expressions in this proof tree.- Returns:
- the union of all asserted expressions in this proof tree
-
getStatements
Returns the union of all asserted statements in this proof tree.- Returns:
- the union of all asserted statements in this proof tree
-
getExpressions
Returns the union of all expressions for all nodes in this proof tree with the given type.- Returns:
- the union of all expressions for all nodes in this proof tree with the given type
-
getStatements
Returns the union of all statements for all nodes in this proof tree with the given type.- Returns:
- the union of all statements for all nodes in this proof tree with the given type
-
toString
Returns the string representation of this proof using the given namespaces for abbreviations.- Returns:
- the string representation of this proof using the given namespaces for abbreviations
-