Equations
- Cvc.Srt.instOrdKind = { compare := Cvc.Srt.ordKind✝ }
A cvc sort, Sort-coercion realized by Srt.toType.
- abstract
(kind : Kind)
: Srt
An abstract sort.
- array
(idx elm : Srt)
: Srt
Total map from an index sort to an element sort.
Called array in SMT-LIB/cvc.
- bag
(elm : Srt)
: Srt
A multi-set/bag of elements.
- bool : Srt
Boolean sort.
- bitVec
(size : Nat)
: Srt
Sort of bit-vectors of length
size. - finiteField
(size : Nat)
: Srt
Finite field sort.
- float
(exp sig : UInt32)
: Srt
Floating-point sort.
- function
(dom cod : Srt)
: Srt
Function sort.
Cvc5 actually takes an array of domains, and I think, does not allow the codomain to be a function sort. We're trying to adapt cvc5 sorts for a lean world by pretending they behave as lean function types.
- int : Srt
Integer sort.
- prod
(lft rgt : Srt)
: Srt
Product sort.
Cvc5 has a notion of tuple or arity
[0, ∞[, but that maps terribly to lean types. The goal with this constructor is to limitSrtcreation to only (binary) products. - real : Srt
Real sort.
- regex : Srt
Regular expression sort.
- roundingMode : Srt
Rounding mode sort.
- seq
(elm : Srt)
: Srt
Array sort, called sequence in SMT-LIB/cvc.
- set
(elm : Srt)
: Srt
Set sort.
- string : Srt
String sort.
- unit : Srt
Unit sort.
- uninterpreted
(name : String)
: Srt
An uninterpreted sort.
Instances For
Equations
- Cvc.Srt.instInhabitedKind = { default := Cvc.Srt.Kind.abstract }
Equations
- Cvc.instHashableSrt = { hash := Cvc.hashSrt✝ }
Turns a sort into a sort kind.
Equations
- (Cvc.Srt.abstract a).kind = Cvc.Srt.Kind.abstract
- (a.array a_1).kind = Cvc.Srt.Kind.array
- a.bag.kind = Cvc.Srt.Kind.bag
- Cvc.Srt.bool.kind = Cvc.Srt.Kind.bool
- (Cvc.Srt.bitVec a).kind = Cvc.Srt.Kind.bitVec
- (Cvc.Srt.finiteField a).kind = Cvc.Srt.Kind.finiteField
- (Cvc.Srt.float a a_1).kind = Cvc.Srt.Kind.float
- (a.function a_1).kind = Cvc.Srt.Kind.function
- Cvc.Srt.int.kind = Cvc.Srt.Kind.int
- (a.prod a_1).kind = Cvc.Srt.Kind.prod
- Cvc.Srt.real.kind = Cvc.Srt.Kind.real
- Cvc.Srt.regex.kind = Cvc.Srt.Kind.regex
- Cvc.Srt.roundingMode.kind = Cvc.Srt.Kind.roundingMode
- a.seq.kind = Cvc.Srt.Kind.seq
- a.set.kind = Cvc.Srt.Kind.set
- Cvc.Srt.string.kind = Cvc.Srt.Kind.string
- Cvc.Srt.unit.kind = Cvc.Srt.Kind.unit
- (Cvc.Srt.uninterpreted a).kind = Cvc.Srt.Kind.uninterpreted
Instances For
Equations
- Cvc.instInhabitedSrt = { default := Cvc.Srt.abstract default }
Equations
- Cvc.Srt.Kind.instToString = { toString := Cvc.Srt.Kind.toString }
String representation.
Equations
- Cvc.Srt.Kind.abstract.toString = "abstract"
- Cvc.Srt.Kind.array.toString = "array"
- Cvc.Srt.Kind.bag.toString = "bag"
- Cvc.Srt.Kind.bool.toString = "bool"
- Cvc.Srt.Kind.bitVec.toString = "bitVec"
- Cvc.Srt.Kind.finiteField.toString = "finiteField"
- Cvc.Srt.Kind.float.toString = "float"
- Cvc.Srt.Kind.function.toString = "function"
- Cvc.Srt.Kind.int.toString = "int"
- Cvc.Srt.Kind.prod.toString = "prod"
- Cvc.Srt.Kind.real.toString = "real"
- Cvc.Srt.Kind.regex.toString = "regex"
- Cvc.Srt.Kind.roundingMode.toString = "roundingMode"
- Cvc.Srt.Kind.seq.toString = "seq"
- Cvc.Srt.Kind.set.toString = "set"
- Cvc.Srt.Kind.string.toString = "string"
- Cvc.Srt.Kind.unit.toString = "unit"
- Cvc.Srt.Kind.uninterpreted.toString = "uninterpreted"
Instances For
Turns itself into an unsafe sort.
Equations
- Cvc.Srt.Kind.abstract.toSort = cvc5.SortKind.ABSTRACT_SORT
- Cvc.Srt.Kind.array.toSort = cvc5.SortKind.ARRAY_SORT
- Cvc.Srt.Kind.bag.toSort = cvc5.SortKind.BAG_SORT
- Cvc.Srt.Kind.bool.toSort = cvc5.SortKind.BOOLEAN_SORT
- Cvc.Srt.Kind.bitVec.toSort = cvc5.SortKind.BITVECTOR_SORT
- Cvc.Srt.Kind.finiteField.toSort = cvc5.SortKind.FINITE_FIELD_SORT
- Cvc.Srt.Kind.float.toSort = cvc5.SortKind.FLOATINGPOINT_SORT
- Cvc.Srt.Kind.function.toSort = cvc5.SortKind.FUNCTION_SORT
- Cvc.Srt.Kind.int.toSort = cvc5.SortKind.INTEGER_SORT
- Cvc.Srt.Kind.prod.toSort = cvc5.SortKind.TUPLE_SORT
- Cvc.Srt.Kind.real.toSort = cvc5.SortKind.REAL_SORT
- Cvc.Srt.Kind.regex.toSort = cvc5.SortKind.REGLAN_SORT
- Cvc.Srt.Kind.roundingMode.toSort = cvc5.SortKind.ROUNDINGMODE_SORT
- Cvc.Srt.Kind.seq.toSort = cvc5.SortKind.SEQUENCE_SORT
- Cvc.Srt.Kind.set.toSort = cvc5.SortKind.SET_SORT
- Cvc.Srt.Kind.string.toSort = cvc5.SortKind.STRING_SORT
- Cvc.Srt.Kind.unit.toSort = cvc5.SortKind.TUPLE_SORT
- Cvc.Srt.Kind.uninterpreted.toSort = cvc5.SortKind.UNINTERPRETED_SORT
Instances For
Turns a sort into a sort kind.
Equations
Instances For
Equations
- Cvc.Srt.instHashableKind = { hash := Cvc.Srt.hashKind✝ }
DecidableEq instance #
Equations
- One or more equations did not get rendered due to their size.
- Cvc.Srt.instDecidableEqListSrt [] (head :: tail) = isFalse ⋯
- Cvc.Srt.instDecidableEqListSrt (head :: tail) [] = isFalse ⋯
- Cvc.Srt.instDecidableEqListSrt [] [] = isTrue Cvc.Srt.instDecidableEqListSrt._proof_8
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Specifies how to paren the string representation of a sort.
This only impacts the sort's top-level, paren for sub-sorts are decided by their super-sorts.
- none : Paren
Don't paren the sort at all.
- ifFunction : Paren
Only paren if it's a function.
- ifArgs : Paren
Only paren argument-having type constructors such as
(Array Bool). - composite : Paren
Always paren composite sorts
(Array Bool)but not leaf-sortsBool.
Instances For
Equations
Equations
Equations
- Cvc.Srt.toString.instOrdParen = { compare := Cvc.Srt.toString.ordParen✝ }
Equations
- self.apply? Cvc.Srt.toString.Paren.none = false
- self.apply? Cvc.Srt.toString.Paren.ifFunction = self.fun?
- self.apply? Cvc.Srt.toString.Paren.ifArgs = self.args?
- self.apply? Cvc.Srt.toString.Paren.composite = decide (self = Cvc.Srt.toString.Paren.composite)
Instances For
String representation.
Constructor from unsafe sorts.
This function recurses on sub-sorts retrieved by FFI: there is no chance to prove it terminates.
Hence the maxDepth optional parameter that sets an upper-bound on the recursion depth, causing
this function to crash if maxDepth is reached.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Cvc.Srt.ofSort.failKind k = Cvc.Res.failInternal (toString "unexpected sort-kind `" ++ toString k ++ toString "`")
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Cvc.Srt.ofSort.aux maxDepth sort 0 = Cvc.Res.failUser (toString "maximum depth `" ++ toString maxDepth ++ toString "` reached")
Instances For
Equations
- Cvc.Srt.ofSort.aux.doit acc [] = acc Cvc.Srt.unit
- Cvc.Srt.ofSort.aux.doit acc [srt] = srt
- Cvc.Srt.ofSort.aux.doit acc (hd :: head :: tail) = Cvc.Srt.ofSort.aux.doit (fun (x : Cvc.Srt) => acc (hd.prod x)) (head :: tail)
Instances For
Equations
- (dom.function cod).isFunction = true
- x✝.isFunction = false