mirror of
https://github.com/Z3Prover/z3
synced 2025-09-02 00:00:41 +00:00
Reorganizing the code
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
3003ee5cb6
commit
dcf778a287
120 changed files with 10 additions and 4 deletions
|
@ -44,7 +44,6 @@ Revision History:
|
|||
#include"dl_compiler.h"
|
||||
#include"dl_instruction.h"
|
||||
#include"dl_context.h"
|
||||
#include"dl_simplifier_plugin.h"
|
||||
#include"dl_smt_relation.h"
|
||||
#ifndef _EXTERNAL_RELEASE
|
||||
#include"dl_skip_table.h"
|
||||
|
|
|
@ -1,64 +0,0 @@
|
|||
/*++
|
||||
Copyright (c) 2010 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
dl_simplifier_plugin.cpp
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Nikolaj Bjorner (nbjorner) 2010-08-10
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
|
||||
#include"dl_simplifier_plugin.h"
|
||||
|
||||
namespace datalog {
|
||||
|
||||
dl_simplifier_plugin::dl_simplifier_plugin(ast_manager& m)
|
||||
: simplifier_plugin(symbol("datalog_relation"), m),
|
||||
m_util(m)
|
||||
{}
|
||||
|
||||
bool dl_simplifier_plugin::reduce(
|
||||
func_decl * f, unsigned num_args, expr* const* args, expr_ref& result) {
|
||||
uint64 v1, v2;
|
||||
switch(f->get_decl_kind()) {
|
||||
case OP_DL_LT:
|
||||
if (m_util.try_get_constant(args[0], v1) &&
|
||||
m_util.try_get_constant(args[1], v2)) {
|
||||
result = (v1 < v2)?m_manager.mk_true():m_manager.mk_false();
|
||||
return true;
|
||||
}
|
||||
// x < x <=> false
|
||||
if (args[0] == args[1]) {
|
||||
result = m_manager.mk_false();
|
||||
return true;
|
||||
}
|
||||
// x < 0 <=> false
|
||||
if (m_util.try_get_constant(args[1], v2) && v2 == 0) {
|
||||
result = m_manager.mk_false();
|
||||
return true;
|
||||
}
|
||||
// 0 < x <=> 0 != x
|
||||
if (m_util.try_get_constant(args[1], v1) && v1 == 0) {
|
||||
result = m_manager.mk_not(m_manager.mk_eq(args[0], args[1]));
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
/*++
|
||||
Copyright (c) 2010 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
dl_simplifier_plugin.h
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Nikolaj Bjorner (nbjorner) 2010-08-10
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _DL_SIMPLIFIER_PLUGIN_H_
|
||||
#define _DL_SIMPLIFIER_PLUGIN_H_
|
||||
|
||||
#include"dl_decl_plugin.h"
|
||||
#include "simplifier_plugin.h"
|
||||
|
||||
namespace datalog {
|
||||
|
||||
class dl_simplifier_plugin : public simplifier_plugin {
|
||||
dl_decl_util m_util;
|
||||
public:
|
||||
dl_simplifier_plugin(ast_manager& m);
|
||||
|
||||
virtual bool reduce(func_decl * f, unsigned num_args, expr* const* args, expr_ref& result);
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
#endif /* _DL_SIMPLIFIER_PLUGIN_H_ */
|
||||
|
|
@ -29,7 +29,7 @@ Revision History:
|
|||
#include "pdr_util.h"
|
||||
#include "pdr_farkas_learner.h"
|
||||
#include "th_rewriter.h"
|
||||
#include "smtparser.h"
|
||||
// #include "smtparser.h"
|
||||
#include "pdr_interpolant_provider.h"
|
||||
#include "ast_ll_pp.h"
|
||||
#include "arith_bounds_tactic.h"
|
||||
|
@ -858,6 +858,8 @@ namespace pdr {
|
|||
|
||||
|
||||
void farkas_learner::test(char const* filename) {
|
||||
#if 0
|
||||
// [Leo]: disabled because it uses an external component: SMT 1.0 parser
|
||||
if (!filename) {
|
||||
test();
|
||||
return;
|
||||
|
@ -886,6 +888,7 @@ namespace pdr {
|
|||
expr_ref_vector lemmas(m);
|
||||
bool res = fl.get_lemma_guesses(A, B, lemmas);
|
||||
std::cout << "lemmas: " << pp_cube(lemmas, m) << "\n";
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue