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

MPS: specs for most of instrumentation component #61

Merged
merged 2 commits into from
Jun 17, 2024

Conversation

peterohanley
Copy link
Contributor

There is still one function in instrumentation.c that has a construct that cn is not yet happy with. instrumentation_step takes a very long time to verify. The well-formed constraint for state.modes has to be passed around explicitly in too many places, some of which could be removed.

Describe your changes

Specs for instrumentation_common.c and most of instrumentation.c

Issue ticket number and link

#11

Checklist before requesting a review

  • I have performed a self-review of my code
  • My code matches the coding standards and I have ran the appropriate linters
  • I included documentation updates for my code
  • I extended the test suite and the tests run by the CI to cover my code
  • I assigned a Milestone to this PR
  • I assigned this PR to a Project
  • I assigned this PR appropriate Labels

@peterohanley peterohanley added the application software application software components label Jun 7, 2024
@peterohanley peterohanley added this to the MVP 1 milestone Jun 7, 2024
@peterohanley peterohanley requested a review from podhrmic June 7, 2024 20:50
@peterohanley peterohanley self-assigned this Jun 7, 2024
@@ -147,6 +204,8 @@ int instrumentation_step(uint8_t div, struct instrumentation_state *state) {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instrumentation_step takes a really long time to verify. I have this file pulled out and am reducing it.

@peterohanley
Copy link
Contributor Author

I'll fix the frama-c failure

Copy link
Collaborator

@podhrmic podhrmic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, thanks for the good work!

I have only one request: please turn (or reference) every comment you mentioned in this PR into a VERSE-Toolchain issue, such that your experience is highlighted to the TA1 team and they can appropriately prioritize.

Apparently we cannot share OpenSUT code yet, hence the VERSE-Toolchain issue, vs. a CN issue.

#define NMODES 3
/*$ function (u8) NMODES() $*/
static
uint8_t c_NMODES() /*$ cn_function NMODES; $*/ { return NMODES; }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this syntax cn_function NMODES; literally say *this is an implementation of function (u8) NMODES()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. We need this to move the NMODES definition from the preprocessor into CN for now.

@podhrmic
Copy link
Collaborator

@peterohanley looks like the CN proofs are failing on the printf function - given it is a known error, perhaps we need to just add an ifdef around the offending code?

@podhrmic
Copy link
Collaborator

Notes about CN experience added to #98

@peterohanley peterohanley merged commit 9e71102 into main Jun 17, 2024
5 checks passed
@peterohanley peterohanley deleted the 11-implement-mps branch June 17, 2024 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
application software application software components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants