Creating List in z3 using function
问题 I'm trying to convert this piece of pseudocode to SMT-LIB language, but I got stuck. List function my_fun(int x) { list = nil for(i in 1 to x): if(some_condition_on_i) list.concat(i) return list } what I've done so far is this: (declare-const l1 (List Int)) (define-fun my_fun ((x Int)) (List Int) (forall ((t Int)) (ite (and (some_condition_on_t) (< t x)) (insert t l1) l1 ) ) ) ) which I know it is wrong, and does not work. can you help me to understand how can I do this? 回答1: SMT-LIB models