-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathudbm_int.i
97 lines (85 loc) · 2.8 KB
/
udbm_int.i
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/* Copyright 2011 Peter Bulychev
#
# This file is part of Python binding to the UPPAAL DBM library.
#
# This binding is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This binding is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this binding. If not, see <http://www.gnu.org/licenses/>.
*/
%module udbm_int
%{
#define SWIG_FILE_WITH_INIT
#include "udbm_int.h"
%}
%include "std_string.i"
%include "std_vector.i"
class VarNamesAccessor{
public:
void setClockName(int index, std::string name);
};
class Constraint {
public:
Constraint (int i, int j, int d, bool isStrict);
};
class IntClockValuation {
public:
IntClockValuation(int size);
void setClockValue(int index, int);
};
class DoubleClockValuation {
public:
DoubleClockValuation(int size);
void setClockValue(int index, double);
};
class IntVector {
// for some reason it's impossible to use this http://www.swig.org/Doc1.3/Library.html#Library_nn15
public:
IntVector(int );
void setElement(int , int);
};
class Federation {
public:
Federation(int dim);
Federation(int dim, Constraint &t);
Federation(const Federation&);
std::string toStr(VarNamesAccessor &);
Federation& operator |= (Federation &);
Federation& operator &= (Federation &);
Federation& operator += (Federation &);
Federation& operator -= (Federation &);
Federation orOp (Federation &); // for some reason SWIG will not work if operator is defined here
Federation andOp (Federation &);
Federation addOp (Federation &);
Federation minusOp (Federation &);
void up();
void down();
void mergeReduce(int, int);
void freeClock(int i);
bool lt(Federation& );
bool gt(Federation& );
bool le(Federation& );
bool ge(Federation& );
bool eq(Federation& );
void setZero();
void predt(Federation &);
void intern();
void setInit();
void convexHull();
bool containsIntValuation(IntClockValuation);
bool containsDoubleValuation(DoubleClockValuation);
void myExtrapolateMaxBounds(IntVector);
bool hasZero();
void updateValue(int x, int v);
int size();
int hash();
bool isEmpty();
};