2024-10-21 02:39:07 +00:00
|
|
|
|
---
|
|
|
|
|
date: 2024-10-20 12:02
|
|
|
|
|
---
|
|
|
|
|
#mimium
|
|
|
|
|
|
|
|
|
|
ツリー形式からBasicBlockのインストラクション形式に変える
|
|
|
|
|
|
|
|
|
|
Stateのこととupvalueを両方処理しなくてはならない
|
|
|
|
|
|
|
|
|
|
StateSize計算とUpvalue計算の両方をtraitとして切り出す方がいいのかな
|
2024-10-24 03:19:39 +00:00
|
|
|
|
|
|
|
|
|
## 値
|
|
|
|
|
|
|
|
|
|
$$
|
|
|
|
|
\begin{align}
|
|
|
|
|
v \; ::= & \quad R \\
|
|
|
|
|
| & (\lambda x:\tau.e, [\Gamma, x:e],StateStorage(p,Vec)) \quad & [Closure]\\
|
|
|
|
|
\end{align}
|
|
|
|
|
$$
|
|
|
|
|
|
|
|
|
|
$$
|
|
|
|
|
\begin{align}
|
|
|
|
|
e \; ::=& \quad x \quad x \in \mathbb{V} \quad & [value]\\
|
|
|
|
|
|& \quad \lambda x.e \quad & [lambda]\\
|
|
|
|
|
|& \quad e \; e \quad & [app(globstate]\\
|
|
|
|
|
|& \quad appcls \; e \; e \quad & [appclosure]\\
|
|
|
|
|
|& \quad fix \; x.e \quad & [fixpoint]\\
|
|
|
|
|
|& \quad feed \; x.e \quad & [feed] \\
|
|
|
|
|
|& \quad delay \; e \; e & [delay]\\
|
|
|
|
|
\end{align}
|
|
|
|
|
$$
|
|
|
|
|
|
|
|
|
|
結局[[The w-calculus a synchronous framework for the verified modelling of digital signal processing algorithms|W計算]]のStaged Interpreterと変わらんかもな
|
|
|
|
|
|
|
|
|
|
そうすると型付けの時点でクロージャ相当の項とグローバル関数適用の項は分かれることになる
|