以下Z3代码超时的在线REPL: ; I want a function
(declare-fun f (Int) Int)
; I want it to be linear
(assert (forall ((a Int) (b Int)) (
= (+ (f a) (f b)) (f (+ a b))
)))
; I want f(2) == 4
(assert (=
我目前正在尝试使用Z3为具有多态列表的无类型语言编码简单程序逻辑。 据我所知,从the Z3 tutorial by Moura and Bjorner,不可能“嵌套在其他类型,如数组内的递归数据类型定义”。 因此,假设我有以下OCaml的类型: type value =
| Num of float
| String of string
| List of valu