mirror of
https://github.com/Z3Prover/z3
synced 2025-04-07 18:05:21 +00:00
35 lines
556 B
C++
35 lines
556 B
C++
/*++
|
|
Copyright (c) 2011 Microsoft Corporation
|
|
|
|
Module Name:
|
|
|
|
model_core.cpp
|
|
|
|
Abstract:
|
|
|
|
Base class for models.
|
|
|
|
Author:
|
|
|
|
Leonardo de Moura (leonardo) 2011-04-30.
|
|
|
|
Revision History:
|
|
|
|
--*/
|
|
#include"model_core.h"
|
|
|
|
bool model_core::eval(func_decl* f, expr_ref & r) const {
|
|
if (f->get_arity() == 0) {
|
|
r = get_const_interp(f);
|
|
return r != 0;
|
|
}
|
|
else {
|
|
func_interp * fi = get_func_interp(f);
|
|
if (fi != 0) {
|
|
r = fi->get_interp();
|
|
return r != 0;
|
|
}
|
|
return false;
|
|
}
|
|
}
|