Skip to content

Commit f8a712f

Browse files
Make symex_target take a level1t lhs
1 parent bfbffdc commit f8a712f

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

src/goto-symex/symex_decl.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,11 @@ void goto_symext::symex_decl(statet &state, const symbol_exprt &expr)
8181

8282
target.decl(
8383
state.guard.as_expr(),
84-
ssa.expr,
84+
ssa,
8585
state.source,
86-
hidden ? symex_targett::assignment_typet::HIDDEN
87-
: symex_targett::assignment_typet::STATE);
86+
hidden?
87+
symex_targett::assignment_typet::HIDDEN:
88+
symex_targett::assignment_typet::STATE);
8889

8990
if(state.dirty(ssa.expr.get_object_name()) && state.atomic_section_id == 0)
9091
target.shared_write(

src/goto-symex/symex_target.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Author: Daniel Kroening, [email protected]
1212
#ifndef CPROVER_GOTO_SYMEX_SYMEX_TARGET_H
1313
#define CPROVER_GOTO_SYMEX_SYMEX_TARGET_H
1414

15+
#include "renaming_level.h"
1516
#include <goto-programs/goto_program.h>
1617

1718
class ssa_exprt;
@@ -128,9 +129,9 @@ class symex_targett
128129
/// assignments (some may be hidden for the further analysis)
129130
virtual void decl(
130131
const exprt &guard,
131-
const ssa_exprt &ssa_lhs,
132+
const level1t<ssa_exprt> &ssa_lhs,
132133
const sourcet &source,
133-
assignment_typet assignment_type)=0;
134+
assignment_typet assignment_type) = 0;
134135

135136
/// Remove a variable from the scope.
136137
/// \param guard: Precondition for removal of this variable

src/goto-symex/symex_target_equation.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,19 +141,19 @@ void symex_target_equationt::assignment(
141141

142142
void symex_target_equationt::decl(
143143
const exprt &guard,
144-
const ssa_exprt &ssa_lhs,
144+
const level1t<ssa_exprt> &ssa_lhs,
145145
const sourcet &source,
146146
assignment_typet assignment_type)
147147
{
148-
PRECONDITION(ssa_lhs.is_not_nil());
148+
PRECONDITION(ssa_lhs.expr.is_not_nil());
149149

150150
SSA_steps.emplace_back(source, goto_trace_stept::typet::DECL);
151151
SSA_stept &SSA_step=SSA_steps.back();
152152

153153
SSA_step.guard=guard;
154-
SSA_step.ssa_lhs=ssa_lhs;
155-
SSA_step.ssa_full_lhs=ssa_lhs;
156-
SSA_step.original_full_lhs=ssa_lhs.get_original_expr();
154+
SSA_step.ssa_lhs = ssa_lhs.expr;
155+
SSA_step.ssa_full_lhs = ssa_lhs.expr;
156+
SSA_step.original_full_lhs = ssa_lhs.expr.get_original_expr();
157157
SSA_step.hidden=(assignment_type!=assignment_typet::STATE);
158158

159159
// the condition is trivially true, and only

src/goto-symex/symex_target_equation.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Author: Daniel Kroening, [email protected]
2525

2626
#include <solvers/prop/literal.h>
2727

28+
#include "renaming_level.h"
2829
#include "symex_target.h"
2930

3031
class decision_proceduret;
@@ -66,7 +67,7 @@ class symex_target_equationt:public symex_targett
6667
/// \copydoc symex_targett::decl()
6768
virtual void decl(
6869
const exprt &guard,
69-
const ssa_exprt &ssa_lhs,
70+
const level1t<ssa_exprt> &ssa_lhs,
7071
const sourcet &source,
7172
assignment_typet assignment_type);
7273

0 commit comments

Comments
 (0)