eta.lf.Repetition
- class Repetition(ep, nl, ulf, elf, condition, eventualities, prob=1.0)[source]
Bases:
Eventuality
A Repetition is a special type of Eventuality that represents a repeating event.
In addition to the basic Eventuality attributes, it also has a condition and a sub-list of eventualities. The condition is either a ULF (or True for a repetition with no termination), such that the eventualities will occur until the condition is no longer true.
Such an event is indicated by a :repeat-until keyword in a schema.
- eventualities
The list of eventualities to repeat.
- Type:
Methods
Bind the given variable symbol to the given value.
Embed the eventuality based on the natural language representation, given an embedder object.
Format an eventuality as ((<ep> <wff>) <prob>), where <wff> is the highest level of representation for this eventuality.
Get the ELF representation for this eventuality, applying any variable assignments.
Get the episode symbol for this eventuality, applying any variable assignments.
Get the natural language representation for this eventuality, applying any variable assignments.
Get the ULF representation for this eventuality, applying any variable assignments.
Get the highest level of representation available for this eventuality (if no_bind is given as True, do not apply bindings).
Replace the first variable symbol with the second variable symbol throughout the eventuality.
Set the ULF formula.
Set the episode symbol.
Set the probability of this event.
Set the ULF formula.
Unbind the given variable symbol.
- replacevar(var1, var2)[source]
Replace the first variable symbol with the second variable symbol throughout the eventuality.
- __eq__(other)
Return self==value.
- __hash__()
Return hash(self).
- __str__()
Return str(self).
- embed(embedder)
Embed the eventuality based on the natural language representation, given an embedder object.
- format()
Format an eventuality as ((<ep> <wff>) <prob>), where <wff> is the highest level of representation for this eventuality.
- get_elf()
Get the ELF representation for this eventuality, applying any variable assignments.
- get_ep()
Get the episode symbol for this eventuality, applying any variable assignments.
- get_nl()
Get the natural language representation for this eventuality, applying any variable assignments.
- get_ulf()
Get the ULF representation for this eventuality, applying any variable assignments.
- get_wff(no_bind=False)
Get the highest level of representation available for this eventuality (if no_bind is given as True, do not apply bindings).
- set_elf(elf)
Set the ULF formula.
- set_ep(ep)
Set the episode symbol.
- set_prob(prob)
Set the probability of this event.
- set_ulf(ulf)
Set the ULF formula.