3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-10 19:27:06 +00:00
z3/lib/theory_seq_empty.h
Leonardo de Moura e9eab22e5c Z3 sources
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2012-10-02 11:35:25 -07:00

42 lines
1.1 KiB
C++

/*++
Copyright (c) 2011 Microsoft Corporation
Module Name:
theory_seq_empty.h
Abstract:
<abstract>
Author:
Nikolaj Bjorner (nbjorner) 2011-14-11
Revision History:
--*/
#ifndef _THEORY_SEQ_EMPTY_H_
#define _THEORY_SEQ_EMPTY_H_
#include "smt_theory.h"
namespace smt {
class theory_seq_empty : public theory {
bool m_used;
virtual final_check_status final_check_eh() { return m_used?FC_GIVEUP:FC_DONE; }
virtual bool internalize_atom(app*, bool) { if (!m_used) { get_context().push_trail(value_trail<context,bool>(m_used)); m_used = true; } return false; }
virtual bool internalize_term(app*) { return internalize_atom(0,false); }
virtual void new_eq_eh(theory_var, theory_var) { }
virtual void new_diseq_eh(theory_var, theory_var) {}
virtual theory* mk_fresh(context*) { return alloc(theory_seq_empty, get_manager()); }
virtual char const * get_name() const { return "seq-empty"; }
public:
theory_seq_empty(ast_manager& m):theory(m.get_family_id("seq")), m_used(false) {}
};
};
#endif /* _THEORY_SEQ_EMPTY_H_ */