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

feat: initial support for corset syntax #382

Merged
merged 29 commits into from
Nov 24, 2024
Merged

Conversation

DavePearce
Copy link
Collaborator

This puts in place initial support for parsing and compiling corset constraint files. In particular, compilation is separated out from HIR and uses an explicit resolution phase. More is needed though, such as type checking and context checking. Furthermore, support for missing syntax (e.g. arrays, functions, etc) is needed.

At this stage, there remains quite a lot to do.  However, it is at least
starting to make sense.
At the moment, am trying to sort out the issue of updating a source file
map for the structured representation.
This pushes through various changes to support the compilation of
multiple files at a time.  At this stage, most existing tests are still
failing since the Corset parser is not at all fleshed out.
The parser now supports a more useful range of expression forms, and the
defconstraint declaration.  That's enough to do something useful, and
hence the next step is to focus on the compiler itself.
First baby steps towards a proper name resolution process.
The next steps are: (1) make sure we have proper source map info for
expressions; (2) check invalid constraints.
Now, need to sort out source mapping of expressions.
Resolution of column names is now working, and reporting correct syntax
errors.
There appears to be an issue, however, with the evaluation of
interleaving columns.  This might be caused by an incorrect allocation
of columns, but that doesn't make sense to me.
Furthermore, the general resolution process for assignments appears to
be working as well.  However, there are outstanding issues around the
order in which input columns / assignments are allocated.
This addresses the issue related to the order in which assignments and
input columns are declared.  Previously, there was a problem whereby the
process could end up with the wrong identifiers.  Fixed now.
This adds support for column types, including those with the @prove
annotation.  This also updates most of the tests to be syntactically
valid, and comments out only those which are using a sorted permutation.
@DavePearce DavePearce linked an issue Nov 24, 2024 that may be closed by this pull request
@DavePearce DavePearce merged commit 07162ac into main Nov 24, 2024
2 checks passed
@DavePearce DavePearce deleted the 380-support-defpurefun branch November 24, 2024 23:10
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 this pull request may close these issues.

Support defpurefun
1 participant