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

Scalars with size greater than 57 bit #238

Closed
treiher opened this issue May 13, 2020 · 1 comment · Fixed by #294
Closed

Scalars with size greater than 57 bit #238

treiher opened this issue May 13, 2020 · 1 comment · Fixed by #294
Assignees
Labels
generator Related to generator package (SPARK code generation)

Comments

@treiher
Copy link
Collaborator

treiher commented May 13, 2020

package Test is

   type U58 is mod 2**58;

   type Message is
      message
         F1 : U58;
      end message;

end Test;
rflx-test-generic_message.adb:184:48: medium: precondition might fail, cannot prove Natural (((Offset'Pos (Ofst) + Value'Size - 1) / Byte'Size) * Byte'Size) < Long_Integer'Size - 1, in instantiation at rflx-test-message.ads:6

While the generated code for the simple example shown above can be successfully verified for integers up to a size of 57 bit, it fails with bigger ones. Increasing the proof steps and the timeout to --steps=100000 --timeout=120 did not help.

@treiher
Copy link
Collaborator Author

treiher commented May 14, 2020

The failing precondition is needed to prevent some overflows in the implementation of Extract. I see no simple solution for this problem at the moment. This issue should be address in the context of #182.

@treiher treiher added bug generator Related to generator package (SPARK code generation) labels May 14, 2020
@treiher treiher self-assigned this May 20, 2020
@treiher treiher changed the title Integers with size greater than 57 bit result in failing precondition Scalars with size greater than 57 bit May 28, 2020
@treiher treiher added limitation and removed bug labels May 28, 2020
treiher added a commit that referenced this issue May 29, 2020
treiher added a commit that referenced this issue May 29, 2020
treiher added a commit that referenced this issue May 29, 2020
treiher added a commit that referenced this issue May 29, 2020
treiher added a commit that referenced this issue May 29, 2020
treiher added a commit that referenced this issue Jun 2, 2020
treiher added a commit that referenced this issue Jun 2, 2020
treiher added a commit that referenced this issue Jun 2, 2020
treiher added a commit that referenced this issue Jun 10, 2020
treiher added a commit that referenced this issue Jun 17, 2020
treiher added a commit that referenced this issue Jun 17, 2020
treiher added a commit that referenced this issue Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
generator Related to generator package (SPARK code generation)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant