clone.hh 805 Bytes
Newer Older
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
#ifndef SPOT_LTLVISIT_CLONE_HH
# define SPOT_LTLVISIT_CLONE_HH

#include "ltlast/formula.hh"
#include "ltlast/visitor.hh"

namespace spot 
{
  namespace ltl
  {
    // This visitor is public, because it's convenient
    // to derive from it and override part of its methods.
    class clone_visitor : public const_visitor
    {
    public:
      clone_visitor();
      virtual ~clone_visitor();

      formula* result() const;
      
      void visit(const atomic_prop* ap);
      void visit(const unop* uo);
      void visit(const binop* bo);
      void visit(const multop* mo);
      void visit(const constant* c);
	
      virtual formula* recurse(const formula* f);
      
    protected:
      formula* result_;
    };

    formula* clone(const formula* f);
  }
}

#endif // SPOT_LTLVISIT_LUNABBREV_HH