3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-13 12:28:44 +00:00
z3/src/api/api_datalog.h
Nikolaj Bjorner 4bc044c982 update header guards to be C++ style. Fixes issue #9
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-07-08 23:18:40 -07:00

49 lines
1.2 KiB
C++

/*++
Copyright (c) 2012 Microsoft Corporation
Module Name:
api_datalog.h
Abstract:
Datalog API
old external_relation_context_impl
Author:
Leonardo de Moura (leonardo) 2012-02-29.
Revision History:
--*/
#ifndef API_DATALOG_H_
#define API_DATALOG_H_
#include"z3.h"
#include"ast.h"
#include"smt_params.h"
#include"smt_kernel.h"
#include"api_util.h"
typedef void (*reduce_app_callback_fptr)(void*, func_decl*, unsigned, expr*const*, expr**);
typedef void (*reduce_assign_callback_fptr)(void*, func_decl*, unsigned, expr*const*, unsigned, expr*const*);
namespace api {
class fixedpoint_context;
};
struct Z3_fixedpoint_ref : public api::object {
api::fixedpoint_context * m_datalog;
params_ref m_params;
Z3_fixedpoint_ref():m_datalog(0) {}
virtual ~Z3_fixedpoint_ref() { dealloc(m_datalog); }
};
inline Z3_fixedpoint_ref * to_fixedpoint(Z3_fixedpoint s) { return reinterpret_cast<Z3_fixedpoint_ref *>(s); }
inline Z3_fixedpoint of_datalog(Z3_fixedpoint_ref * s) { return reinterpret_cast<Z3_fixedpoint>(s); }
inline api::fixedpoint_context * to_fixedpoint_ref(Z3_fixedpoint s) { return to_fixedpoint(s)->m_datalog; }
#endif