Skip to content

Commit e1aefbf

Browse files
Introduce renamedt type for result of rename
This is a wrapper that will be used to signal that an expression or type has been renamed to a given level. It makes it possible to define functions which only accept expression which have been through renaming.
1 parent 37c861c commit e1aefbf

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/goto-symex/renaming_level.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,17 @@ struct symex_renaming_levelt
5959
}
6060
};
6161

62+
/// Wrapper for expressions or types that have been renamed at level0
63+
template <typename underlyingt, levelt level>
64+
struct renamedt
65+
{
66+
static_assert(
67+
std::is_base_of<exprt, underlyingt>::value ||
68+
std::is_base_of<typet, underlyingt>::value,
69+
"underlyingt should inherit from exprt or typet");
70+
underlyingt value;
71+
};
72+
6273
/// Functor to set the level 0 renaming of SSA expressions.
6374
/// Level 0 corresponds to threads.
6475
/// The renaming is built for one particular interleaving.

0 commit comments

Comments
 (0)