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

Loop bound estimation and loop abstraction? #80

Open
bitcalc opened this issue Dec 13, 2018 · 6 comments
Open

Loop bound estimation and loop abstraction? #80

bitcalc opened this issue Dec 13, 2018 · 6 comments

Comments

@bitcalc
Copy link

bitcalc commented Dec 13, 2018

Hi,

In the FSE2014 Corral paper, I see that Corral has implemented the loop abstraction and loop bound estimation. What options should I use to enable them?

I haven't found a Corral discussion place, so I am posting my question here, hoping that someone can direct me to the right place.

Thanks.

@zvonimir
Copy link
Collaborator

Corral folks will be more knowledgeable about this, but I believe that /maxStaticLoopBound:N achieves the latter (loop bound estimation), where N gives the upper bound on the estimated bounds (I think).
You can find all the flags listed here:
https://github.com/boogie-org/corral/blob/master/source/Configs.cs
I am not sure which one turns on loop abstraction.

@bitcalc
Copy link
Author

bitcalc commented Dec 14, 2018

I did a few tests and could confirm that the /maxStaticLoopBound:N triggers the loop bound estimation.

According to the paper, when the loop iterations become greater than 50 "chosen heuristically
to be 50" (Section 5) loop abstraction should be triggered. I tested the following loop with the iteration up to hundreds, but I couldn't see that the loop abstraction was used.

#include <stdlib.h>
#include "smack.h"

#define SIZE 1000

int main(int argc, char **argv) {
  int *a = malloc(SIZE * sizeof(int));
  for (int i = 0; i < SIZE; ++i) {
    if (i == SIZE - 2) {
      a[SIZE] = 0;
    }
  }
  free(a);
  return a[0];
}

@akashlal
Copy link
Contributor

Only loop-bound estimation is implemented inside Corral. The loop abstraction is implemented outside, in the system that generates the boogie file for Corral.

@bitcalc
Copy link
Author

bitcalc commented Dec 14, 2018

Is there any tool that is publically available and implements the loop abstraction for Corral?

@akashlal
Copy link
Contributor

akashlal commented Dec 14, 2018 via email

@bitcalc
Copy link
Author

bitcalc commented Dec 14, 2018

Does Windows SDK, Visual Studio, or any Microsoft product include a tool that does it? If so, what is the command name and arguments? I appreciate any information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants