Skip to content
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

Advanced SMACK guide #798

Open
keram88 opened this issue Mar 29, 2023 · 0 comments
Open

Advanced SMACK guide #798

keram88 opened this issue Mar 29, 2023 · 0 comments
Assignees

Comments

@keram88
Copy link
Contributor

keram88 commented Mar 29, 2023

Hello,

I have been exploring some new use cases for SMACK and encountered a need to create some uninterpreted functions at the C level, such as the following:

float fake_sqrtf(float x) {
  float ret = __VERIFIER_nondet_float();
  __SMACK_top_decl("function abst_sqrt(x: bvfloat) returns (bvfloat);");
  __SMACK_code("@f := abst_sqrt(@f);", ret, x);
  __VERIFIER_assume(!isnan(ret));
  return ret;
}

We could include documentation in the SMACK documents to detail how to do this and perhaps other advanced use cases.

@keram88 keram88 self-assigned this Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant