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

Improve time of verification checks in CI #332

Closed
treiher opened this issue Jul 9, 2020 · 6 comments · Fixed by #365
Closed

Improve time of verification checks in CI #332

treiher opened this issue Jul 9, 2020 · 6 comments · Fixed by #365
Assignees

Comments

@treiher
Copy link
Collaborator

treiher commented Jul 9, 2020

Even with the introduced caching (#122) the verification checks take too much time. All of the last successful CI runs took more then one hour. (Does the caching even work at the moment?)

Currently we run the verification on a set of real-world protocol messages and some artificial test cases. An better approach could be to replace the current tests by a smaller subset which ideally still covers most of all potential cases. I think one (or a small number of) artificial message(s) could be enough to get a good coverage and reduce the needed verification time significantly. All currently used test cases could be still run in the nightly tests.

@treiher treiher added this to To do in RecordFlux 0.5 via automation Jul 9, 2020
@treiher
Copy link
Collaborator Author

treiher commented Jul 22, 2020

The currently used caching seems to work only partially. Here is a small excerpt of the proof results analyzed by SPAT. Lines with "0.0 s/0.0 s/0.0 s" indicate parts which were not verified again.

[...]
RFLX.TLV.Message.Get_Length             => 50.0 ms/50.0 ms/130.0 ms
RFLX.TLV.Message.Get_Tag                => 40.0 ms/40.0 ms/80.0 ms
RFLX.TLV.Message.Has_Buffer             => 0.0 s/0.0 s/0.0 s
RFLX.TLV.Message.Incomplete             => 0.0 s/0.0 s/0.0 s
RFLX.TLV.Message.Incomplete_Message     => 0.0 s/0.0 s/0.0 s
RFLX.TLV.Message.Initialize             => 50.0 ms/50.0 ms/670.0 ms
RFLX.TLV.Message.Initialize_Value       => 70.0 ms/70.0 ms/1.0 s
RFLX.TLV.Message.Initialized            => 20.0 ms/20.0 ms/20.0 ms
RFLX.TLV.Message.Invalid                => 0.0 s/0.0 s/0.0 s
RFLX.TLV.Message.Invalid_Successor      => 0.0 s/0.0 s/0.0 s
RFLX.TLV.Message.Message_Last           => 40.0 ms/40.0 ms/150.0 ms
RFLX.TLV.Message.Path_Condition         => 40.0 ms/40.0 ms/40.0 ms
RFLX.TLV.Message.Predecessor            => 0.0 s/0.0 s/0.0 s
RFLX.TLV.Message.Present                => 30.0 ms/30.0 ms/30.0 ms
RFLX.TLV.Message.Reset_Dependent_Fields => 110.0 ms/110.0 ms/920.0 ms
[...]

@treiher
Copy link
Collaborator Author

treiher commented Jul 22, 2020

The reason for the partial caching is that GitHub´s cache action does not update the cache on a cache hit. It seems to be intended for caching dependencies only.

As workaround we could use a custom cache action which adds this feature: https://github.com/Componolit/github-action-cache.

@treiher
Copy link
Collaborator Author

treiher commented Jul 22, 2020

With the custom cache action we are at 18 min for a successful verification if no changes have been made before. I think that is good enough for the moment. We can look into replacing the current verification tests by a smaller set in #208, where we intend to test features in a more structured way.

@treiher treiher moved this from To do to In progress in RecordFlux 0.5 Jul 22, 2020
@treiher treiher self-assigned this Jul 22, 2020
treiher added a commit that referenced this issue Jul 23, 2020
treiher added a commit that referenced this issue Jul 23, 2020
@treiher treiher moved this from In progress to Done in RecordFlux 0.5 Jul 23, 2020
RecordFlux 0.5 automation moved this from Done to Merged Jul 23, 2020
treiher added a commit that referenced this issue Jul 23, 2020
treiher added a commit that referenced this issue Jul 23, 2020
@treiher
Copy link
Collaborator Author

treiher commented Sep 1, 2020

This issue is still not resolved. Often the verification test checks need more than one hour even if there were no changes on the SPARK code.

@treiher treiher reopened this Sep 1, 2020
RecordFlux 0.5 automation moved this from Merged to In progress Sep 1, 2020
@treiher treiher moved this from In progress to To do in RecordFlux 0.5 Sep 1, 2020
@treiher treiher removed their assignment Sep 1, 2020
@treiher treiher added this to To do in RecordFlux 0.7 via automation Jan 21, 2021
@treiher treiher removed this from To do in RecordFlux 0.5 Jan 21, 2021
@treiher
Copy link
Collaborator Author

treiher commented Apr 27, 2021

Checking in shape files (why3shapes.gz; additionally to the already checked in session files) should improve the runtime of GNATprove. For some reason this seems not to be the case for GNAT Community 2020, but for more recent versions. We should analyze the effect of these changes again after the release of GNAT Community 2021 (#494).

Disabling --proof-warnings could also decrease the runtime of GNATprove, but this issue will probably be fixed in future versions. I could not see any significant time savings for our tests after disabling this option.

treiher added a commit that referenced this issue May 26, 2021
Add shape files and update proof session files.

Ref. #332
treiher added a commit that referenced this issue May 27, 2021
Add shape files and update proof session files.

Ref. #332
treiher added a commit that referenced this issue May 28, 2021
Add shape files and update proof session files.

Ref. #332
treiher added a commit that referenced this issue Jun 8, 2021
Add shape files and update proof session files.

Ref. #332
isaahzorgh pushed a commit that referenced this issue Jun 29, 2021
Add shape files and update proof session files.

Ref. #332
@senier senier removed this from To do in RecordFlux 0.7 Jul 26, 2021
@senier senier added this to To do in RecordFlux 0.6 via automation Jul 26, 2021
@senier senier moved this from To do to Under review in RecordFlux 0.6 Oct 5, 2021
@treiher
Copy link
Collaborator Author

treiher commented Oct 5, 2021

Checking in shape files (why3shapes.gz; additionally to the already checked in session files) should improve the runtime of GNATprove. For some reason this seems not to be the case for GNAT Community 2020, but for more recent versions. We should analyze the effect of these changes again after the release of GNAT Community 2021 (#494).

Caching the proof results by adding session files and shape files works well with GNAT Community 2021. All verification tests are executed in less than 25 min in our GitHub workflows.

@treiher treiher closed this as completed Oct 5, 2021
RecordFlux 0.6 automation moved this from Under review to Merged Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant