Coder Social home page Coder Social logo

kuis-isle3sw / ioplmaterials Goto Github PK

View Code? Open in Web Editor NEW
158.0 158.0 28.0 36.42 MB

Materials for the class "Implementation of Programming Languages" in Kyoto University.

License: Other

OCaml 93.89% Ruby 0.39% HTML 1.55% Assembly 3.73% Makefile 0.21% C 0.24%

ioplmaterials's People

Contributors

artoy avatar atrn0 avatar aviatesk avatar diohabara avatar drafear avatar hiromi-mi avatar khei4 avatar ksuenaga avatar maswag avatar mir-ikbch avatar mityu avatar sisshiki1969 avatar sp4ghet avatar suikaba avatar taiseikmc avatar tamaroning avatar ushitora-anqou avatar yo-goto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ioplmaterials's Issues

プログラムのディレクトリ名について

「プログラミング言語処理系」教科書16ページ注釈3の

プログラムはこのリポジトリのminiMLInterp ディレクトリに格納されている.

は,正しくは

プログラムはこのリポジトリのsrc ディレクトリに格納されている.

ではないでしょうか.

.gitignore should be updated

The directory src was renamed for interpreter in commit d275115.
However, directory name in .gitignore is still src.
So, these src should be changed to interpreter.

License

Under which license is this repo published?

From the GitHub page on Licensing a repository:

Without a license, the default copyright laws apply, meaning that you retain all rights to your source code and no one may reproduce, distribute, or create derivative works from your work.

Example using non-existing syntax

The fib function in p.39 uses a binary operator -, but it is not defined in the parser.
Every year, some students try this example in their interpreter and get confused with a strange error.
Please rewrite n - 1 to n + -1.

Excercise 1.0.1 の問題文の一部が欠けている?

IoPLTextbook.pdfの5ページにあるExercise 1.0.1には

OCamlインタプリタに以下の入力を与えたところ,

# let rec f x = if x = 0 then x else false;;

という応答が返ってきた.この応答の意味するところを,下線部のが何を指すかを明らかにしつつ,説明せよ.

と書かれていますが、応答およびその下線部が抜けているように思います。おそらくpdfにする際に抜け落ちてしまったのではないでしょうか。

It is problematic (even wrong) that MySet.member is implemented by List.memq

As far as MySet usage follows the instruction text, this does not cause problem since elements of the set is tyvar and physical equality and structural equality are luckily consistent for integers.

However, It should be implemented List.mem to avoid trouble, and of course, from the viewpoint of correct implementation.

Ex4.2.1とEx4.3.1の依存関係

  • Ex4.2.1のテストは、 string_of_ty の実装に依存しているが、変更例として示されている部分に string_of_ty の変更があげられていない。

syntax.ml への変更

(* MiniML の型を表す OCaml の値の型 *)
type ty =
TyInt
| TyBool

(* ty 型の値のための pretty printer *)
let pp_ty typ =
match typ with
TyInt -> print_srtring "int"
| TyBool -> print_string "bool"

  • Ex4.3.1の課題は、 pp_ty を実装することになっているが、ソースコード上は string_of_ty を実装することになっている

pp_ty と freevar_ty を完成させよ.freevar_ty は,与えられた型中の型変数の集合を返す関数で,型は ty -> tyvar MySet.t とする.型 'a MySet.t は mySet.mli で定義されている型 'a の値を要素とする集合を表す値の型である.

let string_of_ty _ =
assert false (* Exercise 4.3.1 *)

したがって、教科書を順番に読んで、4.2.1を実装しただけではテストが通らない。
4.2.1の時点でML2のための string_of_typp_ty を実装させ、4.3.1でそれらをML3向けに拡張しろ、とした方が良いと考えています。

dune: command not found in travis CI

This might not be the best place to file issues regarding the github education environment but the Travis CI build seems to be failing recently due to bash not being able to find dune in the docker environment.

Here is a link to the build, but you might need permissions to view it. (This is mainly directed to @ksuenaga since he is probably the only other person who can see the build).
https://travis-ci.com/github/kuis-isle3sw/isle3sw-2020-interpreter-sp4ghet/builds/172534948

image

Excercise 1.0.2 (3) の型に違和感

IoPLTextbook.pdfの5ページにあるExercise 1.0.2 (3)にあるmapTreeの型ですが、bt -> int -> int -> btよりもbt -> (int -> int) -> btの方が正確ではないでしょうか。また、List.map : ('a -> 'b) -> 'a list -> 'b listのように(int -> int) -> bt -> bt型にしていないのには何か理由がございますか……?

It's not clear how we can build `textbook/interpreter`

It might be more useful if we can clarify the procedures expected by this README description, especially for the sake of those who are not too familiar with OCaml toolings:

落ちてきたソースコード中の textbook/interpreter/ ディレクトリの中にインタプリタのソースコードが入っているので,duneコマンドでビルドしましょう.

What the exact command is expected by this description?
I gave several commands a try, but didn't succeed in the build.

from IoPLMaterials/

~/IoPLMaterials master*
❯ dune build
Error: I cannot find the root of the current workspace/project.
If you would like to create a new dune project, you can type:

    dune init project NAME

Otherwise, please make sure to run dune inside an existing project or
workspace. For more information about how dune identifies the root of the
current workspace/project, please refer to
https://dune.readthedocs.io/en/stable/usage.html#finding-the-root

~/IoPLMaterials master*
❯ dune init project textbook/interpreter/
# generates some files that seem to be unexpected?

(manual clean up)

~/IoPLMaterials master*
❯ cd textbook/interpreter 

~/IoPLMaterials/textbook/interpreter master*
❯ dune build       
Entering directory '/Users/aviatesk/IoPLMaterials/textbook'
File "interpreter/miniml.opam", line 1, characters 0-0:
Error: This opam file doesn't have a corresponding (package ...) stanza in
the dune-project_file. Since you have at least one other (package ...) stanza
in your dune-project file, you must a (package ...) stanza for each opam
package in your project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.