Assignments in SNU CSE Programming Language (4190.310) lecture, at 2022 spring.
All the codes are written in OCaml, version 4.02.3.
6 basic problems to be familiar with OCaml programming language.
To compile and run all testcases:
$ cd HW1
$ make test
6 other basic problems to be familiar with OCaml programming language.
To compile and run all testcases:
$ cd HW2
$ make test
Make interpreter of K-- language.
To compile the interpreter and run all testcases:
$ cd HW3/K__skel
$ ./test.sh
Make interpreter of K- language.
To compile the interpreter and run all testcases:
$ cd HW4/K_skel
$ ./test.sh
Do some programming in K- language, then run them with the K- interpreter that I just made.
To run all testcases:
$ cd HW4
$ ./test.sh
Simplified version of a polymorphic type decision problem.
To run all testcases:
$ cd HW4
$ make test
Simplified version of an algorithm for solving type equations.
To run all testcases:
$ cd HW4
$ make test
Writing an essay about the origins of two big sphere of gravity in PL world:
- imperative (Turing machine)
- functional (lambda calculus)
Make translator, which translates K- program to SM5 program.
Implement GC in SM5 interpreter.
When memory hits the limit, stop executing program and collect only reachable memories in current state.
To test Ex1 & 2:
$ cd HW6/SM5_skel
$ make test
Make interpreter of lambda calculus language, following normal-order reduction rule.
To run all testcases:
$ cd HW6/Lambda_skel
$ ./test.sh
Make translator, which translates lambda calculus expression into CPS expression.
To run all testcases:
$ cd HW7/CPS_skel
$ ./test.sh
Make translator, which removes every exception syntaxes(raise-handle) then replaces it with CPS expression.
To run all testcases:
$ cd HW7/Exn_skel
$ ./test.sh
Make interpreter of M language.
To compile the interpreter and run all testcases:
$ cd HW7/M_skel
$ ./test.sh
Make type checking system, operating without running every program.
Implemented with M-algorithm.
To compile the type checking system and run all testcases:
$ cd HW7/Lowfat_skel
$ ./test.sh
Make translator, which translates SM5 program into Sonata program.
Sonata language is almost similar with SM5 program, except there is no 'K(continuation)' functionality.
To debug your Sonata code,
- Compile RozettaX, by command
$ make
. - Run RozettaX with debug option and save output as a file, by command
$ ./run -debug input_file.sm5 > output_name.txt
. - Open
HW8/RozettaX_skel/debugger.html
. - Select output file.
- With prev/next button, you can debug Sonata interpreter instruction-by-instruction.