Sequences, typed #
Replaces the first occurrence of a sub-sequence.
Equations
- s.seqReplace pat repl = Cvc.Untyped.Term.seqReplace s pat repl
Instances For
The empty sequence of elements of sort α.
Equations
- Cvc.Typed.Term.mkEmptySeq = do let srtOfα ← Cvc.Srt.of α Cvc.Untyped.Term.mkEmptySeq srtOfα
Instances For
The sub-sequence of length len starting at idx; empty when out of range.
Equations
- s.seqExtract idx len = Cvc.Untyped.Term.seqExtract s idx len
Instances For
Index of the first occurrence of sub in s at or after start, or -1.
Equations
- s.seqIndexof sub start = Cvc.Untyped.Term.seqIndexof s sub start
Instances For
Replaces every occurrence of a sub-sequence.
Equations
- s.seqReplaceAll pat repl = Cvc.Untyped.Term.seqReplaceAll s pat repl
Instances For
seqConcat over two or more terms.
Equations
- Cvc.Typed.Term.seqConcatN terms atLeastTwoElements = Cvc.Untyped.Term.seqConcatN terms atLeastTwoElements
Instances For
Seq's operators with a result of sort Seq.
- seqUnit
[Ω]
{γ : Type}
[ToTyp γ]
(elm : Term γ)
: OnSeq γ
The one-element sequence.
- seqConcat
[Ω]
{γ : Type}
[ToTyp γ]
(kids : Kids (Array γ))
: OnSeq γ
Concatenation.
kidsholds every operand, two or more. - seqAt
[Ω]
{γ : Type}
[ToTyp γ]
(s : Term (Array γ))
(idx : Term Int)
: OnSeq γ
The one-element sequence at an index, or the empty sequence if out of bounds.
- seqExtract
[Ω]
{γ : Type}
[ToTyp γ]
(s : Term (Array γ))
(idx len : Term Int)
: OnSeq γ
The sub-sequence of length
lenstarting atidx; empty when out of range. - seqUpdate
[Ω]
{γ : Type}
[ToTyp γ]
(s : Term (Array γ))
(idx : Term Int)
(repl : Term (Array γ))
: OnSeq γ
Overwrites
sfromidxwithrepl, keeping its length;sifidxis out of range. - seqReplace
[Ω]
{γ : Type}
[ToTyp γ]
(s pat repl : Term (Array γ))
: OnSeq γ
Replaces the first occurrence of a sub-sequence.
- seqReplaceAll
[Ω]
{γ : Type}
[ToTyp γ]
(s pat repl : Term (Array γ))
: OnSeq γ
Replaces every occurrence of a sub-sequence.
- seqRev
[Ω]
{γ : Type}
[ToTyp γ]
(s : Term (Array γ))
: OnSeq γ
Reversal.
Instances For
Seq's operators, taken apart one level, indexed by the sort each produces.
- seq
[Ω]
(γ : Typ)
: OnSeq γ.Denote → View.Seq (Typ.seq (Typ?.typ γ))
An operator with a result of sort
Seq. - int
[Ω]
: OnInt → View.Seq Typ.int
An operator with a result of sort
Int. - any
[Ω]
{τ : Typ}
: OnAny τ.Denote → View.Seq τ
An operator whose result's sort is a type variable.
- bool
[Ω]
: OnBool → View.Seq Typ.bool
An operator with a result of sort
Bool.
Instances For
Seq's operators with a result of sort Bool.
- seqContains
[Ω]
(α : Typ)
(s sub : Term (Typ.seq (Typ?.typ α)).Denote)
: OnBool
Whether
scontainssub. - seqPrefix
[Ω]
(α : Typ)
(pre s : Term (Typ.seq (Typ?.typ α)).Denote)
: OnBool
Whether
preis a prefix ofs. - seqSuffix
[Ω]
(α : Typ)
(suf s : Term (Typ.seq (Typ?.typ α)).Denote)
: OnBool
Whether
sufis a suffix ofs.
Instances For
Values #
Whether a term is a sequence value, of kind CONST_SEQUENCE.
Such values are what a model answers; a sequence built from constructors, such as
seqConcat (seqUnit 0) (seqUnit 1), is not one even when its elements are values.
Equations
- term.isSeqValue = Cvc.Untyped.Term.isSeqValue term
Instances For
The elements a constant sequence term denotes.
Only a sequence value in cvc5's normal form, such as a model's answer, is accepted: a term built by
mkSeqValue is not one.
Equations
- term.getSeqValue = Cvc.Untyped.Term.getSeqValue term
Instances For
The elements a constant sequence term denotes.
Only a sequence value in cvc5's normal form, such as a model's answer, is accepted: a term built by
mkSeqValue is not one.
Instances For
The sequence term denoting an array of values.
Instances For
Equations
- Cvc.Typed.Term.instValueToTermArrayOfToTyp = { valueToTerm := fun [Cvc.Ω] => Cvc.Typed.Term.mkSeqValue }
Equations
- Cvc.Typed.Term.instTermToValueArray = { termToValue := fun [Cvc.Ω] => Cvc.Typed.Term.getSeqValue }