spartan

所属分类:其他
开发工具:Racket
文件大小:0KB
下载次数:0
上传日期:2023-12-10 20:43:04
上 传 者sh-1993
说明:  一个小的Lisp方言,用作编程语言功能的测试平台。
(A small Lisp dialect that serves me as a test bed for programming language features.)

文件列表:
src/
test/
LICENSE
foof.png
foof.svg
run-file.sh
run-tests.sh

Spartan

Spartan is a small Lisp dialect that serves me as a test bed for programming language features. Currently implemented features are: - executable language grammar defined as a (PEG parser generator)-generated parser, - recursion by way of `letrec` conversion with strongly conected components reordering & assignment conversions, - a first-class module system with a shorthand accessor syntax (`module`, `structure` and `foo.bar`). - continuations - both delimited (`shift` & `reset`) as well as undelimited (`letcc`), - exception handling with restarts (`raise` & `handle`) relying on the continuations, - actor model (`spawn`, `send`, `recv`), - a built-in, Rete-based Rule Based System (`signal!`, `assert!`, `retract!`, `select` and `notify-whenever`), See [here](https://github.com/Idorobots/spartan/blob/master/test/sprtn) for some usage examples. The compiler is far from being useful, it doesn't even have a code generator yet, and it performs only rudimentary low-hanging fruit optimizations. It loosely follows the nanopass framework, with currently implemented passes being: - parsing, - built-in macro expansion, - syntax tree elaboration, - implicit body handling, - quasiquote expansion, - constant value annotation, - free-variable annotation, - binding form analysis, - syntax tree validation, - alpha conversion, - built-in function inlining, - user function inlining, - constant propagation, - constant folding, - common subexpression elimination, - copy propagation, - dead code elimination, - `letrec` binding reordering, - `letrec` conversion, - continuation passing style transformation, - flat closure conversion, - global value hoisting, - target-safe name mangling.

近期下载者

相关文件


收藏者