-
Notifications
You must be signed in to change notification settings - Fork 398
[ refactor ] ScopedSnocList: Swap Scope on SnocList (Phase 2)
#3513
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
base: main
Are you sure you want to change the base?
Conversation
2a9fa0b to
b68532b
Compare
bed6788 to
ff61ad5
Compare
ff61ad5 to
9367788
Compare
9367788 to
5278b55
Compare
33f2799 to
749fa54
Compare
|
Be aware that it may take a while! Next week is the TYPES conference We may be able to meet after that but then annual leave may kick in (I'll be away late June to early July). |
749fa54 to
c128cdf
Compare
c128cdf to
cf57ff6
Compare
|
@gallais a reminder at the middle/end of July probably after annual leave |
|
We're meeting tomorrow for a first go at this PR. |
|
I think solving merge conflicts later is the better approach. We tend to do some refactoring during review (e.g. PR #3593) when we spot opportunities that are too tempting to ignore but those shouldn't be too difficult to merge. I am sure Guillaume and I can help resolving conflicts once we are done reviewing. EDIT: wrong PR number. |
|
hm, I've tried to track the changes but this commit is unclear for me. Could you put more info there? |
|
That last one is ongoing changes that are not thematically linked beyond being part of the review as a whole. |
I can help with that |
|
The new academic year is about to start so unfortunately I don't think I'll be able to come back to this for a while. |
I mean I could take the branch, make a rebase, and finally propose all these changes to merge at this pr. What do you think? |
|
I've collected commits from mjustus@3578f70, then added holes to make it compilable as is to see the needed surface to fix. Applied trivial fixes. Working on filling holes. |
7470b35 to
3ba6e08
Compare
Sure, I will try update Chez and Racket to minimal version which support |
|
Some experiments with time measurements. Time to build this branch by a compiler which are at the
Actually we use Time to build this branch by a compiler which is compiled from this branch (11 attempts):
Well, So, really, the compiler with applied our Snoc refactor is totally no slower than its origin version at |
|
I see no 10 version of Racket here: https://download.racket-lang.org/releases/. Will 9.x work? It seems that https://docs.racket-lang.org/reference/fixnums.html states that it should be present at |
Yep, that will work (I think I conflated the necessary Chez Scheme version (v10.0.0) and Racket version (v7.9 and above). |
3ba6e08 to
20a8850
Compare
|
@Matthew-Mosior at first attempt it works for |
9b2e4b7 to
75c1a7d
Compare
|
It works! |
Add pthread mutex to DirInfo structure to protect against concurrent access when reading directory entries. This fixes "Cannot allocate memory" errors that occurred due to thread safety issues with readdir. The deprecated readdir_r function is no longer used, so we implement proper mutex locking around readdir calls instead. Mutex is initialized when opening a directory and destroyed when closing it. - Add pthread.h include for mutex operations - Initialize mutex in idris2_openDir with error handling - Add mutex lock/unlock around idris2_nextDirEntry - Destroy mutex in idris2_closeDir
- Pin Node.js installation from latest to version 24 for consistency (version 24 is currently the latest) - Pin Chez Scheme installation to specific version 10.3.0 (10.x is required by coming idris-lang#3704) - Add pinned Racket installation via Homebrew cask to run Racket backend tests on macOS
Co-authored-by: Justus Matthiesen <[email protected]>
Replace List-based tracking of erased variables with specialized VarSet type for improved performance. Changes include: - Update getErased function in Env.idr to return VarSet instead of List - Modify linear check functions to use VarSet operations throughout - Add elemNat helper for efficient natural number lookups in VarSet - Use VarSet.empty constant instead of empty lists - Apply proper weakening operations with varSetWeaken interface This improves efficiency of linearity checking by using specialized set operations instead of list traversals.
+ Cherry-picked refactor from #16 Co-authored-by: Viktor Yudov <[email protected]> fix
- generalised lookup - define resolveRef as the weakening of findBound, add missing cases to substName - define underBinders, fix argument order - added underBinderz, more GenWeakenable instances - complete refactors regarding swapping inner/outer - change constructor argument representation from Scope to List Name Co-authored-by: Justus Matthiesen <[email protected]>
|
It seemed to work fine with mutex and chez @dunhamsteve thanks for the pointing! |
109335e to
09c6d74
Compare
|
I tried the |
|
@Matthew-Mosior I responded there about your CI pipeline. It seemed to me you tried not only my changes but with something else, so, the issue might be at something else. |
Introduces the actual swap of
ListonSnocListforScope.Should this change go in the CHANGELOG?
implementation, I have updated
CHANGELOG_NEXT.md(and potentially alsoCONTRIBUTORS.md).