-
Notifications
You must be signed in to change notification settings - Fork 29
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
[minor] Add Property primitive operations, starting with integer addition. #168
Conversation
…tion. This adds prose to the Expressions section introducing the concept of primitive Property operations, adds a new section defining the primitive Property operations, and adds primitive Property operations to the grammar. As a concrete example, integer addition is included.
I tried to follow very closely the language, structure, and grammar that we are using when describing the other primitive operations on ground types. Please let me know what you think. |
spec.md
Outdated
@@ -3459,6 +3498,9 @@ primop_1expr = primop_1expr_keyword , "(" , expr , ")" ; | |||
primop_1expr1int = primop_1expr1int_keyword , "(", expr , "," , int , ")" ; | |||
primop_1expr2int = primop_1expr2int_keyword , "(" , expr , "," , int , "," , int , ")" ; | |||
|
|||
(* Primitive Property Operations *) | |||
property_primop_2expr = property_primop_2expr_keyword , "(" , property_expr , "," , property_expr ")" ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm in the rendered PDF this overflows... I will try breaking this differently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes... the grammar is verbatim and you have to do some manual reflowing to get things to fit. There are other examples of manual breaking in the grammar where this happens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This is beginning to motivate prefixes on the hardware operations, e.g., hw_add
. 🧐
@@ -2450,6 +2450,26 @@ asClock(x) | |||
|
|||
[@sec:primitive-operations] will describe the format and semantics of each primitive operation. | |||
|
|||
## Primitive Property Operations {#sec:expressions:primitive-property-operations} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's kind of unfortunate that the PR has to go through this just because two different subsections have the same name. I should see if there is a pandoc option to do this automatically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I just sort of followed how HW primitives do it--both naming the subsection the same as the section, and using these anchors to disambiguate. If there is a better option with pandoc, happy to use that.
Hmm, yeah maybe. I don't know if we need to update the original primitives, but I think the type prefix is good for the new ones (e.g., integer_add, list_create, etc.). |
This adds prose to the Expressions section introducing the concept of
primitive Property operations, adds a new section defining the
primitive Property operations, and adds primitive Property operations
to the grammar.
As a concrete example, integer addition is included.