mirror of
https://github.com/Z3Prover/z3
synced 2025-12-08 04:52:26 +00:00
Spacer engine for HORN logic
The algorithms implemented in the engine are described in the following papers Anvesh Komuravelli, Nikolaj Bjørner, Arie Gurfinkel, Kenneth L. McMillan: Compositional Verification of Procedural Programs using Horn Clauses over Integers and Arrays. FMCAD 2015: 89-96 Nikolaj Bjørner, Arie Gurfinkel: Property Directed Polyhedral Abstraction. VMCAI 2015: 263-281 Anvesh Komuravelli, Arie Gurfinkel, Sagar Chaki: SMT-Based Model Checking for Recursive Programs. CAV 2014: 17-34
This commit is contained in:
parent
9f9dc5e19f
commit
5b9bf74787
54 changed files with 18050 additions and 3 deletions
66
src/muz/spacer/spacer_farkas_learner.h
Normal file
66
src/muz/spacer/spacer_farkas_learner.h
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
/*++
|
||||
Copyright (c) 2011 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
spacer_farkas_learner.h
|
||||
|
||||
Abstract:
|
||||
|
||||
SMT2 interface for the datalog SPACER
|
||||
|
||||
Author:
|
||||
|
||||
Krystof Hoder (t-khoder) 2011-11-1.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _SPACER_FARKAS_LEARNER_H_
|
||||
#define _SPACER_FARKAS_LEARNER_H_
|
||||
|
||||
#include "ast.h"
|
||||
|
||||
namespace spacer {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class farkas_learner {
|
||||
typedef obj_hashtable<expr> expr_set;
|
||||
|
||||
bool m_split_literals;
|
||||
|
||||
void combine_constraints(unsigned cnt, app * const * constrs, rational const * coeffs, expr_ref& res);
|
||||
|
||||
bool is_farkas_lemma(ast_manager& m, expr* e);
|
||||
|
||||
void get_asserted(proof* p, expr_set const& bs, ast_mark& b_closed, obj_hashtable<expr>& lemma_set, expr_ref_vector& lemmas);
|
||||
|
||||
bool is_pure_expr(func_decl_set const& symbs, expr* e, ast_manager& m) const;
|
||||
|
||||
public:
|
||||
farkas_learner(): m_split_literals(false) {}
|
||||
|
||||
/**
|
||||
Traverse a proof and retrieve lemmas using the vocabulary from bs.
|
||||
*/
|
||||
void get_lemmas(proof* root, expr_set const& bs, expr_ref_vector& lemmas);
|
||||
|
||||
void collect_statistics(statistics& st) const {}
|
||||
void reset_statistics() {}
|
||||
|
||||
|
||||
/** \brief see smt::farkas_util::set_split_literals */
|
||||
void set_split_literals(bool v) {m_split_literals = v;}
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue