Concurrent Clean : ABCマシン(6)
[id:lethevert:20051228:p4]
ABCの命令列は、{Instruction}という配列として定義できるな。
Instruction :: *VM -> *VM
おのおのの命令を、たとえば、以下のように定義してやれば、部分パラメータ化を使えば、きれいに書けるぞ。
AddI :: !Int !*VM -> !*VM
とかって思っていたら、Appendix Cにほぼ同じ記述が。
state == (astack, bstack, cstack, graphstore, descrstore, pc, programstore, io) instruction == state -> state
でも、stateは、ちょっとオーバーロードが気になるので、VMStateとでもしておこうか。