summaryrefslogtreecommitdiff
path: root/src/util/command.h
blob: c6778f34a379a32be1adf2c02751877c9e55da56 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*********************                                           -*- C++ -*-  */
/** command.h
 ** This file is part of the CVC4 prototype.
 ** Copyright (c) 2009 The Analysis of Computer Systems Group (ACSys)
 ** Courant Institute of Mathematical Sciences
 ** New York University
 ** See the file COPYING in the top-level source directory for licensing
 ** information.
 **
 **/

#ifndef __CVC4__COMMAND_H
#define __CVC4__COMMAND_H

#include "cvc4.h"

namespace CVC4
{

class SmtEngine;

class Command
{
  public:
    virtual void invoke(CVC4::SmtEngine* smt_engine) = 0;
    virtual ~Command() {};
};

class EmptyCommand : public Command
{
  public:
    virtual void invoke(CVC4::SmtEngine* smt_engine);
};

class AssertCommand: public Command
{
  public:
    AssertCommand(const Expr& e);
    void invoke(CVC4::SmtEngine* smt_engine);
  protected:
    Expr d_expr;
};

class CheckSatCommand: public Command
{
  public:
    CheckSatCommand();
    CheckSatCommand(const Expr& e);
    void invoke(CVC4::SmtEngine* smt);
  protected:
    Expr d_expr;
};

class QueryCommand: public Command
{
  public:
    QueryCommand(const Expr& e);
    void invoke(CVC4::SmtEngine* smt);
  protected:
    Expr d_expr;
};

class CommandSequence: public Command
{
  public:
    CommandSequence();
    CommandSequence(Command* cmd);
    ~CommandSequence();
    void invoke(CVC4::SmtEngine* smt);
    void addCommand(Command* cmd);
  private:
    /** All the commands to be executed (in sequence) */
    std::vector<Command*> d_command_sequence;
    /** Next command to be executed */
    unsigned int d_last_index;
};

}/* CVC4 namespace */

#endif /* __CVC4__COMMAND_H */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback