mirror of
https://github.com/Z3Prover/z3
synced 2025-05-09 00:35:47 +00:00
Z3 sources
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
3f9edad676
commit
e9eab22e5c
1186 changed files with 381859 additions and 0 deletions
65
lib/dl_rule_subsumption_index.h
Normal file
65
lib/dl_rule_subsumption_index.h
Normal file
|
@ -0,0 +1,65 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
dl_rule_subsumption_index.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Subsumption index for rules.
|
||||
Currently an underapproximation (fails to identify some subsumptions).
|
||||
|
||||
Author:
|
||||
|
||||
Krystof Hoder (t-khoder) 2011-10-10.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _DL_RULE_SUBSUMPTION_INDEX_H_
|
||||
#define _DL_RULE_SUBSUMPTION_INDEX_H_
|
||||
|
||||
#include "dl_context.h"
|
||||
|
||||
namespace datalog {
|
||||
|
||||
class rule_subsumption_index {
|
||||
//private and undefined copy constroctor
|
||||
rule_subsumption_index(rule_subsumption_index const&);
|
||||
//private and undefined operator=
|
||||
rule_subsumption_index& operator=(rule_subsumption_index const&);
|
||||
|
||||
typedef obj_hashtable<app> app_set;
|
||||
|
||||
ast_manager & m;
|
||||
context & m_context;
|
||||
|
||||
rule_ref_vector m_ref_holder;
|
||||
|
||||
obj_map<func_decl, app_set *> m_unconditioned_heads;
|
||||
|
||||
hashtable<rule *, rule_hash_proc, rule_eq_proc> m_rule_set;
|
||||
|
||||
void handle_unconditioned_rule(rule * r);
|
||||
|
||||
public:
|
||||
rule_subsumption_index(context & ctx) :
|
||||
m(ctx.get_manager()),
|
||||
m_context(ctx),
|
||||
m_ref_holder(ctx.get_rule_manager()) {}
|
||||
|
||||
~rule_subsumption_index() {
|
||||
reset_dealloc_values(m_unconditioned_heads);
|
||||
}
|
||||
|
||||
void add(rule * r);
|
||||
bool is_subsumed(rule * r);
|
||||
bool is_subsumed(app * query);
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
#endif /* _DL_RULE_SUBSUMPTION_INDEX_H_ */
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue