-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename
strongestBelief
to beliefMergeManyStillBelieved
- Loading branch information
Showing
8 changed files
with
105 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
title: Propagator Model and Lattice | ||
date: 2024-09-16 | ||
--- | ||
|
||
# Structural Subtyping 作为 Lattice | ||
|
||
Structural Subtyping 作为 Lattice, | ||
可以理解为是一种结构化的构造新的 Lattice 的方式, | ||
已知一些 lattice,然后生成 record lattice。 | ||
|
||
可以理解为带有名字(record 的 key)的 product lattice, | ||
但是与 product 不同的是,key 出现与否可以给出额外的序关系。 | ||
|
||
例如: | ||
|
||
``` | ||
{ a: A, b: B, c: C } <= { a: A, b: B } | ||
{ a: A, b: { x: X, y: Y } } <= { a: A, b: { x: X } } | ||
``` | ||
|
||
一般的集合有: | ||
|
||
``` | ||
{a, b} <= {a, b, c} | ||
``` | ||
|
||
但是当把集合的元素理解为 record 的 key 时,就有: | ||
|
||
``` | ||
{a: Unit, b: Unit, c: Unit} <= {a: Unit, b: Unit} | ||
``` | ||
|
||
# Propagator Model 中的 Lattice | ||
|
||
论文中有 Number、Interval、Belief、BeliefSystem 四种 Lattice。 | ||
|
||
其中: | ||
|
||
- Number 是平凡的。 | ||
- Interval 可以看作是一个 primitive lattice。 | ||
- Belief 和 BeliefSystem 不是简单的 record lattice, | ||
但是可以看成是以 record lattice 为基础来定义的, | ||
就像是以 free group 为基础来定义 presentation of a group。 | ||
|
||
具体地说: | ||
|
||
- Belief 的结构是 {} | ||
|
||
- BeliefSystem 的结构是 `Record<Set, Belief>` | ||
|
||
用类似 structural subtyping 的方式来统一理解所有 lattice |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: SolidJS and Propagator Model | ||
date: 2024-09-16 | ||
--- | ||
|
||
solidjs 很明显就是一个 propagator model, | ||
可以理解为 cell 保存的东西是 history -- time 到 value 的 k-v-map, | ||
在前端 view 组件中显示的,只是 history 中最新的 entry。 | ||
|
||
下面的描述和 inet 中用表层语言来构造计算模型的对象类似: | ||
|
||
> Components have a lifecycle that defines how they are created, | ||
> updated, and destroyed. A Solid component's lifecycle is different | ||
> from other frameworks, as it is tied to the concept of reactivity. | ||
> Where frameworks may re-run components on every state change, a | ||
> Solid component's lifecycle is tied to its initial run. What this | ||
> means is that a Solid component is only run once, when it is first | ||
> rendered into the DOM. After that, the component is not re-run, even | ||
> if the application's state changes. | ||
> When the Solid component renders, it sets up a reactive system that | ||
> monitors for state changes. When a state change occurs, the | ||
> component will update the relevant areas without re-running the | ||
> entire component. By bypassing the full component lifecycle on | ||
> every state change, Solid has a more predictable behavior compared | ||
> to frameworks that re-run functions on every update. | ||
但是这里的 "re-run functions on every update" | ||
还是 expression 思维,或者说是 functional 思维。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters