Skip to content

Commit b421e06

Browse files
author
Daniel Kroening
committed
ai and reaching definitions: use locationt instead of goto_programt::const_targett
1 parent d1733d8 commit b421e06

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

src/analyses/ai.h

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -384,11 +384,8 @@ class ait:public ai_baset
384384
void dummy(const domainT &s) { const statet &x=s; (void)x; }
385385

386386
// not implemented in sequential analyses
387-
bool merge_shared(
388-
const statet &,
389-
goto_programt::const_targett,
390-
goto_programt::const_targett,
391-
const namespacet &) override
387+
bool merge_shared(const statet &, locationt, locationt, const namespacet &)
388+
override
392389
{
393390
throw "not implemented";
394391
}
@@ -398,7 +395,8 @@ template<typename domainT>
398395
class concurrency_aware_ait:public ait<domainT>
399396
{
400397
public:
401-
typedef typename ait<domainT>::statet statet;
398+
using statet = typename ait<domainT>::statet;
399+
using locationt = typename statet::locationt;
402400

403401
// constructor
404402
concurrency_aware_ait():ait<domainT>()
@@ -407,8 +405,8 @@ class concurrency_aware_ait:public ait<domainT>
407405

408406
bool merge_shared(
409407
const statet &src,
410-
goto_programt::const_targett from,
411-
goto_programt::const_targett to,
408+
locationt from,
409+
locationt to,
412410
const namespacet &ns) override
413411
{
414412
statet &dest=this->get_state(to);

src/analyses/reaching_definitions.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ void rd_range_domaint::transform_end_function(
233233
locationt to,
234234
reaching_definitions_analysist &rd)
235235
{
236-
goto_programt::const_targett call=to;
236+
locationt call = to;
237237
--call;
238238
const code_function_callt &code=to_code_function_call(call->code);
239239

@@ -666,8 +666,8 @@ bool rd_range_domaint::merge(
666666
/// \return returns true iff there is something new
667667
bool rd_range_domaint::merge_shared(
668668
const rd_range_domaint &other,
669-
goto_programt::const_targett,
670-
goto_programt::const_targett,
669+
locationt,
670+
locationt,
671671
const namespacet &ns)
672672
{
673673
// TODO: dirty vars

src/analyses/reaching_definitions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ class reaching_definitions_analysist:
259259
virtual void initialize(
260260
const goto_functionst &goto_functions) override;
261261

262-
virtual statet &get_state(goto_programt::const_targett l) override
262+
virtual statet &get_state(locationt l) override
263263
{
264264
statet &s=concurrency_aware_ait<rd_range_domaint>::get_state(l);
265265

0 commit comments

Comments
 (0)