- Give a specification for well versus ill formed borrows. (What are the rules the borrow checker should check).
- Give a specification for well versus ill formed borrows. (What are the rules the borrow checker should check).
- Two parameter references may not refer to the same value, even if the references themselves are different.
- The return lifetime must be declared.
- The return lifetime must be declared.
- The return lifetime must exist in the parameter lifetimes.
- The return lifetime must exist in the parameter lifetimes.
- Two return lifetimes that are declared identical must originate from the same function's state.
- Two return lifetimes that are declared identical must originate from the same function's state.
...
@@ -40,16 +40,13 @@
...
@@ -40,16 +40,13 @@
Comment on the alignment of the concrete course goals (taken from the course description) to the theory presented, work You have done and knowledge You have gained. (I have put some comments in [...]).
Comment on the alignment of the concrete course goals (taken from the course description) to the theory presented, work You have done and knowledge You have gained. (I have put some comments in [...]).
- Lexical analysis, syntax analysis, and translation into abstract syntax.
- Lexical analysis, syntax analysis, and translation into abstract syntax.
- Probably the hardest part theoretically as it was important to get the data structures right here. However, it was the easiest part to program in Rust due to the strictly hierarchial structure of the program flow. Precedence climbing and figuring out in what order the parser should check for things was fun problems to work with. This was the part I had the best knowledge of beforehand.
- Probably the hardest part theoretically as it was important to get the data structures right here. However, it was the easiest part to program in Rust due to the strictly hierarchial structure of the program flow. Precedence climbing and figuring out in what order the parser should check for things was fun problems to work with. This was the part I had the best knowledge of beforehand.
- The work I did here on piggybacknig meta-data to the AST proved very helpful when implementing error messages.
- The work I did here on piggybacknig meta-data to the AST proved very helpful when implementing error messages.
- Regular expressions and grammars, context-free languages and grammars, lexer and parser generators. [Nom is lexer/parser library (and replaces the need for a generator, while lalr-pop is a classical parser generator)]
- Regular expressions and grammars, context-free languages and grammars, lexer and parser generators. [Nom is lexer/parser library (and replaces the need for a generator, while lalr-pop is a classical parser generator)]
- I basically read through the code yesterday and build my context-free grammar from that. This was very easy, as it was simply a translation of the existing code. EBNF is rather trivial, so it did not pose a problem.
- I basically read through the code yesterday and build my context-free grammar from that. This was very easy, as it was simply a translation of the existing code. EBNF is rather trivial, so it did not pose a problem.
- Identifier handling and symbol table organization. Type-checking, logical inference systems. [SOS is a logical inference system]
- Identifier handling and symbol table organization. Type-checking, logical inference systems. [SOS is a logical inference system]
- I find SOS a hard concept to grasp. It works well for simple expressions and statements, but what about function calls and return statements?
- I find SOS a hard concept to grasp. It works well for simple expressions and statements, but what about function calls and return statements?
- The same is true for the Type Checking rules for statements, as my statements are type free (although they are dependent on internal type-checking).
- The same is true for the Type Checking rules for statements, as my statements are type free (although they are dependent on internal type-checking).
- The practical type-checking worked out rather well though. It's very liberating when working with the interpreter to know that the AST is type-correct.
- The practical type-checking worked out rather well though. It's very liberating when working with the interpreter to know that the AST is type-correct.