summaryrefslogtreecommitdiff
path: root/omegalib/omega_lib/include/omega/pres_quant.h
blob: 98c30df74d899f5580f9343b645dd5f0f4c4f835 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#if ! defined _pres_quant_h
#define _pres_quant_h 1

#include <omega/pres_decl.h>

namespace omega {

//
// Presburger formula nodes for quantifiers
//

class F_Exists : public F_Declaration {
public:
    inline Node_Type node_type() {return Op_Exists;}
    Variable_ID declare(Const_String s);
    Variable_ID declare();
    Variable_ID declare(Variable_ID v);
    virtual     void push_exists(Variable_ID_Tuple &S);

protected:
    friend class Formula;

    F_Exists(Formula *, Rel_Body *);
    F_Exists(Formula *, Rel_Body *, Variable_ID_Tuple &);

private:
    Formula *copy(Formula *parent, Rel_Body *reln);

    virtual Conjunct *find_available_conjunct();
    void print(FILE *output_file);
    void prefix_print(FILE *output_file, int debug = 1);
    void beautify();
    void rearrange();
    DNF* DNFize();
};


class F_Forall : public F_Declaration {
public:
    inline Node_Type node_type() {return Op_Forall;}
    Variable_ID declare(Const_String s);
    Variable_ID declare();
    Variable_ID declare(Variable_ID v);

protected:
    friend class Formula;

    F_Forall(Formula *, Rel_Body *);

private:
    Formula *copy(Formula *parent, Rel_Body *reln);

    virtual Conjunct *find_available_conjunct();
    void print(FILE *output_file);
    void prefix_print(FILE *output_file, int debug = 1);
    void beautify();
    void rearrange();
    DNF* DNFize();
};

} // namespace

#endif