-
Notifications
You must be signed in to change notification settings - Fork 16
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 support for trace col grouping #101
Conversation
cf79c39
to
c62d27f
Compare
c5c7723
to
8197516
Compare
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.
Thanks @tohrnii! The grammar looks good, but I think we may want to simplify the AST a bit to make life easier in the IR. See my comments inline and let me know if you have any questions
60f7512
to
ae7f6ad
Compare
Thank you @grjte for the review, made suggested changes. |
ae7f6ad
to
0bb24c7
Compare
parser/src/ast/mod.rs
Outdated
} | ||
|
||
/// [TraceCols] is used to represent a single or a group of columns in the execution trace. For | ||
/// single columns, the size is 0. For groups, the size is the number of columns in the group. |
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.
Just for my own understanding, is the number of columns sufficient to pinpoint the exact columns (e.g. contiguous and starting from 0)?
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.
In response to @Al-Kindi-0:
Columns can be pinpointed by their index within a TraceCols
struct. Keeping track of the size can be used for verification and also for having info required to output column groupings in codegen if needed. Internally in the IR, it's simplest to just think of things in terms of accessing a particular trace segment at a particular index and ignore groupings completely (e.g. for purposes of the constraint graph).
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.
Regarding this doc comment:
Shouldn't the size be 1 for single columns? (i.e. the number of columns in the group)
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.
@grjte Fixed.
@Al-Kindi-0's I'm not sure if you meant this but from your comment it seems like you mean whether column groups need to be contiguous? Currently they are assumed to be contiguous but I'm wondering if it's possible for some projects that it might be meaningful to have columns in a group that are not contiguous? (@grjte ?). I don't know if any clean syntax is possible to support such use cases though.
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.
Thanks, looks good overall now. I left a few small things inline
parser/src/ast/mod.rs
Outdated
} | ||
|
||
/// [TraceCols] is used to represent a single or a group of columns in the execution trace. For | ||
/// single columns, the size is 0. For groups, the size is the number of columns in the group. |
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.
In response to @Al-Kindi-0:
Columns can be pinpointed by their index within a TraceCols
struct. Keeping track of the size can be used for verification and also for having info required to output column groupings in codegen if needed. Internally in the IR, it's simplest to just think of things in terms of accessing a particular trace segment at a particular index and ignore groupings completely (e.g. for purposes of the constraint graph).
parser/src/ast/mod.rs
Outdated
} | ||
|
||
/// [TraceCols] is used to represent a single or a group of columns in the execution trace. For | ||
/// single columns, the size is 0. For groups, the size is the number of columns in the group. |
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.
Regarding this doc comment:
Shouldn't the size be 1 for single columns? (i.e. the number of columns in the group)
0bb24c7
to
a731396
Compare
Thank you @grjte and @Al-Kindi-0 for the review. Made suggested changes. |
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.
Looks good to me, thanks for all your work @tohrnii!
a731396
to
1183f5d
Compare
1183f5d
to
7b970b5
Compare
Closes #83.