mirror of
https://github.com/Z3Prover/z3
synced 2025-04-30 04:15:51 +00:00
bind variables in queries generated from Horn tactic to enforce that rule formulas don't contain free variables. Issue #328
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
aa777bd5c6
commit
b3e8020c88
5 changed files with 21 additions and 5 deletions
|
@ -7,7 +7,7 @@ Module Name:
|
|||
|
||||
Abstract:
|
||||
|
||||
Utility to find constants that are declard as varaibles.
|
||||
Utility to find constants that are declard as variables.
|
||||
|
||||
Author:
|
||||
|
||||
|
|
|
@ -973,7 +973,7 @@ namespace datalog {
|
|||
}
|
||||
}
|
||||
|
||||
void context::get_raw_rule_formulas(expr_ref_vector& rules, svector<symbol>& names, vector<unsigned> &bounds) {
|
||||
void context::get_raw_rule_formulas(expr_ref_vector& rules, svector<symbol>& names, unsigned_vector &bounds) {
|
||||
for (unsigned i = 0; i < m_rule_fmls.size(); ++i) {
|
||||
expr_ref r = bind_vars(m_rule_fmls[i].get(), true);
|
||||
rules.push_back(r.get());
|
||||
|
@ -988,7 +988,6 @@ namespace datalog {
|
|||
|
||||
// ensure that rules are all using bound variables.
|
||||
for (unsigned i = m_rule_fmls_head; i < m_rule_fmls.size(); ++i) {
|
||||
ptr_vector<sort> sorts;
|
||||
m_free_vars(m_rule_fmls[i].get());
|
||||
if (!m_free_vars.empty()) {
|
||||
rm.mk_rule(m_rule_fmls[i].get(), 0, m_rule_set, m_rule_names[i]);
|
||||
|
|
|
@ -377,7 +377,7 @@ namespace datalog {
|
|||
rule_set & get_rules() { flush_add_rules(); return m_rule_set; }
|
||||
|
||||
void get_rules_as_formulas(expr_ref_vector& fmls, expr_ref_vector& qs, svector<symbol>& names);
|
||||
void get_raw_rule_formulas(expr_ref_vector& fmls, svector<symbol>& names, vector<unsigned> &bounds);
|
||||
void get_raw_rule_formulas(expr_ref_vector& fmls, svector<symbol>& names, unsigned_vector &bounds);
|
||||
|
||||
void add_fact(app * head);
|
||||
void add_fact(func_decl * pred, const relation_fact & fact);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue