Minor improvements for alpha equivalence and partial quantifier elimination in increm...
[cvc5.git] / src / theory / quantifiers / alpha_equivalence.h
1 /********************* */
2 /*! \file alpha_equivalence.h
3 ** \verbatim
4 ** Top contributors (to current version):
5 ** Andrew Reynolds, Tim King
6 ** This file is part of the CVC4 project.
7 ** Copyright (c) 2009-2016 by the authors listed in the file AUTHORS
8 ** in the top-level source directory) and their institutional affiliations.
9 ** All rights reserved. See the file COPYING in the top-level source
10 ** directory for licensing information.\endverbatim
11 **
12 ** \brief Alpha equivalence checking
13 **/
14
15 #include "cvc4_private.h"
16
17 #ifndef __CVC4__ALPHA_EQUIVALENCE_H
18 #define __CVC4__ALPHA_EQUIVALENCE_H
19
20
21 #include "theory/quantifiers_engine.h"
22
23 namespace CVC4 {
24 namespace theory {
25 namespace quantifiers {
26
27 class AlphaEquivalenceNode {
28 public:
29 std::map< Node, std::map< int, AlphaEquivalenceNode > > d_children;
30 Node d_quant;
31 static Node registerNode( AlphaEquivalenceNode* aen, QuantifiersEngine* qe, Node q, std::vector< Node >& tt, std::vector< int >& arg_index );
32 };
33
34 class AlphaEquivalenceTypeNode {
35 public:
36 std::map< TypeNode, std::map< int, AlphaEquivalenceTypeNode > > d_children;
37 AlphaEquivalenceNode d_data;
38 static Node registerNode( AlphaEquivalenceTypeNode* aetn,
39 QuantifiersEngine* qe, Node q, Node t, std::vector< TypeNode >& typs, std::map< TypeNode, int >& typ_count, int index = 0 );
40 };
41
42 class AlphaEquivalence {
43 private:
44 QuantifiersEngine* d_qe;
45 //per # of variables per type
46 AlphaEquivalenceTypeNode d_ae_typ_trie;
47 public:
48 AlphaEquivalence( QuantifiersEngine* qe ) : d_qe( qe ){}
49 ~AlphaEquivalence(){}
50 /** reduce quantifier, return value (if non-null) is lemma justifying why q ia reducible. */
51 Node reduceQuantifier( Node q );
52 };
53
54 }
55 }
56 }
57
58 #endif