-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Draft for
hugr-model
with export, import, parsing and pretty …
…printing (#1542) This PR defines a draft of the model format, and the following parts that operate on the format: - **Import**: A module in the model format can be imported as a core hugr module. - **Export**: A core hugr module can be exported into the model format. - **Parsing**: A model hugr can be parsed from an s-expression based text format. - **Pretty printing:**: A model hugr can be printed into the s-expression format, with readable indentation. This PR is very big, and yet it does not present a completed feature. The model and core format differ in several aspects. Where they differ, this is mostly intentional: The model is kept flexible enough to incorporate features that we know that we want in the future but are currently hard or impossible to express in the core. Import and export perform conversions where possible, but do not yet cover everything. To prevent this PR from becoming even bigger and to allow for core and model to converge incrementally from both directions, I suggest the following plan: We merge this PR into main with the model related code being feature gated and considered experimental. We then perform tweaks to model and core in smaller PRs where necessary until they are sufficiently close. --------- Co-authored-by: Agustín Borgna <[email protected]> Co-authored-by: Seyon Sivarajah <[email protected]>
- Loading branch information
1 parent
fc3efe5
commit a2e92e8
Showing
35 changed files
with
4,510 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.