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: Accounting for Spillage #170

Merged
merged 4 commits into from
Jun 17, 2024
Merged

Conversation

DavePearce
Copy link
Collaborator

No description provided.

This updates the system to enable correct accounting of spillage.  At
this stage, there remains an outstanding problem related to the handling
of sorted permutations.  In particular, the padding values are not
determined correctly.  The issue seems to be that, for a negative
permutation sort, we actually want to pad at the back (i.e. not the
front).

I think the next step is to investigage what Corset does.  Perhaps this
is actually where it uses back padding.
This puts in place a partial fix for the spillage issue.  The intuition
here is that we have a sign for padding, and that padding can happen on
the front or the back.

However, at the moment, it is broken because when padding is applied the
height of the trace is not being updated.  The best solution will be to
add a method `Pad()` to `Trace` which accepts an iterator over the signs
of the column.  This can be used to properly pad the columns in one go.
This fixes the padding API to use an iterator, and removes the
`InsertFront` method which is now subsumed.  The remaining step is to
actually maintain a padding direction for each column.
@DavePearce DavePearce linked an issue Jun 17, 2024 that may be closed by this pull request
@DavePearce DavePearce changed the title 117 feat accounting for spillage feat: Accounting for Spillage Jun 17, 2024
There are some genuinely hard problems with negative permutation sorts.
The current solution is simply to prohibit permutation sorts whose
"index column" (i.e. leftmost column) is negatively sorted.  There is an
additional issue that traces which have a `0` for this column prior to
expansion will (most likely) be rejected.
@DavePearce DavePearce force-pushed the 117-feat-accounting-for-spillage branch from 953de6b to e0bdd65 Compare June 17, 2024 04:06
@DavePearce DavePearce merged commit 28dbfe5 into main Jun 17, 2024
2 checks passed
@DavePearce DavePearce deleted the 117-feat-accounting-for-spillage branch June 17, 2024 04:08
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: Accounting for Spillage
1 participant