Skip to content

Commit f21ff7f

Browse files
author
Daniel Kroening
authored
Merge pull request #1025 from DanielNeville/danielneville/fix/add_t_to_interval_template
Added a 't' to the name of interval_template
2 parents ae74767 + 7c849cd commit f21ff7f

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

src/analyses/interval_domain.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Author: Daniel Kroening, [email protected]
1818
#include "ai.h"
1919
#include "interval_template.h"
2020

21-
typedef interval_template<mp_integer> integer_intervalt;
22-
typedef interval_template<ieee_floatt> ieee_float_intervalt;
21+
typedef interval_templatet<mp_integer> integer_intervalt;
22+
typedef interval_templatet<ieee_floatt> ieee_float_intervalt;
2323

2424
class interval_domaint:public ai_domain_baset
2525
{

src/analyses/interval_template.h

+19-19
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@ Author: Daniel Kroening, [email protected]
1515

1616
#include <util/threeval.h>
1717

18-
template<class T> class interval_template
18+
template<class T> class interval_templatet
1919
{
2020
public:
21-
interval_template():lower_set(false), upper_set(false)
21+
interval_templatet():lower_set(false), upper_set(false)
2222
{
2323
// this is 'top'
2424
}
2525

26-
explicit interval_template(const T &x):
26+
explicit interval_templatet(const T &x):
2727
lower_set(true),
2828
upper_set(true),
2929
lower(x),
3030
upper(x)
3131
{
3232
}
3333

34-
explicit interval_template(const T &l, const T &u):
34+
explicit interval_templatet(const T &l, const T &u):
3535
lower_set(true),
3636
upper_set(true),
3737
lower(l),
@@ -102,18 +102,18 @@ template<class T> class interval_template
102102
}
103103

104104
// Union or disjunction
105-
void join(const interval_template<T> &i)
105+
void join(const interval_templatet<T> &i)
106106
{
107107
approx_union_with(i);
108108
}
109109

110110
// Intersection or conjunction
111-
void meet(const interval_template<T> &i)
111+
void meet(const interval_templatet<T> &i)
112112
{
113113
intersect_with(i);
114114
}
115115

116-
void intersect_with(const interval_template &i)
116+
void intersect_with(const interval_templatet &i)
117117
{
118118
if(i.lower_set)
119119
{
@@ -142,7 +142,7 @@ template<class T> class interval_template
142142
}
143143
}
144144

145-
void approx_union_with(const interval_template &i)
145+
void approx_union_with(const interval_templatet &i)
146146
{
147147
if(i.lower_set && lower_set)
148148
lower=std::min(lower, i.lower);
@@ -157,7 +157,7 @@ template<class T> class interval_template
157157
};
158158

159159
template<class T>
160-
tvt operator<=(const interval_template<T> &a, const interval_template<T> &b)
160+
tvt operator<=(const interval_templatet<T> &a, const interval_templatet<T> &b)
161161
{
162162
if(a.upper_set && b.lower_set && a.upper<=b.lower)
163163
return tvt(true);
@@ -168,25 +168,25 @@ tvt operator<=(const interval_template<T> &a, const interval_template<T> &b)
168168
}
169169

170170
template<class T>
171-
tvt operator>=(const interval_template<T> &a, const interval_template<T> &b)
171+
tvt operator>=(const interval_templatet<T> &a, const interval_templatet<T> &b)
172172
{
173173
return b<=a;
174174
}
175175

176176
template<class T>
177-
tvt operator<(const interval_template<T> &a, const interval_template<T> &b)
177+
tvt operator<(const interval_templatet<T> &a, const interval_templatet<T> &b)
178178
{
179179
return !(a>=b);
180180
}
181181

182182
template<class T>
183-
tvt operator>(const interval_template<T> &a, const interval_template<T> &b)
183+
tvt operator>(const interval_templatet<T> &a, const interval_templatet<T> &b)
184184
{
185185
return !(a<=b);
186186
}
187187

188188
template<class T>
189-
bool operator==(const interval_template<T> &a, const interval_template<T> &b)
189+
bool operator==(const interval_templatet<T> &a, const interval_templatet<T> &b)
190190
{
191191
if(a.lower_set!=b.lower_set)
192192
return false;
@@ -202,31 +202,31 @@ bool operator==(const interval_template<T> &a, const interval_template<T> &b)
202202
}
203203

204204
template<class T>
205-
bool operator!=(const interval_template<T> &a, const interval_template<T> &b)
205+
bool operator!=(const interval_templatet<T> &a, const interval_templatet<T> &b)
206206
{
207207
return !(a==b);
208208
}
209209

210210
template<class T>
211-
interval_template<T> upper_interval(const T &u)
211+
interval_templatet<T> upper_interval(const T &u)
212212
{
213-
interval_template<T> i;
213+
interval_templatet<T> i;
214214
i.upper_set=true;
215215
i.upper=u;
216216
return i;
217217
}
218218

219219
template<class T>
220-
interval_template<T> lower_interval(const T &l)
220+
interval_templatet<T> lower_interval(const T &l)
221221
{
222-
interval_template<T> i;
222+
interval_templatet<T> i;
223223
i.lower_set=true;
224224
i.lower=l;
225225
return i;
226226
}
227227

228228
template<class T>
229-
std::ostream &operator << (std::ostream &out, const interval_template<T> &i)
229+
std::ostream &operator << (std::ostream &out, const interval_templatet<T> &i)
230230
{
231231
if(i.lower_set)
232232
out << '[' << i.lower;

src/analyses/invariant_set.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class invariant_sett
8888
ineq_sett ne_set;
8989

9090
// bounds
91-
typedef interval_template<mp_integer> boundst;
91+
typedef interval_templatet<mp_integer> boundst;
9292
typedef std::map<unsigned, boundst> bounds_mapt;
9393
bounds_mapt bounds_map;
9494

0 commit comments

Comments
 (0)