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: constant folding implemented for core and float extension #769

Merged
merged 47 commits into from
Jan 3, 2024

Conversation

ss2165
Copy link
Member

@ss2165 ss2165 commented Jan 3, 2024

Closes #711

Original review in #758

ss2165 and others added 30 commits November 24, 2023 14:23
refactor!: Closes Flatten `Prim(Type/Value)` in to parent enum #665

BREAKING_CHANGES: In serialization, extension and function values no longer
wrapped by "pv".
Bumps
[actions/upload-artifact](https://github.com/actions/upload-artifact)
from 3 to 4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/upload-artifact/releases">actions/upload-artifact's
releases</a>.</em></p>
<blockquote>
<h2>v4.0.0</h2>
<h2>What's Changed</h2>
<p>The release of upload-artifact@v4 and download-artifact@v4 are major
changes to the backend architecture of Artifacts. They have numerous
performance and behavioral improvements.</p>
<p>For more information, see the <a
href="https://github.com/actions/toolkit/tree/main/packages/artifact"><code>@​actions/artifact</code></a>
documentation.</p>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/vmjoseph"><code>@​vmjoseph</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/upload-artifact/pull/464">actions/upload-artifact#464</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/upload-artifact/compare/v3...v4.0.0">https://github.com/actions/upload-artifact/compare/v3...v4.0.0</a></p>
<h2>v3.1.3</h2>
<h2>What's Changed</h2>
<ul>
<li>chore(github): remove trailing whitespaces by <a
href="https://github.com/ljmf00"><code>@​ljmf00</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/313">actions/upload-artifact#313</a></li>
<li>Bump <code>@​actions/artifact</code> version to v1.1.2 by <a
href="https://github.com/bethanyj28"><code>@​bethanyj28</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/436">actions/upload-artifact#436</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/upload-artifact/compare/v3...v3.1.3">https://github.com/actions/upload-artifact/compare/v3...v3.1.3</a></p>
<h2>v3.1.2</h2>
<ul>
<li>Update all <code>@actions/*</code> NPM packages to their latest
versions- <a
href="https://redirect.github.com/actions/upload-artifact/issues/374">#374</a></li>
<li>Update all dev dependencies to their most recent versions - <a
href="https://redirect.github.com/actions/upload-artifact/issues/375">#375</a></li>
</ul>
<h2>v3.1.1</h2>
<ul>
<li>Update actions/core package to latest version to remove
<code>set-output</code> deprecation warning <a
href="https://redirect.github.com/actions/upload-artifact/issues/351">#351</a></li>
</ul>
<h2>v3.1.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Bump <code>@​actions/artifact</code> to v1.1.0 (<a
href="https://redirect.github.com/actions/upload-artifact/pull/327">actions/upload-artifact#327</a>)
<ul>
<li>Adds checksum headers on artifact upload (<a
href="https://redirect.github.com/actions/toolkit/pull/1095">actions/toolkit#1095</a>)
(<a
href="https://redirect.github.com/actions/toolkit/pull/1063">actions/toolkit#1063</a>)</li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/actions/upload-artifact/commit/c7d193f32edcb7bfad88892161225aeda64e9392"><code>c7d193f</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/upload-artifact/issues/466">#466</a>
from actions/v4-beta</li>
<li><a
href="https://github.com/actions/upload-artifact/commit/13131bb095770b4070a7477c3cd2d96e1c16d9f4"><code>13131bb</code></a>
licensed cache</li>
<li><a
href="https://github.com/actions/upload-artifact/commit/4a6c273b9834f66a1d05c170dc3f80f9cdb9def1"><code>4a6c273</code></a>
Merge branch 'main' into v4-beta</li>
<li><a
href="https://github.com/actions/upload-artifact/commit/f391bb91a3d3118aeca171c365bb319ece276b37"><code>f391bb9</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/upload-artifact/issues/465">#465</a>
from actions/robherley/v4-documentation</li>
<li><a
href="https://github.com/actions/upload-artifact/commit/9653d03c4b74c32144e02dae644fea70e079d4b3"><code>9653d03</code></a>
Apply suggestions from code review</li>
<li><a
href="https://github.com/actions/upload-artifact/commit/875b63076402f25ef9d52c294c86ba4f97810575"><code>875b630</code></a>
add limitations section</li>
<li><a
href="https://github.com/actions/upload-artifact/commit/ecb21463e93740a6be75c3116242169bfdbcb15a"><code>ecb2146</code></a>
add compression example</li>
<li><a
href="https://github.com/actions/upload-artifact/commit/5e7604f84a055838f64ed68bb9904751523081ae"><code>5e7604f</code></a>
trim some repeated info</li>
<li><a
href="https://github.com/actions/upload-artifact/commit/d6437d07581fe318a364512e6cf6b1dca6b4f92c"><code>d6437d0</code></a>
naming</li>
<li><a
href="https://github.com/actions/upload-artifact/commit/1b561557037b4957d7d184e9aac02bec86c771eb"><code>1b56155</code></a>
s/v4-beta/v4/g</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/upload-artifact/compare/v3...v4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/upload-artifact&package-manager=github_actions&previous-version=3&new-version=4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps
[dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact)
from 2 to 3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dawidd6/action-download-artifact/releases">dawidd6/action-download-artifact's
releases</a>.</em></p>
<blockquote>
<h2>v3.0.0</h2>
<p>Node was updated from 16 to 20.
Node 20 requires <code>glibc&gt;=2.28</code>.</p>
<h2>v2.28.0</h2>
<p>No release notes provided.</p>
<h2>v2.27.0</h2>
<p>No release notes provided.</p>
<h2>v2.26.1</h2>
<p>No release notes provided.</p>
<h2>v2.26.0</h2>
<p>No release notes provided.</p>
<h2>v2.25.0</h2>
<p>No release notes provided.</p>
<h2>v2.24.4</h2>
<p>No release notes provided.</p>
<h2>v2.24.3</h2>
<p>No release notes provided.</p>
<h2>v2.24.2</h2>
<p>No release notes provided.</p>
<h2>v2.24.0</h2>
<p>No release notes provided.</p>
<h2>v2.23.0</h2>
<p>No release notes provided.</p>
<h2>v2.22.0</h2>
<p>No release notes provided.</p>
<h2>v2.21.1</h2>
<p>No release notes provided.</p>
<h2>v2.21.0</h2>
<p>No release notes provided.</p>
<h2>v2.20.0</h2>
<p>No release notes provided.</p>
<h2>v2.19.0</h2>
<p>No release notes provided.</p>
<h2>v2.18.0</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/dawidd6/action-download-artifact/commit/e7466d1a7587ed14867642c2ca74b5bcc1e19a2d"><code>e7466d1</code></a>
build(deps): bump <code>@​actions/artifact</code> from 1.1.2 to 2.0.0
(<a
href="https://redirect.github.com/dawidd6/action-download-artifact/issues/260">#260</a>)</li>
<li><a
href="https://github.com/dawidd6/action-download-artifact/commit/f29d1b6a8930683e80acedfbe6baa2930cd646b4"><code>f29d1b6</code></a>
node_modules: upgrade</li>
<li><a
href="https://github.com/dawidd6/action-download-artifact/commit/587cee61f534dd8254d0baad7d7c511335afca24"><code>587cee6</code></a>
action: node16 -&gt; node20 (<a
href="https://redirect.github.com/dawidd6/action-download-artifact/issues/259">#259</a>)</li>
<li><a
href="https://github.com/dawidd6/action-download-artifact/commit/1cf761fba652f5ee1570ccc23e3ab2123370f234"><code>1cf761f</code></a>
build(deps): bump undici from 5.25.4 to 5.28.2 (<a
href="https://redirect.github.com/dawidd6/action-download-artifact/issues/258">#258</a>)</li>
<li><a
href="https://github.com/dawidd6/action-download-artifact/commit/d44631c448e18ab4dc3ebf7dd43489e1afeaee61"><code>d44631c</code></a>
build(deps): bump <code>@​actions/github</code> from 5.1.1 to 6.0.0 (<a
href="https://redirect.github.com/dawidd6/action-download-artifact/issues/252">#252</a>)</li>
<li>See full diff in <a
href="https://github.com/dawidd6/action-download-artifact/compare/v2...v3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dawidd6/action-download-artifact&package-manager=github_actions&previous-version=2&new-version=3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Previously it was incorrectly reporting the internal signature as the
node signature.

Fixes #750 

Required further fixes to `replace.rs`:
* test was looking for an error that should have been hidden behind
another (that was not previously reported because of #750). Look for the
latter, not the former.
* Fix node indices not being correctly reported from `apply`

---------

Co-authored-by: Alan Lawrence <[email protected]>
BREAKING CHANGES: extension() function replaced with EXTENSION static ref for float_ops and conversions
as per spec

refactor!: allow Into<Const> for builder.add_const

BREAKING_CHANGES: existing .into() calls will error
ss2165 and others added 15 commits December 22, 2023 13:45
A couple of small clarifications suggested by Will.
Following Will's review.
…put (#762)

I believe the question of causal cones was definitively resolved by
#468, and the codebase seems clear on that point - however, I just
stumbled across this I-believe-erroneous reference in the spec. (FWIW,
searching through the spec for "causal" has only one other occurrence,
which appears to explicitly say we don't need this rule.)
and devenv update to 1.75 stable
- Setups automatic changelog generation on merges to `main`
- Updates the README with the appropriate links (assuming the crate is
already released)
as per spec

refactor!: allow Into<Const> for builder.add_const

BREAKING_CHANGES: existing CustomConst.into() calls will error

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alan Lawrence <[email protected]>
Co-authored-by: Luca Mondada <[email protected]>
Co-authored-by: Luca Mondada <[email protected]>
@ss2165 ss2165 requested review from lmondada and removed request for lmondada January 3, 2024 11:51
Copy link

codecov bot commented Jan 3, 2024

Codecov Report

Attention: 68 lines in your changes are missing coverage. Please review.

Comparison is base (d5e7d63) 84.12% compared to head (905ef01) 84.09%.

Files Patch % Lines
.../std_extensions/arithmetic/float_ops/const_fold.rs 56.25% 31 Missing and 4 partials ⚠️
src/algorithm/const_fold.rs 90.04% 14 Missing and 6 partials ⚠️
src/extension/const_fold.rs 38.46% 7 Missing and 1 partial ⚠️
src/std_extensions/arithmetic/conversions.rs 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #769      +/-   ##
==========================================
- Coverage   84.12%   84.09%   -0.04%     
==========================================
  Files          68       71       +3     
  Lines       13307    13621     +314     
  Branches    13307    13621     +314     
==========================================
+ Hits        11195    11454     +259     
- Misses       1310     1353      +43     
- Partials      802      814      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@lmondada lmondada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! and sorry for the PR mess.

@ss2165 ss2165 added this pull request to the merge queue Jan 3, 2024
Merged via the queue into main with commit 23987a0 Jan 3, 2024
9 of 10 checks passed
@ss2165 ss2165 deleted the feat/const-fold-floats branch January 3, 2024 12:42
@github-actions github-actions bot mentioned this pull request Jan 3, 2024
ss2165 added a commit that referenced this pull request Jan 3, 2024
Closes #711 

Original review in #758

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alan Lawrence <[email protected]>
Co-authored-by: Luca Mondada <[email protected]>
Co-authored-by: Alec Edgington <[email protected]>
Co-authored-by: Alan Lawrence <[email protected]>
Co-authored-by: Agustín Borgna <[email protected]>
Co-authored-by: Luca Mondada <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Jan 15, 2024
## 🤖 New release
* `quantinuum-hugr`: 0.1.0

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

## 0.1.0 (2024-01-15)

### Bug Fixes

- Subgraph boundaries with copies
([#440](#440))
- [**breaking**] Use internal tag for SumType enum serialisation
([#462](#462))
- Check kind before unwrap in insert_identity
([#475](#475))
- Allow for variables to get solved in inference
([#478](#478))
- In IdentityInsertion add noop to correct parent
([#477](#477))
- Failing release tests ([#485](#485))
- [**breaking**] Serialise `Value`, `PrimValue`, and `TypeArg` with
internal tags ([#496](#496))
- Serialise custom constants with internal tag
([#502](#502))
- [**breaking**] Reduce max int width in arithmetic extension to 64
([#504](#504))
- HugrView::get_function_type
([#507](#507))
- TODO in resolve_extension_ops: copy across input_extensions
([#510](#510))
- Use given input extensions in `define_function`
([#524](#524))
- Lessen requirements for hugrs in outline_cfg
([#528](#528))
- Make unification logic less strict
([#538](#538))
- Simple replace incorrectly copying metadata
([#545](#545))
- Account for self-referencial constraints
([#551](#551))
- Consider shunted metas when comparing equality
([#555](#555))
- Join labels in issue workflow
([#563](#563))
- Comment out broken priority code
([#562](#562))
- Handling of issues with no priority label
([#573](#573))
- Don't insert temporary wires when extracting a subgraph
([#582](#582))
- Improve convexity checking and fix test
([#585](#585))
- Ignore input->output links in
SiblingSubgraph::try_new_dataflow_subgraph
([#589](#589))
- Enforce covariance of SiblingMut::RootHandle
([#594](#594))
- Erratic stack overflow in infer.rs (live_var)
([#638](#638))
- Work harder in variable instantiation
([#591](#591))
- Actually add the error type to prelude
([#672](#672))
- Serialise dynamically computed opaqueOp signatures
([#690](#690))
- FuncDefns don't require that their extensions match their children
([#688](#688))
- Binary compute_signature returning a PolyFuncType with binders
([#710](#710))
- Use correct number of args for int ops
([#723](#723))
- [**breaking**] Add serde tag to TypeParam enum
([#722](#722))
- Allow widening and narrowing to same width.
([#735](#735))
- Case node should not have an external signature
([#749](#749))
- [**breaking**] Normalize input/output value/static/other ports in
`OpType` ([#783](#783))
- No dataflow_signature for block types
([#792](#792))
- Ignore unsupported test in miri
([#794](#794))
- Include schema rather than read file
([#807](#807))

### Documentation

- Add operation constraint to quantum extension
([#543](#543))
- Coverage check section in DEVELOPMENT.md
([#648](#648))
- Remove "quantum extension" from HUGR spec.
([#694](#694))
- Improve crate-level docs, including example code.
([#698](#698))
- Spec cleanups and clarifications
([#742](#742))
- Spec clarifications ([#738](#738))
- Spec updates ([#741](#741))
- [spec] Remove references to causal cone and Order edges from Input
([#762](#762))
- Mention experimental inference in readme
([#800](#800))
- Collection of spec updates for 0.1
([#801](#801))
- Add schema v0 ([#805](#805))
- Update spec wrt. polymorphism
([#791](#791))

### Features

- Derive things for builder structs
([#229](#229))
- Return a slice of types from the signature
([#238](#238))
- Move `dot_string` to `HugrView`
([#271](#271))
- [**breaking**] Change `TypeParam::USize` to `TypeParam::BoundedNat`
and use in int extensions
([#445](#445))
- TKET2 compatibility requirements
([#450](#450))
- Split methods between `HugrMut` and `HugrMutInternals`
([#441](#441))
- Add `HugrView::node_connections` to get all links between nodes
([#460](#460))
- Location information in extension inference error
([#464](#464))
- Add T, Tdg, X gates ([#466](#466))
- [**breaking**] Add `ApplyResult` associated type to `Rewrite`
([#472](#472))
- Implement rewrite `IdentityInsertion`
([#474](#474))
- Instantiate inferred extensions
([#461](#461))
- Default DFG builders to open extension sets
([#473](#473))
- Some helper methods ([#482](#482))
- Extension inference for conditional nodes
([#465](#465))
- Add ConvexChecker ([#487](#487))
- Add clippy lint for mut calls in a debug_assert
([#488](#488))
- Default more builder methods to open extension sets
([#492](#492))
- Port is serializable ([#489](#489))
- More general portgraph references
([#494](#494))
- Add extension deltas to CFG ops
([#503](#503))
- Implement petgraph traits on Hugr
([#498](#498))
- Make extension delta a parameter of CFG builders
([#514](#514))
- [**breaking**] SiblingSubgraph does not borrow Hugr
([#515](#515))
- Validate TypeArgs to ExtensionOp
([#509](#509))
- Derive Debug & Clone for `ExtensionRegistry`.
([#530](#530))
- Const nodes are built with some extension requirements
([#527](#527))
- Some python errors and bindings
([#533](#533))
- Insert_hugr/insert_view return node map
([#535](#535))
- Add `SiblingSubgraph::try_from_nodes_with_checker`
([#547](#547))
- PortIndex trait for undirected port parameters
([#553](#553))
- Insert/extract subgraphs from a HugrView
([#552](#552))
- Add `new_array` operation to prelude
([#544](#544))
- Add a `DataflowParentID` node handle
([#559](#559))
- Make TypeEnum and it's contents public
([#558](#558))
- Optional direction check when querying a port index
([#566](#566))
- Extension inference for CFGs
([#529](#529))
- Better subgraph verification errors
([#587](#587))
- Compute affected nodes for `SimpleReplacement`
([#600](#600))
- Move `SimpleReplace::invalidation_set` to the `Rewrite` trait
([#602](#602))
- [**breaking**] Resolve extension ops (mutating Hugr) in
(infer_and_->)update_validate
([#603](#603))
- Add accessors for node index and const values
([#605](#605))
- [**breaking**] Expose the value of ConstUsize
([#621](#621))
- Nicer debug and display for core types
([#628](#628))
- [**breaking**] Static checking of Port direction
([#614](#614))
- Builder and HugrMut add_op_xxx default to open extensions
([#622](#622))
- [**breaking**] Add panicking integer division ops
([#625](#625))
- Add hashable `Angle` type to Quantum extension
([#608](#608))
- [**breaking**] Remove "rotations" extension.
([#645](#645))
- Port.as_directed to match on either direction
([#647](#647))
- Impl GraphRef for PetgraphWrapper
([#651](#651))
- Provide+implement Replace API
([#613](#613))
- Require the node's metadata to always be a Map
([#661](#661))
- [**breaking**] Polymorphic function types (inc OpDefs) using dyn trait
([#630](#630))
- Make prelude error type public
([#669](#669))
- Shorthand for retrieving custom constants from `Const`, `Value`
([#679](#679))
- [**breaking**] HugrView API improvements
([#680](#680))
- Make FuncDecl/FuncDefn polymorphic
([#692](#692))
- [**breaking**] Simplify `SignatureFunc` and add custom arg validation.
([#706](#706))
- [**breaking**] Drop the `pyo3` feature
([#717](#717))
- [**breaking**] `OpEnum` trait for common opdef functionality
([#721](#721))
- MakeRegisteredOp trait for easier registration
([#726](#726))
- Getter for `PolyFuncType::body`
([#727](#727))
- `Into<OpType>` for custom ops
([#731](#731))
- Always require a signature in `OpaqueOp`
([#732](#732))
- Values (and hence Consts) know their extensions
([#733](#733))
- [**breaking**] Use ConvexChecker trait
([#740](#740))
- Custom const for ERROR_TYPE
([#756](#756))
- Implement RemoveConst and RemoveConstIgnore
([#757](#757))
- Constant folding implemented for core and float extension
([#769](#769))
- Constant folding for arithmetic conversion operations
([#720](#720))
- DataflowParent trait for getting inner signatures
([#782](#782))
- Constant folding for logic extension
([#793](#793))
- Constant folding for list operations
([#795](#795))
- Add panic op to prelude
([#802](#802))
- Const::from_bool function
([#803](#803))

### HugrMut

- Validate nodes for set_metadata/get_metadata_mut, too
([#531](#531))

### HugrView

- Validate nodes, and remove Base
([#523](#523))

### Miscellaneous Tasks

- [**breaking**] Update portgraph 0.10 and pyo3 0.20
([#612](#612))
- [**breaking**] Hike MSRV to 1.75
([#761](#761))

### Performance

- Use lazy static definittion for prelude registry
([#481](#481))

### Refactor

- Move `rewrite` inside `hugr`, `Rewrite` -> `Replace` implementing new
'Rewrite' trait ([#119](#119))
- Use an excluded upper bound instead of max log width.
([#451](#451))
- Add extension info to `Conditional` and `Case`
([#463](#463))
- `ExtensionSolution` only consists of input extensions
([#480](#480))
- Remove builder from more DFG tests
([#490](#490))
- Separate hierarchy views
([#500](#500))
- [**breaking**] Use named struct for float constants
([#505](#505))
- Allow NodeType::new to take any Into<Option<ExtensionSet>>
([#511](#511))
- Move apply_rewrite from Hugr to HugrMut
([#519](#519))
- Use SiblingSubgraph in SimpleReplacement
([#517](#517))
- CFG takes a FunctionType
([#532](#532))
- Remove check_custom_impl by inlining into check_custom
([#604](#604))
- Insert_subgraph just return HashMap, make InsertionResult new_root
compulsory ([#609](#609))
- [**breaking**] Rename predicate to TupleSum/UnitSum
([#557](#557))
- Simplify infer.rs/report_mismatch using early return
([#615](#615))
- Move the core types to their own module
([#627](#627))
- Change &NodeType->&OpType conversion into op() accessor
([#623](#623))
- Infer.rs 'fn results' ([#631](#631))
- Be safe ([#637](#637))
- NodeType constructors, adding new_auto
([#635](#635))
- Constraint::Plus stores an ExtensionSet, which is a BTreeSet
([#636](#636))
- [**breaking**] Remove `SignatureDescription`
([#644](#644))
- [**breaking**] Remove add_op_<posn> by generalizing add_node_<posn>
with "impl Into" ([#642](#642))
- Rename accidentally-changed Extension::add_node_xxx back to add_op
([#659](#659))
- [**breaking**] Remove quantum extension
([#670](#670))
- Use type schemes in extension definitions wherever possible
([#678](#678))
- [**breaking**] Flatten `Prim(Type/Value)` in to parent enum
([#685](#685))
- [**breaking**] Rename `new_linear()` to `new_endo()`.
([#697](#697))
- Replace NodeType::signature() with io_extensions()
([#700](#700))
- Validate ExtensionRegistry when built, not as we build it
([#701](#701))
- [**breaking**] One way to add_op to extension
([#704](#704))
- Remove Signature struct
([#714](#714))
- Use `MakeOpDef` for int_ops
([#724](#724))
- [**breaking**] Use enum op traits for floats + conversions
([#755](#755))
- Avoid dynamic dispatch for non-folding operations
([#770](#770))
- Simplify removeconstignore verify
([#768](#768))
- [**breaking**] Unwrap BasicBlock enum
([#781](#781))
- Make clear const folding only for leaf ops
([#785](#785))
- [**breaking**] `s/RemoveConstIgnore/RemoveLoadConstant`
([#789](#789))
- Put extension inference behind a feature gate
([#786](#786))

### SerSimpleType

- Use Vec not TypeRow ([#381](#381))

### SimpleReplace+OutlineCfg

- Use HugrMut methods rather than .hierarchy/.graph
([#280](#280))

### Testing

- Update inference test to not use DFG builder
([#550](#550))
- Strengthen "failing_sccs_test", rename to "sccs" as it's not failing!
([#660](#660))
- [**breaking**] Improve coverage in signature and validate
([#643](#643))
- Use insta snapshots to add dot_string coverage
([#682](#682))
- Miri ignore file-opening test
([#684](#684))
- Unify the serialisation tests
([#730](#730))
- Add schema validation to roundtrips
([#806](#806))

### `ConstValue

- :F64` and `OpaqueOp::new`
([#206](#206))

### Cleanup

- Remove outdated comment
([#536](#536))

### Cosmetic

- Format + remove stray TODO
([#444](#444))

### Doc

- Crate name as README title + add reexport
([#199](#199))

### S/EdgeKind

- :Const/EdgeKind::Static/
([#201](#201))

### Simple_replace.rs

- Use HugrMut::remove_node, includes clearing op_types
([#242](#242))

### Spec

- Remove "Draft 3" from title of spec document.
([#590](#590))
- Rephrase confusing paragraph about TailLoop inputs/outputs
([#567](#567))

### Src/ops/validate.rs

- Common-up some type row calculations
([#254](#254))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).

---------

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Agustín Borgna <[email protected]>
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.

feat: Constant folding pass
5 participants