Interface Proof
-
public interface ProofRepresents a proof tree. Proof tree provides an explanation for an
inferenceor aninconsistencyin a hierarchical structure. A proof may simply represent anassertionin 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ProofgetAlternate()Returns the alternate proof.java.lang.Iterable<Proof>getChildren()Returns the child nodes.AxiomgetExpression()Returns the expression associated with this proof instance.java.lang.Iterable<Axiom>getExpressions()Returns the union of all asserted expressions in this proof tree.java.lang.Iterable<Axiom>getExpressions(com.complexible.stardog.reasoning.ProofType theType)Returns the union of all expressions for all nodes in this proof tree with the given type.java.util.Set<IRI>getNamedGraphs()Returns the URIs of named graphs where the expression for this proof node is asserted if thetypeisassertedor empty set otherwise.java.lang.Iterable<Statement>getStatements()Returns the union of all asserted statements in this proof tree.java.lang.Iterable<Statement>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.booleanhasAlternate()Returnstrueif the proof has an alternate.booleanhasChildren()Returnstrueif this element has any children orfalseotherwise.java.lang.StringtoString(java.lang.Iterable<Namespace> theNamespaces)Returns the string representation of this proof using the given namespaces for abbreviations.
-
-
-
Method Detail
-
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
java.util.Set<IRI> 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
java.lang.Iterable<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
java.lang.Iterable<Axiom> getExpressions()
Returns the union of all asserted expressions in this proof tree.- Returns:
- the union of all asserted expressions in this proof tree
-
getStatements
java.lang.Iterable<Statement> getStatements()
Returns the union of all asserted statements in this proof tree.- Returns:
- the union of all asserted statements in this proof tree
-
getExpressions
java.lang.Iterable<Axiom> 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 union of all expressions for all nodes in this proof tree with the given type
-
getStatements
java.lang.Iterable<Statement> getStatements(com.complexible.stardog.reasoning.ProofType theType)
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
java.lang.String toString(java.lang.Iterable<Namespace> theNamespaces)
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
-
-