spot.i 3.06 KB
Newer Older
1
2
3
4
5
%module spot

%include "std_string.i"
%include "std_list.i"

6
7
%import "buddy.i"

8
%{
9
10
11
12
13
14
15
16
17
#include "ltlast/formula.hh"
#include "ltlast/refformula.hh"
#include "ltlast/atomic_prop.hh"
#include "ltlast/binop.hh"
#include "ltlast/constant.hh"
#include "ltlast/multop.hh"
#include "ltlast/unop.hh"
#include "ltlast/visitor.hh"

18
19
#include "ltlenv/environment.hh"
#include "ltlenv/defaultenv.hh"
20

21
22
23
#include "ltlparse/public.hh"

#include "ltlvisit/clone.hh"
24
#include "ltlvisit/destroy.hh"
25
26
27
28
29
#include "ltlvisit/dotty.hh"
#include "ltlvisit/dump.hh"
#include "ltlvisit/lunabbrev.hh"
#include "ltlvisit/nenoform.hh"
#include "ltlvisit/tostring.hh"
30
#include "ltlvisit/tunabbrev.hh"
31

32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include "tgba/bdddict.hh"
#include "tgba/bddprint.hh"
#include "tgba/state.hh"
#include "tgba/succiter.hh"
#include "tgba/tgba.hh"
#include "tgba/statebdd.hh"
#include "tgba/tgbabddcoredata.hh"
#include "tgba/succiterconcrete.hh"
#include "tgba/tgbabddconcrete.hh"
#include "tgba/tgbaexplicit.hh"
#include "tgba/tgbaproduct.hh"
#include "tgba/tgbatba.hh"

#include "tgbaalgos/ltl2tgba.hh"
#include "tgbaalgos/dotty.hh"
#include "tgbaalgos/lbtt.hh"
#include "tgbaalgos/magic.hh"
#include "tgbaalgos/save.hh"

51
using namespace spot::ltl;
52
using namespace spot;
53
54
%}

55
56
57
58
59
60
61
62
63
%include "ltlast/formula.hh"
%include "ltlast/refformula.hh"
%include "ltlast/atomic_prop.hh"
%include "ltlast/binop.hh"
%include "ltlast/constant.hh"
%include "ltlast/multop.hh"
%include "ltlast/unop.hh"
%include "ltlast/visitor.hh"

64
65
%include "ltlenv/environment.hh"
%include "ltlenv/defaultenv.hh"
66

67
68
69
%include "ltlparse/public.hh"

%include "ltlvisit/clone.hh"
70
%include "ltlvisit/destroy.hh"
71
72
73
74
75
%include "ltlvisit/dotty.hh"
%include "ltlvisit/dump.hh"
%include "ltlvisit/lunabbrev.hh"
%include "ltlvisit/nenoform.hh"
%include "ltlvisit/tostring.hh"
76
77
%include "ltlvisit/tunabbrev.hh"

78
%feature("new") spot::ltl_to_tgba;
79
80
81
%feature("new") spot::tgba::get_init_state;
%feature("new") spot::tgba::succ_iter;
%feature("new") spot::tgba_succ_iterator::current_state;
82

83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
// Help SWIG with namespace lookups.
#define ltl spot::ltl
%include "tgba/bdddict.hh"
%include "tgba/bddprint.hh"
%include "tgba/state.hh"
%include "tgba/succiter.hh"
%include "tgba/tgba.hh"
%include "tgba/statebdd.hh"
%include "tgba/tgbabddcoredata.hh"
%include "tgba/succiterconcrete.hh"
%include "tgba/tgbabddconcrete.hh"
%include "tgba/tgbaexplicit.hh"
%include "tgba/tgbaproduct.hh"
%include "tgba/tgbatba.hh"

%include "tgbaalgos/ltl2tgba.hh"
%include "tgbaalgos/dotty.hh"
%include "tgbaalgos/lbtt.hh"
%include "tgbaalgos/magic.hh"
%include "tgbaalgos/save.hh"
#undef ltl
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121

%extend spot::ltl::formula {

  // When comparing formula, make sure Python compare our
  // pointers, not the pointers to its wrappers.
  int
  __cmp__(const spot::ltl::formula* b)
  {
    return b - self;
  }

  std::string
  __str__(void)
  {
    return spot::ltl::to_string(self);
  }

}
122
123
124

%inline %{

125
spot::ltl::parse_error_list
126
127
128
129
130
131
empty_parse_error_list()
{
  parse_error_list l;
  return l;
}

132
std::ostream&
133
134
135
136
137
get_cout()
{
  return std::cout;
}

138
std::ostream&
139
140
141
142
143
get_cerr()
{
  return std::cerr;
}

144
void
145
146
147
148
print_on(std::ostream& on, const std::string& what)
{
  on << what;
}
149

150
%}