Senamtics with Applications

k.inabaさんが「面白そう」と書いてた本です。

Semantics with Applications: An Appetizer (Undergraduate Topics in Computer Science)

Semantics with Applications: An Appetizer (Undergraduate Topics in Computer Science)

面白そうだったし、Amazonで見てみたら、なんかえらい安かったので買ってみました*1。いや、こういう本って、イメージとして5,000円〜10,000円くらいしそうな気がします。届いてから気づいたのですが、「Undergraduate Topics in Computer Science」とか書いてありました。感じとしては学部生の授業かセミナーかで使うくらいなんですかね。仮にも大学院生ということになっている私としてはちょっと動揺を隠せません。あ、安めのお値段なのもその辺が理由なんだろうか。

まだ読んでないのですが、面白そうです。

Prefaceを見ると、

We strongly believe that semantics has an important role to play in the future development of software systems and domain-specific languages (and hence is not confined to the enormous task of specifying "real life" languages such as C++, Java or C#). We have therefore found the need for an introductory book that

  • present the fundamental ideas behing these approaches,
  • stresses their relationship by formulating and proving the relevant theorems, and
  • illustrates the applications of semantics in computer science.

とか書いてありました。"found the need"と言ってるのが読者でなく著者の側である辺り一抹の不安は感じますが、私もそういう本があると良いと思います。

内容はというと、1章から10章まで本文があって、2〜3章が操作的意味論の話、4章がどうやって操作的意味論を読んで処理系を実装すれば良いのかという話、5章6章が表示的意味論の話、9章が公理的意味論の話となっています。7、8、10章がプログラム解析の話で、なんかMonotone Frameworkとかいう、見覚えのある一般的じゃなさそうな単語が目に入ったので、調べてみたら、下の本の著者と同じでした。まあつまりプログラム解析の話は趣味ですね。いや意味論をどうやって使えばいいのかという良い例になっていると思いますけど。多分。

Principles of Program Analysis

Principles of Program Analysis

この本は、フロー解析について勉強したくて、最近、読みました。データフロー解析、コントロールフロー解析、Abstract Interpretation、型システムと、一通り解説されていて面白いと思います。ちょっとnotationが古くさいような気もします。

*1:ちなみに今見たら4,000円くらいしてますが、私が買ったときは2,700円でした。なんで値段こんなに変わったんだろ……