-
Notifications
You must be signed in to change notification settings - Fork 62
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
Slow (non-terminating?) proofs of A51, Bivium, Trivium #104
Comments
All of those correctness theorems have type
After 10 minutes, I'm still waiting for Anyway, it looks like we have a performance bug in the saw-core evaluator, which is independent of the backend. Those algorithms are all implemented using some infinite stream operations, so my guess is that we're recomputing some stream elements many times. |
I looked into this further, and I found some interesting examples of slowdown behavior. Problems arise with recursively defined infinite streams that use the append operator
Now we can run the following commands for various values of
The first two commands have a similar runtime, which is quadratic in Next, we can do the same experiments, but iterating a much cheaper function: replace To summarize: I think we have two separate causes of performance problems. First, we lose data sharing with some recursive definitions (in particular, definitions like Second, there is an additional cost to traverse a recursively defined infinite stream. This probably has to do with the inefficiency of |
Adapt to GaloisInc/cryptol#964 tc-errors.
Alexander Semenov recently wrote up Cryptol implementations of the stream ciphers A51, Bivium, and Trivium in Cryptol, along with some correctness properties, which are now in the Cryptol repository.
https://github.com/GaloisInc/cryptol/tree/master/examples/contrib
Proving these in Cryptol works great:
Proving them in SAW, not so well:
It is easy to generate the theorems, so it seems like it's a problem in the SBV backend (and I've confirmed that the same happens with the ABC backend).
The text was updated successfully, but these errors were encountered: