| |
- Reason
-
- Because
-
- BecauseOfCommandLine
- BecauseOfData
- BecauseOfExperience
- BecauseBuiltIn
-
- BecauseIncludes
- BecauseSupports
- BecauseOfRule
- BecauseSubexpression
- KBReasonTracker
-
- BecauseMerge
- Premise
class Because(Reason) |
|
For the reason given on the string.
This is a kinda end of the road reason.
A nested reason can also be given. |
|
Methods defined here:
- __init__(self, str, because=None)
- explain(self, ko, flags)
- Describe this reason to an RDF store
Returns the value of this reason as interned in the store.
Methods inherited from Reason:
- meIn(self, ko)
- The representation of this object in the formula ko
|
class BecauseBuiltIn(Reason) |
|
Because the built-in function given concluded so.
A nested reason for running the function must be given |
|
Methods defined here:
- __init__(self, context, subj, pred, obj)
- explain(self, ko, flags)
- This is just a plain fact - or was at the time.
Methods inherited from Reason:
- meIn(self, ko)
- The representation of this object in the formula ko
|
class BecauseOfData(Because) |
|
Directly from data in the resource whose URI is the string.
A nested reason can also be given, for why this resource was parsed. |
|
- Method resolution order:
- BecauseOfData
- Because
- Reason
Methods defined here:
- __init__(self, source, because=None)
- explain(self, ko, flags)
- Describe this reason to an RDF store
Returns the value of this reason as interned in the store.
Methods inherited from Reason:
- meIn(self, ko)
- The representation of this object in the formula ko
|
class BecauseOfRule(Reason) |
| |
Methods defined here:
- __init__(self, rule, bindings, knownExistentials, evidence, kb, because=None)
- explain(self, ko, flags)
- Describe this reason to an RDF store
Returns the value of this reason as interned in the store.
Methods inherited from Reason:
- meIn(self, ko)
- The representation of this object in the formula ko
|
class BecauseSubexpression(Reason) |
|
This was generated as part of a calculatio of a subexpression.
It is is not necessarily believed |
|
Methods defined here:
- explain(self, ko, flags)
- Describe this reason to an RDF store
Returns the value of this reason as interned in the store.
Methods inherited from Reason:
- __init__(self)
- meIn(self, ko)
- The representation of this object in the formula ko
|
class KBReasonTracker(Reason) |
|
A reason tracker tracks the reasons for the statements in its formula.
Beware that when a new formula is
interned, the proofsOf dict must be informed that its identity has changed.
The ForumulaReason is informed of each statement added to the knowlege
base.
A knowledge base (open formula) is made from the addition of forumlae,
which result from, for example parsing a document or doing inference.
Within such added formulae, there are variables, including bnodes, which
have a cetain scope. It is impossible to consider the process
as being one of simply adding statements, as the cross-reference of
the vaiables within the add formuls mst be preserved.
Variable renaming may occur as thr formula is added.
When we track these operations for generating a proof, a proof reason
such as an BecauseOfRule or BecauseOfData corresponds to an added formula.
The KBReasonTracker tracks which statements in a formula came from which
addion operations. |
|
Methods defined here:
- __init__(self, formula=None)
- explain(self, ko, flags)
- explanation(self, ko=None, flags='')
- Produce a justification for this formula into the output formula
Creates an output formula if necessary.
returns it.
(This is different from reason.explain(ko) which returns the reason)
- newStatement(self, s, why)
Methods inherited from Reason:
- meIn(self, ko)
- The representation of this object in the formula ko
|
class Premise(Reason) |
|
For the reason given on the string.
This is a kinda end of the road reason.
It contais the info which was literally supplied as a premise.
A nested reason can also be given.
Because a premise has to be taken for granted, the tracker
has to tell a Premis what statements it has. |
|
Methods defined here:
- __init__(self, str, because=None)
- explain(self, ko, flags)
- Describe this reason to an RDF store
Returns the value of this reason as interned in the store.
Methods inherited from Reason:
- meIn(self, ko)
- The representation of this object in the formula ko
|
class Reason |
|
The Reason class holds a reason for having some information.
Well, its subclasses actually do hold data. This class should not be used
itself to make instances. Reasons may be given to any functions which put
data into stores, is tracking or proof/explanation generation may be
required |
|
Methods defined here:
- __init__(self)
- explain(self, ko, flags)
- Describe this reason to an RDF store
Returns the value of this object as interned in the store.
- meIn(self, ko)
- The representation of this object in the formula ko
| |