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

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

%{
7
8
9
10
11
12
13
14
15
#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"

16
17
#include "ltlenv/environment.hh"
#include "ltlenv/defaultenv.hh"
18

19
20
21
#include "ltlparse/public.hh"

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

30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#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"

49
using namespace spot::ltl;
50
using namespace spot;
51
52
%}

53
54
55
56
57
58
59
60
61
%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"

62
63
%include "ltlenv/environment.hh"
%include "ltlenv/defaultenv.hh"
64

65
66
67
%include "ltlparse/public.hh"

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

76
77
%feature("new") spot::ltl_to_tgba;

78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
// 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116

%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);
  }

}
117
118
119

%inline %{

120
spot::ltl::parse_error_list
121
122
123
124
125
126
empty_parse_error_list()
{
  parse_error_list l;
  return l;
}

127
std::ostream&
128
129
130
131
132
get_cout()
{
  return std::cout;
}

133
std::ostream&
134
135
136
137
138
get_cerr()
{
  return std::cerr;
}

139
void
140
141
142
143
print_on(std::ostream& on, const std::string& what)
{
  on << what;
}
144

145
%}