-
Notifications
You must be signed in to change notification settings - Fork 273
Well-formedness checking of SSA equation [depends on #3480] #3287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -139,6 +139,27 @@ class ssa_exprt:public symbol_exprt | |
/* Used to determine whether or not an identifier can be built | ||
* before trying and getting an exception */ | ||
static bool can_build_identifier(const exprt &src); | ||
|
||
static void check( | ||
const exprt &expr, | ||
const validation_modet vm = validation_modet::INVARIANT) | ||
{ | ||
DATA_CHECK( | ||
vm, !expr.has_operands(), "SSA expression should not have operands"); | ||
DATA_CHECK( | ||
vm, expr.id() == ID_symbol, "SSA expression symbols are symbols"); | ||
DATA_CHECK(vm, expr.get_bool(ID_C_SSA_symbol), "wrong SSA expression ID"); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Btw, these methods have now become static methods that take the parent type in the recent changes to PR #3123. So that would then become We should also add a case for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
|
||
static void validate( | ||
const exprt &expr, | ||
const namespacet &ns, | ||
const validation_modet vm = validation_modet::INVARIANT) | ||
{ | ||
check(expr, vm); | ||
validate_full_expr( | ||
static_cast<const exprt &>(expr.find(ID_expression)), ns, vm); | ||
} | ||
}; | ||
|
||
/*! \brief Cast a generic exprt to an \ref ssa_exprt | ||
|
Uh oh!
There was an error while loading. Please reload this page.