mirror of
https://github.com/Z3Prover/z3
synced 2025-04-15 05:18:44 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
6a50f10b8b
commit
18374aa12a
|
@ -101,9 +101,10 @@ public:
|
|||
resize_data(0);
|
||||
#if _WINDOWS
|
||||
errno_t err = fopen_s(&m_file, fname, "rb");
|
||||
m_ok = err == 0;
|
||||
m_ok = (m_file != NULL) && (err == 0);
|
||||
#else
|
||||
m_file = fopen(fname, "rb");
|
||||
m_ok = (m_file != NULL);
|
||||
#endif
|
||||
}
|
||||
~line_reader() {
|
||||
|
|
|
@ -62,8 +62,9 @@ void dl_context_saturate_file(params_ref & params, const char * f) {
|
|||
ctx.updt_params(params);
|
||||
|
||||
datalog::parser * parser = datalog::parser::create(ctx, m);
|
||||
if (!parser->parse_file(f)) {
|
||||
if (!parser || !parser->parse_file(f)) {
|
||||
warning_msg("ERROR: failed to parse file");
|
||||
dealloc(parser);
|
||||
return;
|
||||
}
|
||||
dealloc(parser);
|
||||
|
|
|
@ -64,7 +64,7 @@ void dl_query_test(ast_manager & m, smt_params & fparams, params_ref& params,
|
|||
ctx_q.updt_params(params);
|
||||
{
|
||||
parser* p = parser::create(ctx_q,m);
|
||||
bool ok = p->parse_file(problem_file);
|
||||
bool ok = p && p->parse_file(problem_file);
|
||||
dealloc(p);
|
||||
if (!ok) {
|
||||
std::cout << "Could not parse: " << problem_file << "\n";
|
||||
|
|
|
@ -27,7 +27,7 @@ struct test_model_search {
|
|||
};
|
||||
|
||||
ast_manager m;
|
||||
smt_params smt_params;
|
||||
smt_params m_smt_params;
|
||||
fixedpoint_params fp_params;
|
||||
context ctx;
|
||||
manager pm;
|
||||
|
@ -40,8 +40,8 @@ struct test_model_search {
|
|||
|
||||
|
||||
test_model_search():
|
||||
ctx(smt_params, fp_params, m),
|
||||
pm(smt_params, 10, m),
|
||||
ctx(m_smt_params, fp_params, m),
|
||||
pm(m_smt_params, 10, m),
|
||||
fn(m),
|
||||
initt(fn),
|
||||
pt(ctx, pm, fn),
|
||||
|
|
Loading…
Reference in a new issue