我一直在使用ConstInterp来获取expr中的常量字面值。Model :: ConstInterp和Model :: Eval有什么区别?
model.ConstInterp(lit)
但是我有一个奇怪的错误
... <body of some loop>
let x = model.ConstInterp(lit)
if solver.Check() == Status.SATISFIABLE
then model.ConstInterp(lit)
的秒调用ConstInterp产生一个错误
Unhandled Exception: Microsoft.Z3.Z3Exception: invalid argument
at Microsoft.Z3.Native.Z3_model_get_const_interp(IntPtr a0,IntPtr a1,IntPtr a2)
at Microsoft.Z3.Model.ConstInterp(FuncDecl f)
at Microsoft.Z3.Model.ConstInterp(Expr a)
但是相同的代码评估和演示,而不是ConstInterp的罚款。我错误地使用了ConstInterp吗?