Commits

Nikolaj Bjorner committed cec8514

fix model completion bug in PDR, addhoc handling of reals for arithmetic realizers

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

Comments (0)

Files changed (2)

src/muz_qe/pdr_context.cpp

     void context::create_children(model_node& n) {        
         SASSERT(n.level() > 0);
         bool use_model_generalizer = m_params.get_bool(":use-model-generalizer", false);
+        datalog::scoped_no_proof _sc(m);
  
         pred_transformer& pt = n.pt();
         model_ref M = n.get_model_ptr();
         if (!vars.empty()) {
             // also fresh names for auxiliary variables in body?
             expr_substitution sub(m);
+            expr_ref_vector refs(m);
             expr_ref tmp(m);
             proof_ref pr(m);
             pr = m.mk_asserted(m.mk_true());
-
             for (unsigned i = 0; i < vars.size(); ++i) {                
-                M->eval(vars[i]->get_decl(), tmp);                
+                VERIFY (M->eval(vars[i].get(), tmp, true));                
+                refs.push_back(tmp);
                 sub.insert(vars[i].get(), tmp, pr);
             }
             if (!rep) rep = mk_expr_simp_replacer(m);

src/muz_qe/qe_arith_plugin.cpp

                 // x := coeff * x + s
                 def = m_util.mk_add(m_util.mk_mul(x_t.get_coeff(), def), x_t.get_term());
             }
+            if (is_strict) {
+                SASSERT(m_util.m_arith.is_real(x));
+                // We actually want a supremum, such that dual inequalities are satisfied.
+                // i.e. for every dual inequality , if the dual bound is feasible, make sure to
+                // choose a value in the feasible range.
+                def = m_util.mk_sub(def, m_util.mk_one(x));
+            }
 
             m_util.simplify(def);
 
 
-            TRACE("qe", tout << "TBD: " << a << " " << mk_pp(def, m) << "\n";);
+            TRACE("qe", tout << "TBD (for Real): " << a << " " << mk_pp(def, m) << "\n";);
         }
 
         expr_ref mk_not(expr* e) {
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.