5df87a53cfProper progress decisionmaking via NeededIDs and DCtx taking into account ids and hashes (not that we're storing hashes yet)Nathan Braswell2023-02-19 19:28:48 -05:00
71326738faFirst basic use of suspended lookup progress using the environment, basic tests passing again for peNathan Braswell2023-02-19 18:52:39 -05:00
91e0641045Split Ctx into BCtx (bi-directional ctx, must be returned) and DCtx (downwards-ctx, only passed down). Env goes in DCtx, so you don't have to play a replace-back game with ctx when returning from function calls.Nathan Braswell2023-02-19 12:37:12 -05:00
283c0232b0Some steps forward, some back - add sanity testing that eval(e,x) == parial_eval(ctx, x.unval()), start fixing the bugs it reveals, split SuspendedLookup into SuspendedEnvLookup and SuspendedParamLookupNathan Braswell2023-02-19 01:18:59 -05:00
fdaca7f807Implement basic derived calls, and fix eval not unvaling bugNathan Braswell2023-02-19 00:46:54 -05:00
b893787a1bmove towards just MarkedForm (with no Value(Form)), with Attempted and MarkedIDs, and sketch out the MarkedForm::PrimComb versions of all the primitives with translation from PrimCombNathan Braswell2023-02-18 19:32:59 -05:00
66fc1db606Implemented Display for Form, then first sketch of MarkedForm, NeededIds, and unval, and Display for MarkedFormNathan Braswell2023-02-14 00:50:05 -05:00
ad3c251ba9implement non-varidic and/or and start porting match. Need to make and/or varidac and continue match workNathan Braswell2023-02-13 01:08:34 -05:00
3df7d6e0ecFinish converting into individual tests (mostly) - might need to split out and uncomment some should-fail testsNathan Braswell2023-02-13 00:42:54 -05:00
e9b8f636cfStart splitting out the tests into multiples, with the library code at top level in once_cell's LazyNathan Braswell2023-02-12 16:16:59 -05:00
5838cf0bddAdded 'assert', and changed match_params to assert that when the param tree is nil so are the passed params, which should handle exact length for functions etc. Added unwrap, lapply, array, the Y combinator, and rlambda. Y and rlambda were almost verbatim copies from old Kraken, with a change for how variadic functions are declared ( '( & args )' vs 'args' ) and a name change.Nathan Braswell2023-02-12 13:30:45 -05:00
30964bf4ecBetter BVAU, which does full trees-of-symbols destructuring with varidic support!Nathan Braswell2023-02-12 11:56:32 -05:00
c028e975d4Add wrap, vfoldl, zipd, concat, bvau, and lambda! Need to add varidac handling to bvau, but getting tiredNathan Braswell2023-02-11 00:34:24 -05:00
606972a38bImplement vapply, got around the ever-growing environmentNathan Braswell2023-02-10 22:34:04 -05:00
3c2dfbf8a7Add tail call recursion - works, but if a datastructure is too deep (say, because env keeps growing on the heap) Rc::drop will end up overflowing the stack when trying to deallocateNathan Braswell2023-02-10 19:38:44 -05:00
ba67b8c67bAdd "!" syntatic form - a bit like the single quote, but !(a b c) d => !(a b c d). Useful for like !(let a 1) (+ a 3) or w/e. Break out some of the infinate nesting"Nathan Braswell2023-02-10 01:01:04 -05:00
3b5cc2c506Implement a new style of let1 based on direct env manipulationNathan Braswell2023-02-09 01:20:19 -05:00
02e359f42dFinish out the basic primitives along with testing infra for both parsing and evalaution, with some slick Into<> impls to make Rust values Kraken values, which is esp useful for testingNathan Braswell2023-02-08 23:37:23 -05:00
c801f604c2Add derived combiners and fix some bugs with eval, vau, quote, cons, car, cdrNathan Braswell2023-02-07 13:00:15 -05:00
60dad101f8Speed sketch beginnings of a Rust implementation of new stripped-down Scheme-like KrakenNathan Braswell2023-02-07 02:07:53 -05:00
3807381cebSketch out call-info, realized it and function-analysis needs pectx and also err threaded through it, since it can fail (which must be recoverable) and needs env and pectx for partial_eval insideNathan Braswell2023-02-02 01:18:17 -05:00
bea48eb18bReviewing and making notes about analysises, looking to see if they can be implemented with a generic traversal or somethingNathan Braswell2023-02-01 01:01:37 -05:00
a038a8cebfEnsure proper env care during memo short circuitingNathan Braswell2023-01-31 22:54:53 -05:00
967ec0feb4After too much procrastination trying a bunch of parentheses editing plugins (parinfer the most interesting), did a bit of actual work and refactoring where the compiled function is checked for and inserted using both the pre and post partial-eval hash, and the analysis functions are pulled out together into a single meta analysisNathan Braswell2023-01-31 00:59:16 -05:00
c20ba09179clean up compile more, going straight to pulling out of memo, removing compile-body-part, removing now-unecessary recursion checking (for ping-pong between partial-eval and compile-inner because of how we now check memo and normalize), and finally add all tests to new_test.shNathan Braswell2023-01-25 02:22:10 -05:00
2146ecd761Commit current things
Sharjeel Khan
2022-11-11 00:20:05 -05:00
70f151222ePicolisp two examples
Sharjeel Khan
2022-11-11 00:19:32 -05:00
8638086480Added ability to turn off 4 major optimizations, integrated into benchmarks now focused only on Kraken (and NewLisp)
Nathan Braswell
2022-11-10 02:10:56 -05:00
a7248daca0Added new benches and will add the rest of them
Sharjeel Khan
2022-11-08 22:49:43 -05:00
7eb8465f64First maybe working version of borrow?. Now need to figure out exactly how to integrate into compiler
Nathan Braswell
2022-07-19 23:42:24 -04:00
82f652b178first paper data
Nathan Braswell
2022-07-09 13:58:11 -04:00
196b0865c4Benchmark adjustments and plotting
Nathan Braswell
2022-07-06 21:26:10 -04:00
e95feb9309tiny perceus fix, but mostly wrote match+rb-tree f-expr/macro for newLisp and benchmarked it. kraken 5-15x faster than newlisp-rbtree-macro, 137x faster than newlisp-rbtree-fexpr. I was suprised at first that the macro and fexpr versions were so close at 8.7x (while interpreted kraken rbtree is 50,000x slower), but after thinking about it it makes sense - the Kraken version has slowdown exponential in the multiple levels of f-exprs ('match' is an fexpr, but then so is 'let' and 'and' and 'lambda'), whereas the newLisp f-expr runtime expands to fast builtins ('let', 'and', etc). And all that exponential f-expr slowdown gets compiled away in Kraken!
Nathan Braswell
2022-07-06 02:34:48 -04:00
2cdfa4dbedMostly sketch out borrow?, just have to thread through perceus data and figure out if we want to output a combined version to the user with a common entry point. Fixed a pseudo-perceus cond ordering issue as well, and now makes pseudo-perceus store if a symbol access is an owning sink - but this has a bug somewhere in Pseudo-Perceus causing this to error for now
Nathan Braswell
2022-07-05 02:51:48 -04:00
131824b230First impl of Pseudo-Perceus, added veval case to infer_types, modified how lookups work on s_env, now lookups into enclosing envs don't reify current environments by starting at the outer env after climbing out of the inlined functions + main function
Nathan Braswell
2022-07-05 01:41:58 -04:00
15bf38db2bImplement the first scaffolding for pseudo_perceus, support operatives in lapply (but not yet applicates in compiled vapply). Means (foldl and true (array true true false)) actually works now, for the paper!
Nathan Braswell
2022-07-04 00:47:17 -04:00
a64c67571fsmall refactor around parameter array creation, then used it to inline calls to 'array' (which are almost no-ops, just returning their parameter array)
Nathan Braswell
2022-07-03 20:29:53 -04:00
b1817dfdc3Add newLisp, our second interpreted lisp implementation that supports f-exprs today, (not in NixOS, but pretty easy to build, so inlined deriviation right in flake.nix). Implemented simple fib/fib-let test.
Nathan Braswell
2022-07-03 00:50:00 -04:00
07a25c8c59Infer types of full idx expressions now, fix bug with shadowed inlined parameters, inline calls to idx where the type of the indexed expression is fully inferred (array+len) and the idx is a constant. Strong speedups
Nathan Braswell
2022-07-02 19:00:20 -04:00
b70e317e75Fixed it! Missed converting the inline call to the inline predicate to use id instead of env. Then exposed and fixed bugs with the inline part of infer types
Nathan Braswell
2022-07-02 17:10:16 -04:00
9edfddd09cPartial commit for debugging - almost have (maybe do have?) the type inference working (everything but asserts) good enough for idx, but somewhere inlining got messed up and nothing's inlining.
Nathan Braswell
2022-07-02 16:55:12 -04:00
f6b4231fcaBugfix, improve, and thread through infer_types. Need to improve so that it can properly work & re-up through unval-and-eval. Also, will need to track idxs into symbols, I think. Need to continue to investigate how match is translated and that we get all types from it
Nathan Braswell
2022-07-02 01:23:14 -04:00
88a87f0760Implement a good bit of the type inference (predicate ops, 'and', and len type inference). Need to implement combine_type_map, and figure out the structural caching
Nathan Braswell
2022-06-30 00:59:04 -04:00
4663982f1bMove kraken,scheme,python,cpp fib tests over to koka_bench, add WAVM as a tested compiler backend for the Kraken benchmarks
Nathan Braswell
2022-06-28 00:38:37 -04:00
999d21746einline dup and most of drop, relative added to benchmarks, added first basic run (without any of the complex stuff implemented) of local type inference and use it to do word value equality if possible
Nathan Braswell
2022-06-27 01:48:07 -04:00
71ad070922inline get_ptr with slightly more efficiency
Nathan Braswell
2022-06-24 00:39:10 -04:00
ae320ba31bMost things seem to be working now, with new benchmarks. Not sure if a small memory leak is now or was there before
Nathan Braswell
2022-06-23 01:00:27 -04:00
04f3b2dbd9Fixed static type errors, test runs now. Rbtree test has a dynamic indirect call failure, so there are still more issues to find
Nathan Braswell
2022-06-22 14:04:56 -04:00
1c3ee27547More fixes, runs test now, but generated wasm has type errors
Nathan Braswell
2022-06-22 01:43:04 -04:00
6605050590More bugfixes and debugging
Nathan Braswell
2022-06-22 01:26:21 -04:00
bf8d25e551Fix a bunch of syntax errors
Nathan Braswell
2022-06-22 00:46:35 -04:00
b665877addFinish first pass through refactoring all tagging. Need to test and bugfix
Nathan Braswell
2022-06-21 23:25:04 -04:00
b7bfc314e6Did most of re-tagging, pick back up porting at compile
Nathan Braswell
2022-06-21 02:18:06 -04:00
dda581f839Initial interning of symbols
Nathan Braswell
2022-06-20 17:20:50 -04:00
81a54b5a06Old .gitignore actually prevent the kraken versions of the benchmarks from being comitted, scarily enough - also some of the c fib tests
Nathan Braswell
2022-05-18 01:28:49 -04:00
7fef7eba85Add cfold benchmark - can't go over 5 (though Koka uses 20) because wasm runs out of stack. Not entirely sure how to handle that - I imagine we're emitting far to much on the stack frame, but also I would hope wasmtime would optimize it, and I additionally can't find a way to raise wasmtime's limit from the cli... It is worth noting that Koka notes that cfold is a benchmark that can exhaust the stack
Nathan Braswell
2022-05-17 23:34:46 -04:00
e6a1ad5bf3Add nqueens benchmark (new kraken impl, with koka and cpp moved over from koka_bench)
Nathan Braswell
2022-05-16 23:00:56 -04:00
5ee4020c2bUpdate readme to state source of koka_bench and to call out the different license for that directory
Nathan Braswell
2022-05-16 02:36:30 -04:00
b1b060292eMoved over first rbtree test from koka_bench and integrated Kraken via compiler wrapper script that calls the partial_evaluator / compiler and then emits a wrapper script that runs the resulting wasm via wasmtime.
Nathan Braswell
2022-05-16 02:33:10 -04:00
025ca41c59Add support for command line arguments as a monad
Nathan Braswell
2022-05-16 01:35:36 -04:00
8c773fd0d8Add deallocation in TCE for rare-er stuff - our test doesn't actually use it yet
Nathan Braswell
2022-05-14 02:20:05 -04:00
8bc092cdebGAH the matching.kp was using the old broken Y combinator, fixing it makes it work. We're, uh, 682x slower than Koka
Nathan Braswell
2022-05-14 01:46:53 -04:00
6683344357Initial implementation of TCE - doesn't properly drop params/locals, and doesn't activate for the RB-Test for some reason, but does run for the long_fact
Nathan Braswell
2022-05-12 00:34:19 -04:00
50d68c3424Groundwork for Tail Call Elimination. Prints out when it should happen, but doesn't actually do it
Nathan Braswell
2022-05-11 00:59:41 -04:00
20c46af986Merge branch 'master' of github.com:Limvot/kraken
Nathan Braswell
2022-05-09 23:42:45 -04:00
a966c0c0baUsing a nice Pure Nix Flake now, implement Koka-style rb-tree test (only running on 100 instead of 42,000,000 - .06s compiled, 40m54s interpreted!!!), also a small fact to test loops - spoiler alert we need tail-call-elimination
Nathan Braswell
2022-05-09 23:42:39 -04:00