Procedures¶

A (potential) rule for courts to use in resolving litigation.
Described in terms of inputs and outputs, and also potentially “despite”
Factor
s, which occur when aRule
could be said to apply “even if” some “despite” factor is true.Users generally should not need to interact with this class directly, under the current design. Instead, they should interact with the class
Rule
.- Parameters
outputs – an outcome that a court may accept based on the presence of the
inputs
inputs – supporting
Factor
s in favor of theoutput
. Theinput
Factor
s are not treated as potential undercutters.despite –
Factor
s that do not prevent the court from imposing theoutput
. These could be considered “failed undercutters” in defeasible logic. If aFactor
is relevant both as support for the output and as a potential undercutter, include it in bothinputs
anddespite
.name – An identifier that can be used to reference and incorporate an existing procedure in a new
Factor
, instead of constructing a new copy of theProcedure
.absent – Whether the absence, rather than presence, of this
Procedure
is being referenced. The usefulness of this is unclear, but I’m not prepared to eliminate it before theArgument
class has been implemented and tested.generic – Whether the this
Procedure
is being referenced as a generic example, which could be replaced by any otherProcedure
.
Get input Factors as a FactorGroup.
- Return type
Get input Factors as a FactorGroup.
- Return type
Get despite Factors as a FactorGroup.
- Return type
Get input, output, and despite Factors as FactorGroups.
- Return type
Show how first Procedure triggers the second if not both are universal.
Show how first Procedure triggers the second if not both are universal.
Add two Procedures, given that they have already been found to be addable.
- Return type
Yield as much of the context as seems likely correct based on this Procedure.
- Return type
Yield explanations of contexts that allow combining these Procedures.
- Return type
Combine two
Procedure
s into one.The new
Procedure
will have all of theinputs
,outputs
, anddespite
Factor
s of bothself
andother
.All of the context
Factor
s ofself
will remain the same.
Get number of generic
Factor
s specified forself
.- Returns
the number of generic
Factor
s that need to be specified for thisProcedure
.
Return str(self).
Get
Factor
s ininputs
,outputs
, anddespite
.
Get
Factor
s used in comparisons with otherFactor
s.- Return type
- Returns
a tuple of attributes that are designated as the
terms
for whichever subclass ofFactor
calls this method. These can be used for comparing objects usingconsistent_with()
Factor
s that can be replaced without changingself
s meaning.self.generic can’t be True for
Procedure
.
Add an input
Factor
.
Create new Procedure with added input
Factor
.
Find if
self
applying in some cases impliesother
cannot apply in some.Raises an error because, by analogy with
Procedure.implies()
, users might expect this method to returnTrue
only whenRule
withuniversal=False
and Procedureself
would contradict anotherRule
withuniversal=False
and Procedureother
. But that would never happen.- Return type
Find if
self
applying in some cases impliesother
cannot apply in all.
Check if every input of other implies some input or despite factor of self.
- Return type
Check if every input of other is implied by some input or despite factor of self.
- Return type
Explain why
other
can’t apply in all cases ifself
applies in some.- Return type
Yield contexts establishing that if self is always valid, other is always valid.
- Return type
Find if
self
applying in all cases impliesother
applies in all.self
does not implyother
if any output ofother
is not equal to or implied by some output ofself
.For
self
to implyother
, every input ofself
must be implied by some input ofother
.self
does not implyother
if any despite ofother
contradicts()
an input ofself
.- Return type
- Returns
whether the assertion that
self
applies in all cases implies thatother
applies in all cases.
Yield contexts establishing that if self is always valid, other is sometimes valid.
- Return type
Find if
self
applying in all cases impliesother
applies in some.For
self
to implyother
, every output ofother
must be equal to or implied by some output ofself
.For
self
to implyother
, every input ofself
must not be contradicted by any input or despite ofother
.self
does not implyother
if any “despite”Factor
s ofother
are not implied by inputs ofself
.- Return type
- Returns
whether the assertion that
self
applies in all cases implies thatother
applies in some cases (that is, if the list ofself
’s inputs is not considered an exhaustive list of the circumstances needed to invoke the procedure).
Find if
self
would implyother
if they aren’t absent.When
self
andother
are included inRule
s that both apply in some cases:self
does not implyother
if any output ofother
is not equal to or implied by some output of self.self
does not implyother
if any input ofother
is not equal to or implied by some input ofself
.self
does not implyother
if any despite ofother
is not equal to or implied by some despite or input ofself
.- Return type
- Returns
whether the assertion that
self
applies in some cases implies that theProcedure
other
applies in some cases.
Yield contexts that could cause self to have the same meaning as other.
- Return type
Determine whether
other
has the same meaning asself
.
Create new
Procedure
, replacing keys ofchanges
with values.- Parameters
changes (
ContextRegister
) – adict
ofFactor
s to replace matched to theFactor
s that should replace them- Return type
- Returns
new
Procedure
object, replacing keys ofchanges
with their values.
Set factors required to invoke this Procedure.
- Return type
Set factors that do not preclude application of this Procedure.
- Return type
Set the outputs of this Procedure.
- Return type
Test if
Factor
s from firingself
would triggerother
.Note
To be confident that
self
actually can triggerother
, we would have to assume that self or other hasuniversal: True
since otherwise there could be a mismatch between what is provided and what is needed to triggerother
.
Get a procedure with all the inputs and outputs of self and other.
- Return type
Check if Procedure is suitable to be labeled the “exclusive” method to reach an output.
- Return type
list of weak references to the object (if defined)