User loginNavigation |
archivesTranspiling a dynamically typed language to a statically typed languageHi, I have been pondering what I want to do for my master My idea is to write a source-to-source compiler from a Lisp_2 to Below is a rough draft for the introductory chapter. Beware that Kind regards, Imbuing Lisp with the thread-safety guarantees of Rust by using a source-to-source compiler. IntroductionThis short introductory chapter starts by presenting the question we are trying to answer, followed by a summary of our suggested solution that provides a definitive answer to the our question. We end this chapter ends with an overview of the subsequent chapters. The questionBy compiling a language Transpiling A commonly selected target language for a transpiler is the programming language "C". Since C is available on practically any machine, the C-code that is generated from a program written in Moreover, any optimizations that the C-compiler can achieve are automatically and implicitly available to the source language In the case of C there are numerous pain-points such as pointers running amok and its lack of built-in garbage collection. If the source-language is a garbage-collected language, that is type-safe, such problems have to be addressed in the source-to-source compiler. Furthermore there are certain limits imposed on our source language by the limitations of C has, such as a maximum of 32 arguments in function calls or less than 16 levels of lexical blocks. Inherently, each source language presents its own set of advantages and negative consequences with respect to the source language. The Rust programming language, which is a systems programming language that is a contender in the same domain as C and C++, has the desireable attribute of guaranteeing thread-safety and threads without dataraces. The question then is, can a specific source language compiled into Rust be unequivocally determined to be thread-safe through the merits of the source-to-source compiler alone? The solution and answerIn this text we present a source-to-source compiler from a Lisp2 dialect to Rust whereby we can, through the use of the Rust compiler Since there is no additional body of work this subsection cannot be fully written, but a rough layout of the remainder of the text would probably look like: Chapter 1. An overview of Lisp and a formal description of our dialect as well as an overview of our concurrency model (not sure if the latter is necessary) Chapter 2. A precursory introduction to Rust with references to papers demonstrating the validity of the claims that Rust provides thread safety guarantees and data race guarantees as this is a corner stone to our work. Chapter 3. Examples from concrete programs written in the Lisp dialect that will serve as benchmarks when evaluating the code generated by our compiler. Chapter 4. An overview of the implementation of the compiler that also discuss alternative implementation choices and why they were not chosen Chapter 5-(maybe several chapters): Explanations describing the parts of the different compilation phases. It is probable that we will encounter some automatas here. Chapter 6: Code generation optimizations and translation strategies to portable Rust code. Chapter 7: Evaluation of benchmarks Chapter 8: Discussions of possible applications, such as tiering source-to-source compilers in a layered fashion to successively imbue desireable traits from each language in the compilation sequence to the top-most source language. Appendices: Complete source code for the compiler |
Browse archivesActive forum topics |
Recent comments
22 weeks 1 day ago
22 weeks 2 days ago
22 weeks 2 days ago
44 weeks 3 days ago
48 weeks 5 days ago
50 weeks 2 days ago
50 weeks 2 days ago
1 year 6 days ago
1 year 5 weeks ago
1 year 5 weeks ago