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

Distinguishing between Inputs, Assignments and Constraints #178

Closed
DavePearce opened this issue Jun 20, 2024 · 1 comment · Fixed by #182
Closed

Distinguishing between Inputs, Assignments and Constraints #178

DavePearce opened this issue Jun 20, 2024 · 1 comment · Fixed by #182

Comments

@DavePearce
Copy link
Collaborator

The mechanism in which assignments versus constraints is handled is not working. The problem is that, since moving to using column indices instead of column names when looking up columns, more care is required to ensure alignment. Specifically, alignment between the trace and the schema. Unfortunately, the current design makes it relatively easy for misalignment to occur.

Some key terms:

  1. Inputs. This represent columns of user-provided data. These are fed into trace expansion as the roots of computation [to determine the values of computed columns].
  2. Assignments These can also be referred to as computed columns. They represent columns whose values are computed from earlier columns. We can view them as assignments of the form y1, ..., yn := f(x1, .., xm).
  3. Constraints. These are used to check that a given input trace meets expected requirements. For example, that all values in a column are bytes, or that all values in a column are sorted, etc.
  4. Declarations. A declaration is either an input or an assignment. A declaration declares one or more columns in the trace. Thus, the index of each column can be determined by iterating through the declarations.

In this model, constraints are lowered from the high-level to a lower-level. As this happens, they may introduce more assignments and more constraints. New assignments are always appended so that the index of earlier columns is unchanged.

@DavePearce DavePearce changed the title Fix Distinction between Constraints / Assignments Distinguishing between Constraints / Assignments Jun 20, 2024
@DavePearce DavePearce changed the title Distinguishing between Constraints / Assignments Distinguishing between Inputs, Assignments and Constraints Jun 20, 2024
@DavePearce
Copy link
Collaborator Author

DavePearce commented Jun 20, 2024

##Notes

  • A declaration corresponds roughly to what is currently called a ColumnGroup.
  • Using the term register as a way to refer to the physical columns of a trace may be helpful to distinguish from a more abstract notion of "column".

@DavePearce DavePearce linked a pull request Jun 24, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant