@@ -118,100 +118,110 @@ class smv_parse_treet
118
118
typedef std::list<itemt> item_listt;
119
119
item_listt items;
120
120
121
- void add_item (
122
- itemt::item_typet item_type,
123
- const exprt &expr,
124
- const source_locationt &location)
121
+ void
122
+ add_item (itemt::item_typet item_type, exprt expr, source_locationt location)
125
123
{
126
- items.push_back (itemt () );
124
+ items.push_back (itemt{} );
127
125
items.back ().item_type =item_type;
128
- items.back ().expr = expr;
129
- items.back ().location = location;
126
+ items.back ().expr = std::move ( expr) ;
127
+ items.back ().location = std::move ( location) ;
130
128
}
131
129
132
- void add_assign_current (const equal_exprt &expr )
130
+ void add_assign_current (exprt lhs, exprt rhs )
133
131
{
134
- add_item (itemt::ASSIGN_CURRENT, expr, source_locationt::nil ());
132
+ add_item (
133
+ itemt::ASSIGN_CURRENT,
134
+ binary_exprt{std::move (lhs), ID_equal, std::move (rhs)},
135
+ source_locationt::nil ());
135
136
}
136
137
137
- void add_assign_init (const equal_exprt &expr )
138
+ void add_assign_init (exprt lhs, exprt rhs )
138
139
{
139
- add_item (itemt::ASSIGN_INIT, expr, source_locationt::nil ());
140
+ add_item (
141
+ itemt::ASSIGN_INIT,
142
+ binary_exprt{std::move (lhs), ID_equal, std::move (rhs)},
143
+ source_locationt::nil ());
140
144
}
141
145
142
- void add_assign_next (const equal_exprt &expr )
146
+ void add_assign_next (exprt lhs, exprt rhs )
143
147
{
144
- add_item (itemt::ASSIGN_NEXT, expr, source_locationt::nil ());
148
+ add_item (
149
+ itemt::ASSIGN_NEXT,
150
+ binary_exprt{std::move (lhs), ID_equal, std::move (rhs)},
151
+ source_locationt::nil ());
145
152
}
146
153
147
- void add_invar (const exprt & expr)
154
+ void add_invar (exprt expr)
148
155
{
149
- add_item (itemt::INVAR, expr, source_locationt::nil ());
156
+ add_item (itemt::INVAR, std::move ( expr) , source_locationt::nil ());
150
157
}
151
158
152
- void add_ctlspec (const exprt & expr)
159
+ void add_ctlspec (exprt expr)
153
160
{
154
- add_item (itemt::CTLSPEC, expr, source_locationt::nil ());
161
+ add_item (itemt::CTLSPEC, std::move ( expr) , source_locationt::nil ());
155
162
}
156
163
157
- void add_ltlspec (const exprt & expr)
164
+ void add_ltlspec (exprt expr)
158
165
{
159
- add_item (itemt::LTLSPEC, expr, source_locationt::nil ());
166
+ add_item (itemt::LTLSPEC, std::move ( expr) , source_locationt::nil ());
160
167
}
161
168
162
- void add_define (const equal_exprt &expr )
169
+ void add_define (exprt lhs, exprt rhs )
163
170
{
164
- add_item (itemt::DEFINE, expr, source_locationt::nil ());
171
+ add_item (
172
+ itemt::DEFINE,
173
+ binary_exprt{std::move (lhs), ID_equal, std::move (rhs)},
174
+ source_locationt::nil ());
165
175
}
166
-
167
- void add_fairness (const exprt & expr)
176
+
177
+ void add_fairness (exprt expr)
168
178
{
169
- add_item (itemt::FAIRNESS, expr, source_locationt::nil ());
179
+ add_item (itemt::FAIRNESS, std::move ( expr) , source_locationt::nil ());
170
180
}
171
-
172
- void add_init (const exprt & expr)
181
+
182
+ void add_init (exprt expr)
173
183
{
174
- add_item (itemt::INIT, expr, source_locationt::nil ());
184
+ add_item (itemt::INIT, std::move ( expr) , source_locationt::nil ());
175
185
}
176
-
177
- void add_trans (const exprt & expr)
186
+
187
+ void add_trans (exprt expr)
178
188
{
179
- add_item (itemt::TRANS, expr, source_locationt::nil ());
189
+ add_item (itemt::TRANS, std::move ( expr) , source_locationt::nil ());
180
190
}
181
-
182
- void add_invar (const exprt & expr, const source_locationt & location)
191
+
192
+ void add_invar (exprt expr, source_locationt location)
183
193
{
184
- add_item (itemt::INVAR, expr, location);
194
+ add_item (itemt::INVAR, std::move ( expr) , location);
185
195
}
186
196
187
- void add_ctlspec (const exprt & expr, const source_locationt & location)
197
+ void add_ctlspec (exprt expr, source_locationt location)
188
198
{
189
- add_item (itemt::CTLSPEC, expr, location);
199
+ add_item (itemt::CTLSPEC, std::move ( expr), std::move ( location) );
190
200
}
191
201
192
- void add_ltlspec (const exprt & expr, const source_locationt & location)
202
+ void add_ltlspec (exprt expr, source_locationt location)
193
203
{
194
- add_item (itemt::LTLSPEC, expr, location);
204
+ add_item (itemt::LTLSPEC, std::move ( expr) , location);
195
205
}
196
-
197
- void add_define (const exprt & expr, const source_locationt & location)
206
+
207
+ void add_define (exprt expr, source_locationt location)
198
208
{
199
- add_item (itemt::DEFINE, expr, location);
209
+ add_item (itemt::DEFINE, std::move ( expr), std::move ( location) );
200
210
}
201
-
202
- void add_fairness (const exprt & expr, const source_locationt & location)
211
+
212
+ void add_fairness (exprt expr, source_locationt location)
203
213
{
204
- add_item (itemt::FAIRNESS, expr, location);
214
+ add_item (itemt::FAIRNESS, std::move ( expr), std::move ( location) );
205
215
}
206
-
207
- void add_init (const exprt & expr, const source_locationt & location)
216
+
217
+ void add_init (exprt expr, source_locationt location)
208
218
{
209
- add_item (itemt::INIT, expr, location);
219
+ add_item (itemt::INIT, std::move ( expr), std::move ( location) );
210
220
}
211
-
212
- void add_trans (const exprt & expr, const source_locationt & location)
221
+
222
+ void add_trans (exprt expr, source_locationt location)
213
223
{
214
- add_item (itemt::TRANS, expr, location);
224
+ add_item (itemt::TRANS, std::move ( expr), std::move ( location) );
215
225
}
216
226
217
227
mc_varst vars;
0 commit comments