mirror of
https://github.com/Z3Prover/z3
synced 2025-08-14 06:45:25 +00:00
updates to seq and bug fixes (#4056)
* na Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * fix #4037 * nicer output for skolem functions * more overhaul of seq, some bug fixes * na * added offset_eq file * na * fix #4044 * fix #4040 * fix #4045 * updated ignore * new rewrites for indexof based on #4036 * add shortcuts * updated ne solver for seq, fix #4025 * use pair vectors for equalities that are reduced by seq_rewriter * use erase_and_swap * remove unit-walk * na * add check for #3200 * nits Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * name a type Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * remove fp check Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * remove unsound axiom instantiation for non-contains Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * fix rewrites Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * fix #4053 Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * fix #4052 Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
53c14bd554
commit
95a78b2450
39 changed files with 1516 additions and 1654 deletions
55
src/smt/seq_offset_eq.h
Normal file
55
src/smt/seq_offset_eq.h
Normal file
|
@ -0,0 +1,55 @@
|
|||
/*++
|
||||
Copyright (c) 2011 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
seq_offset_eq.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Container for maintaining equalities between lengths of sequences.
|
||||
|
||||
Author:
|
||||
|
||||
Thai Minh Trinh 2017
|
||||
Nikolaj Bjorner (nbjorner) 2020-4-16
|
||||
|
||||
--*/
|
||||
#pragma once
|
||||
|
||||
#include "util/obj_pair_hashtable.h"
|
||||
#include "ast/seq_decl_plugin.h"
|
||||
#include "ast/arith_decl_plugin.h"
|
||||
#include "smt/smt_theory.h"
|
||||
|
||||
namespace smt {
|
||||
|
||||
class seq_offset_eq {
|
||||
theory& th;
|
||||
ast_manager& m;
|
||||
seq_util seq;
|
||||
arith_util a;
|
||||
obj_hashtable<enode> m_has_offset_equality;
|
||||
obj_pair_map<enode, enode, int> m_offset_equalities;
|
||||
int m_propagation_level;
|
||||
|
||||
bool match_x_minus_y(expr* e, expr*& x, expr*& y) const;
|
||||
void len_offset(expr* e, int val);
|
||||
void prop_arith_to_len_offset();
|
||||
|
||||
public:
|
||||
|
||||
seq_offset_eq(theory& th, ast_manager& m);
|
||||
bool empty() const { return m_offset_equalities.empty(); }
|
||||
/**
|
||||
\breif determine if r1 = r2 + offset
|
||||
*/
|
||||
bool find(enode* r1, enode* r2, int& offset) const;
|
||||
bool contains(enode* r1, enode* r2) const { int offset = 0; return find(r1, r2, offset); }
|
||||
bool contains(enode* r);
|
||||
bool propagate();
|
||||
void pop_scope_eh(unsigned num_scopes);
|
||||
};
|
||||
|
||||
};
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue