TAPL読書会
相変わらず 21章で苦戦しています。
今回は 21.7 regular tree、21.8 μ-Types あたり。
やろうとしていることはそれほど難しくない(と思う)のだけど、
それを実現するためのロジックが七面倒というかなんというか。
21.7 Regular Trees
At this point, we have developed generic algorithms for checking membership in a set defined as
the greatest fixed point of a generating function F, assuming that F is invertible and finite
state; separately, we have shown how to define subtyping between infinite trees as the greatest
fixed point of a particular generating function S. The obvious next step is to instantiate one
of our algorithms with S. Of course, this concrete algorithm will not terminate on all inputs,
since in general the set of states reachable from a given pair of infinite types can be infinite.
But, as we shall see in this section, if we restrict ourselves to infinite types of a certain
well-behaved form, so-called regular types, then the sets of reachable states will be
guaranteed to remain finite and the subtype checking algorithm will always terminate.
21.8 μ-Types
This section develops the finite μ-notation, defines subtyping on μ-expressions, and
establishes the correspondence between this notion of subtyping and the subtyping on tree types.
んで、既読の人に質問。21.7.3 Exanmples に
where pairs of consecutive Bs are separated by increasingly many As, is not regular.
Because T is irregular, the set reachables(T, T) containing all the subtyping pairs
needed to justify the statement T<:T is infinite.
という部分があるのですが、ここにでてくる reachables という関数は
これまでは 21.5.10 にあるように引数が一個なんですよね。
ところがここイキナリ (T, T) となっている。これはいったいどういうこと?
その場の議論では pair なり tuple なりが渡されている(引数としては一つ)
ということなのではないかということで収まったのですが、
今ひとつすっきりしないよねえということで。
定義の部分はこう
21.5.10 Definition
Given an invertible generating function F and an element x ∈ U ,
the set predF(x) (or just pred(x)) of immediate predecessors of x is
pred(x) = { 空集合 if support(x)↑
support(x) if support(x)↓
and its extension to sets X ⊆ U is
pred(X) = U pred(x)
x∈X
The set reachableF(X) (or just reachable(X)) of all elements reachable from a set X
via support is defined as
reachable(x) = reachable({x})
and its extension to single elements x ∈ U is
reachable(x) = reachable({x}).
An element y ∈ U is reachable from an element x if y ∈ reachable(x).
次回は 21.9 からです。
Types and Programming Languages 日本語版 レビュワー募集
新しくできた古本屋と思って入ったら(看板にはそうあった)、
中ではカードバトルの卓(なんていうのか知らんけど)がいくつもあって
そっちがメインな気がするような光景がありましたとさ。
信頼度成長曲線やらってこーゆー世界向けのもんだよなあ
と思う今日この頃。
ちょっと興味ある。
pyMCU - The Python Controlled Microcontroller
FAQ によると
What is pyMCU?
pyMCU is a micro-controller that can be used with python.
There is custom software on the microchip
that works in conjunction with the python module on the computer to operate much like a traditional microchip
that you would normally load your code onto except this one allows you to drive that functionality realtime using python.
Think of it as a hardware interface to the real world for your computer that you program with python.
pyMCU Overview
pyMCU was created with the idea of being a simple cost effective platform to interface between the
computer and the physical world using python. The heart of pyMCU is a microchip PIC 16F1939
offering 13 Digital IO Pins, 6 Analog IO Pins, 5 10-bit PWM Pins, and a 16 Pin Parallel LCD
Interface. The USB Interface uses the industry standard FTDI USB to UART FT232R chip. Drivers and
python module are available for Windows, OSX, and Linux.
I wanted to make pyMCU simple to use for the beginner but also have the option to be utilized in
a more powerful way for the advanced user. The beginner method for using pyMCU and its initial
intent for use is to utilize the pymcu python module, by creating an mcuModule Class Object in
python you will have access to various functions common to typical microcontroller programming,
setting pins high and low, reading analog pin values, using hardware pwm pins, i2c, 1-wire and
SPI protocols and so on. For the more advanced user you can override the pyMCU firmware and
program the PIC chip directly and take advantage of all the raw power and functionality the PIC
chip has to offer and that way the pyMCU board acts as a nice breakout board platform to build on.
JaSSTソフトウェアテストシンポジウム-JaSST'12 Hokkaido レポート
の発表資料を見てたんですが、
これはなんか違うんじゃないかという気が →
"セッション 2-2 「機能ブロックと擬似コードを用いたS/W開発事例 - 上流工程で後工程の作業に直結したアウトラインを描く -」"
なんかこう、ほとんどプログラムみたいな「仕様書」を連想してしまうんですけど
違うのかしらん。
use strictが効かない (PERL) | PerlのQ&A【OKWave】
use strictが効かない (PERL) | PerlのQ&A【OKWave】
たびたびお世話になっております。
PERL version 5.14.2 をWindows 7 のコマンドプロンプトから起動して使っています。
use strict;
と一行目に書くと 宣言されていない変数があれば拒絶されるとのことで
#!/usr/bin/perl
use strict;
use warnings;
$a = 10;
print "$a\n";
というスクリプトを書きました。が、すんなり動いてしまいます。