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

Add ability to add names / labels to streams #59

Open
fdedden opened this issue Apr 7, 2020 · 2 comments
Open

Add ability to add names / labels to streams #59

fdedden opened this issue Apr 7, 2020 · 2 comments
Labels
enhancement New feature or request feature request Request or advice for a feature

Comments

@fdedden
Copy link
Member

fdedden commented Apr 7, 2020

Being able to give names or labels to streams has the following benefits:

  • Traceability between the original Copilot specification and C code is improved greatly, which can be a really important point for certification purposes.
  • The generated C code will be easier to read, again helping with certification.
  • Same approach can possibly used for name arguments of triggers, making the generated header file readable for people that don't know about the Copilot specification.

There are some existing pull requests by @avieth related to this enhancement:
Copilot-Language/copilot-core#18
Copilot-Language/copilot-language#9
Copilot-Language/copilot-c99#27

These are denied and closed for now, as they implement a way which we deem to specific. They might come in handy later on.

@fdedden fdedden added the enhancement New feature or request label Apr 7, 2020
@robdockins
Copy link
Contributor

I don't know if this is the right place to drop this idea, but I was thinking the other day that it might work out nicely to use the magic HasCallStack constraint to implement some form of traceability for stream and trigger definitions, etc. CF: https://hackage.haskell.org/package/base-4.16.0.0/docs/GHC-Stack.html#t:HasCallStack

Basically, you can add the HasCallStack constraint to any Haskell declaration, and the compiler with automatically populate it with information about call sites. That information is propagated to error calls and thrown exceptions, but can also be directly fetched using the callStack combinator. Adding HasCallStack annotations into the user-facing APIs for copilot, and then grabbing those stacks and stashing them into high-level stream definitions would allow a pretty lightweight way to maintain traceability connections to specification code.

@ivanperez-keera ivanperez-keera added the feature request Request or advice for a feature label Oct 22, 2022
@ivanperez-keera
Copy link
Member

Tagging @RyanGlScott for awareness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature request Request or advice for a feature
Development

No branches or pull requests

4 participants