A trace of length indexed data.
Roughly equivalent to a list of indexed data with decreasing indices (length - 1 to 0). Note
that this means the data of index 0 (if any) is always the very last element in the trace.
- empty
{Struct : Symbols.Repr}
{State : Symbols Struct}
{Repr : Nat → Type}
: State.Trace Repr 0
The empty trace.
- cons
{Struct : Symbols.Repr}
{State : Symbols Struct}
{Repr : Nat → Type}
{n : Nat}
(data : Repr n)
(tail : State.Trace Repr n)
: State.Trace Repr n.succ
Some data with index
nand the tail of the trace.
Instances For
A trace of terms.
Equations
- State.TermTrace length = State.Trace Cvc.Symbols.TermsAt length
Instances For
A trace of values.
Equations
- State.ValueTrace length = State.Trace Cvc.Symbols.ValuesAt length
Instances For
Builds a trace of length 1.
Equations
Instances For
Retrieves a state in a trace from its index.
Equations
Instances For
Alias for a reversed Trace, used to change the .
Actually a normal Trace, but Repr is manipulated so that the Repr-data at index idx is
actually Repr (k - idx - 1). As a result Repr 0 is always the first element in the trace,
as opposed to a regular Trace.
Rev traces should not be used in Trace.cons: the first data having index 0 we can only put
data of index 0 in front of it, which does not make sense.
TODO #
- make opaque or handle differently?
Instances For
Auxiliary function for reversing trace, tail-recursive.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Reverses a trace, tail-recursive.
Equations
- trace.reverse = Cvc.Symbols.Trace.reverse.loop k k trace (⋯.mpr Cvc.Symbols.Trace.empty) ⋯
Instances For
Reverses a trace, tail-recursive.
Equations
Instances For
Auxiliary function for Trace.mapM.
Equations
- One or more equations did not get rendered due to their size.
- Cvc.Symbols.Trace.mapM.loop f ⟨0, h⟩ data Cvc.Symbols.Trace.empty = do let data ← f ⟨0, h⟩ data pure (Cvc.Symbols.Trace.cons data Cvc.Symbols.Trace.empty)
Instances For
Monadic map over trace data.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Auxiliary function for Trace.forIn.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Used to instantiate ForIn.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Cvc.Symbols.Trace.instForInSigmaFinVal = { forIn := fun {β : Type ?u.52} [Monad m] => Cvc.Symbols.Trace.forIn }
Monadic fold over trace elements with decreasing indices.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Monadic fold over trace elements with increasing indices.
Equations
Instances For
Fold over trace elements with decreasing indices.
Instances For
Fold over trace elements with increasing indices.