Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
d739e00
Add check for normal form
b-studios Sep 3, 2025
c91f531
WIP add first draft of new normalizer
b-studios Sep 3, 2025
372c047
Start supporting recursive local functions and reset and shift
b-studios Sep 3, 2025
b3e92f0
WIP fix a few bugs
b-studios Sep 3, 2025
e90094e
WIP bargs for direct app
b-studios Sep 3, 2025
a0b7474
WIP support resume and avoid eta-redexes
b-studios Sep 3, 2025
6466381
WIP before proper shift
b-studios Sep 3, 2025
c3c7c58
Start preparing for iterated CPS
b-studios Sep 4, 2025
945c826
Add jump and reorganize a bit
b-studios Sep 5, 2025
fd59e67
Introduce closures
b-studios Sep 5, 2025
ca63185
Rename Stack to Frame
b-studios Sep 5, 2025
f91bef0
Reify stacks
b-studios Sep 8, 2025
763ca4f
Notes from the meeting
b-studios Sep 8, 2025
3862bcb
Draft inline and joinpoints
b-studios Sep 9, 2025
e379d02
Avoid trivial continuations again
b-studios Sep 9, 2025
6caa47b
Experiment with inlining strategies
b-studios Sep 9, 2025
a0ecb85
Capture the continuation statically
b-studios Sep 9, 2025
3cd1e21
WIP
b-studios Sep 9, 2025
ab34284
Update comments
b-studios Sep 11, 2025
0fa7753
Implement box/unbox in new normalizer
timsueberkrueb Sep 25, 2025
2f1000e
Import effekt.core.Pure
timsueberkrueb Sep 25, 2025
6c7845e
Second try to un-confuse Scala
timsueberkrueb Sep 25, 2025
b916e6c
Add two test cases for normalizing boxes
timsueberkrueb Sep 29, 2025
7389fef
Fix copy-pasted doc comment
timsueberkrueb Sep 29, 2025
dfaa230
Add test case for neutral unbox
timsueberkrueb Sep 29, 2025
99c4203
Properly implement unbox handling
timsueberkrueb Oct 2, 2025
5ec0c04
Collapse Box again
timsueberkrueb Oct 2, 2025
202a0ea
add TODOs for regions and mutable state
dvdvgt Oct 2, 2025
4c0d42b
fix ImpureApp
dvdvgt Oct 2, 2025
6a9b7eb
Fix tests
timsueberkrueb Oct 2, 2025
853302c
progress on local state
dvdvgt Oct 2, 2025
e5ec970
Add simple test case for mutable variables
timsueberkrueb Oct 6, 2025
41de27d
Throw proper errors in impossible cases
timsueberkrueb Oct 6, 2025
1cc680d
Throw proper error in impossible case
timsueberkrueb Oct 6, 2025
cf1eef6
Add test for mutating peano Nats
timsueberkrueb Oct 7, 2025
74071b5
Work on normalizing state
timsueberkrueb Oct 14, 2025
044010e
Add test case for passing mutable var to id
timsueberkrueb Oct 14, 2025
c207585
Add test case for tracked mutation
timsueberkrueb Oct 14, 2025
ac047de
Implement neutral put
timsueberkrueb Oct 20, 2025
f36d297
Fix unbox
timsueberkrueb Oct 20, 2025
4ba304b
Correct test name
timsueberkrueb Oct 20, 2025
1bb6918
Add failing test case
timsueberkrueb Oct 20, 2025
f8e8613
Fix captures when embedding recursive bindings
timsueberkrueb Oct 21, 2025
6dab62f
add some more tests
dvdvgt Oct 21, 2025
1d615a6
try fixing recursive calls with captures
dvdvgt Oct 21, 2025
9e8fb04
normalize twice for recursive functions
dvdvgt Oct 22, 2025
21d1b41
fix evaluateRecursive
dvdvgt Oct 22, 2025
0fc8be1
fix pretty printer
dvdvgt Oct 23, 2025
eb7fecb
add comment about region desugaring
dvdvgt Oct 24, 2025
c15d413
add idea about fixing reification stack over-approximation
dvdvgt Oct 24, 2025
a4ee492
naively implement region normalization
dvdvgt Oct 24, 2025
3266782
don't reify regions if unneeded
dvdvgt Oct 24, 2025
c1ce5e6
fix var pretty printer
dvdvgt Oct 24, 2025
76b1927
add comment to evaluate(Stmt)
dvdvgt Oct 24, 2025
80ce8fe
refactor
dvdvgt Oct 24, 2025
6238994
try to eta-expand closures when embedding
dvdvgt Oct 24, 2025
603501a
try fixing eta-expansion
dvdvgt Oct 27, 2025
f5e7ec5
Fix looking up top-level vals
timsueberkrueb Oct 28, 2025
84a7c37
Add test case for @dvdvgt's fix
timsueberkrueb Oct 28, 2025
99e31f1
Fix typo
timsueberkrueb Oct 28, 2025
7f23c7f
fix region alloc bug
dvdvgt Oct 28, 2025
ff4e60d
use capture information when eta-expanding
dvdvgt Oct 28, 2025
f8f1ca7
simplify Region stack: don't store initial Addr
dvdvgt Oct 28, 2025
ebf8135
extract eta-expansion into function
dvdvgt Oct 28, 2025
6016942
Split cparams off bparams when embedding interface instances
timsueberkrueb Oct 28, 2025
7fe6e75
fix targs
dvdvgt Oct 28, 2025
06595c9
Make type of Closure.environment more precise
timsueberkrueb Oct 28, 2025
750c0a6
refactor etaExpand to make it more readable
dvdvgt Oct 28, 2025
f128858
etaExpand -> etaExpandToBlockLit
timsueberkrueb Oct 28, 2025
2556084
Extract etaExpandToOperation
timsueberkrueb Oct 28, 2025
7119c7b
add comment about evaluate of Box being wrong currently
dvdvgt Oct 28, 2025
efb1536
fix toplevelEnv in run
dvdvgt Oct 28, 2025
d70d8e6
Improve TODO
timsueberkrueb Oct 28, 2025
6733ee7
Provide types for async externs
timsueberkrueb Oct 29, 2025
2b949fa
fix async top-level defs
dvdvgt Oct 30, 2025
b754eeb
fix escape analysis for Boxes
dvdvgt Oct 30, 2025
affa610
fix Stack.Var reification
dvdvgt Oct 30, 2025
7cf8ed7
Remove redundant init value tracking
timsueberkrueb Nov 4, 2025
d202bdd
fix region reification
dvdvgt Nov 4, 2025
2da5d4c
some comments
dvdvgt Nov 4, 2025
94d7a59
fully reactivate VM tests
dvdvgt Nov 4, 2025
3396014
don't assertNormal for now (broken due to missing inlining)
dvdvgt Nov 4, 2025
dac43b2
fix bindings of top-level defs
dvdvgt Nov 4, 2025
1ed7966
reifyKnown if call is pure
dvdvgt Nov 4, 2025
a1ec539
fix error in get and put for regions
dvdvgt Nov 4, 2025
e6ee9ea
also check environment to determine whether App is pure
dvdvgt Nov 4, 2025
324e056
Rip out previous attempt at inlining
timsueberkrueb Nov 5, 2025
6ffc203
delete Computation.Inline
dvdvgt Nov 5, 2025
801626e
add very basic inliner
dvdvgt Nov 6, 2025
353b2dd
get inliner to work
dvdvgt Nov 6, 2025
e192604
always inline jumps
dvdvgt Nov 10, 2025
f146898
fix renaming when inlining
dvdvgt Nov 12, 2025
d22117e
integrate inliner into optimization pipeline
dvdvgt Nov 12, 2025
ed0b260
first step in separating free variable computation from dynamic captu…
dvdvgt Nov 12, 2025
9f25839
fix resume function
dvdvgt Nov 17, 2025
990f6a9
use dynamic capture for deciding whether to use reifyKnown
dvdvgt Nov 17, 2025
d5aa04f
run Normalizer, Inliner, Normalizer
dvdvgt Nov 17, 2025
f78d528
use old optimization pipeline with new-normalizer
dvdvgt Nov 18, 2025
e5458db
Implement something like dependent specialization for repeated matche…
b-studios Nov 19, 2025
4f83aeb
bind variables so that they can be used as bargs
dvdvgt Nov 19, 2025
b2e567a
fix pretty printing of Def with ImpureApp
dvdvgt Nov 19, 2025
f5ffb0a
fix inlining of toplevel functions
dvdvgt Nov 19, 2025
3b60b4c
try to inline method calls
dvdvgt Nov 19, 2025
f162c04
Implement initial support for builtins evaluation
timsueberkrueb Nov 19, 2025
a871e7b
optimize linear usage of cont. in match
dvdvgt Nov 22, 2025
bc00c8d
experiment with inlining policy
dvdvgt Nov 22, 2025
5be2cb0
remove DirectStyle opt. from opt. pipeline
dvdvgt Nov 22, 2025
94c2126
Initial algebraic simplification for integers
timsueberkrueb Nov 26, 2025
b325eb9
Make doc comment more precise
timsueberkrueb Nov 27, 2025
5794b86
Add further builtin integer operations from vm builtins
timsueberkrueb Nov 27, 2025
34c0937
Split up NewNormalizer into submodules
timsueberkrueb Nov 27, 2025
ce03f5d
Improve comments
timsueberkrueb Nov 27, 2025
73a8580
Support more builtin simplification on literals
timsueberkrueb Nov 27, 2025
88d0516
Lowercase integer theory object
timsueberkrueb Nov 27, 2025
0a6b44a
Add initial theory of strings
timsueberkrueb Nov 27, 2025
1236029
Fix compilation
timsueberkrueb Nov 27, 2025
5e846c4
Fix most NewNormalizerTests
timsueberkrueb Nov 27, 2025
f8256b6
Add test case for compile-time string concat
timsueberkrueb Nov 27, 2025
5cfb485
Work on reflexivity for neutral integers
timsueberkrueb Dec 1, 2025
2ca7319
Fix test case for non-reflexivity of impure extern calls
timsueberkrueb Dec 1, 2025
53556f1
Evaluate infixEq with string neutrals
timsueberkrueb Dec 1, 2025
0299153
move new normalizer
dvdvgt Dec 1, 2025
8e40705
Hide new normalizer behind flag
timsueberkrueb Dec 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions effekt/jvm/src/main/scala/effekt/EffektConfig.scala
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,19 @@ class EffektConfig(args: Seq[String]) extends REPLConfig(args.takeWhile(_ != "--
group = debugging
)

// Experimental
// ------------

lazy val newNormalizer = toggle(
"new-normalizer",
descrYes = "Use the new normalizer implementation",
descrNo = "Use the old normalizer implementation",
default = Some(false),
noshort = true,
prefix = "no-",
group = group("Experimental Features")
)

/**
* Tries to find the path to the standard library. Proceeds in the following
* order:
Expand Down
16 changes: 16 additions & 0 deletions effekt/jvm/src/test/scala/effekt/core/CoreTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,21 @@ trait CoreTests extends munit.FunSuite {
|""".stripMargin
})

def shouldBeEqual(obtained: Toplevel, expected: Toplevel, clue: => Any)(using Location) =
assertEquals(obtained, expected, {
s"""${clue}
|=====================
|Got:
|----
|${effekt.core.PrettyPrinter.format(obtained).layout}
|
|Expected:
|---------
|${effekt.core.PrettyPrinter.format(expected).layout}
|
|""".stripMargin
})

def shouldBeEqual(obtained: Stmt, expected: Stmt, clue: => Any)(using Location) =
assertEquals(obtained, expected, {
s"""${clue}
Expand Down Expand Up @@ -55,6 +70,7 @@ trait CoreTests extends munit.FunSuite {
assertEquals(obtainedPrinted, expectedPrinted)
shouldBeEqual(obtainedRenamed, expectedRenamed, clue)
}

def assertAlphaEquivalentStatements(obtained: Stmt,
expected: Stmt,
clue: => Any = "values are not alpha-equivalent",
Expand Down
Loading
Loading