jSIMLIB 检查器打印出本质上是 lisp 代码的 s 表达式代码
(set-option :print-success false)
(set-logic QF_LIA)
(declare-fun RETURN () Int)
(declare-fun refs_1_SYMINT () Int)
(declare-fun flags_2_SYMINT () Int)
(assert+ ( and ( or ( and (/= flags_2_SYMINT 0) (and (= RETURN flags_2_SYMINT)) ) ( and (/= refs_1_SYMINT 0) (and (= flags_2_SYMINT 0)) (and (= RETURN refs_1_SYMINT)) ) ( and (and (= refs_1_SYMINT 0)) (and (= flags_2_SYMINT 0)) (and (= RETURN 100)) ) ) ( not ( or ( and (/= flags_2_SYMINT 0) (and (= RETURN flags_2_SYMINT)) ) ( and (/= refs_1_SYMINT 0) (and (= flags_2_SYMINT 0)) (and (= RETURN refs_1_SYMINT)) ) ( and (and (= refs_1_SYMINT 0)) (and (= flags_2_SYMINT 0)) (and (= RETURN 10)) ) ) ) ) )
(check)
(exit)
如何格式化代码,最好使用 emacs 或 TextMate?例如:
(set-option :print-success false)
(set-logic QF_LIA)
(declare-fun RETURN () Int)
(declare-fun refs_1_SYMINT () Int)
(declare-fun flags_2_SYMINT () Int)
(assert
(and
(and
(and
(distinct flags_2_SYMINT 0)
(= RETURN flags_2_SYMINT))
(= refs_1_SYMINT refs1_1_SYMINT)
(= flags_2_SYMINT flags1_2_SYMINT))
(not
(and
(distinct flags_2_SYMINT 0)
(= RETURN flags_2_SYMINT)))))
(check-sat)