Skip to content

Unintended consequences of wrapping assertions into one single function #138

@zvonimir

Description

@zvonimir

While discussing the issue with looking for multiple assertion violations with Corral (brought up by @shaobo-he), I realized that SMACK implements assertions in an "interesting" way that introduces a level of indirection.

Basically, we have a procedure that looks as follows:

procedure __SMACK_assert(cond : bool) {
  assert cond;
}

Then, everywhere we have an assertion in the source code, we do not inject assert statement directly, but rather invoke __SMACK_assert, which adds a level of indirection.
This clearly causes an issue if we are looking for multiple assertion violations.

However, I've been wondering if this kind of encoding messes up other algorithms that Corral implements. Such as maybe property-directed verification, etc. Thoughts?

Basically, I am wondering if there would be benefits to "inlining" those assertions to remove the indirection, in terms of performance, scalability, etc.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions