Compare two program converters along a map or a relation on their states
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 38/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 领域
- compilers
调研方向
Read the existing automata state relation law in #221 and the attached-program invariant law in #230, then inspect the Program and DDC.ofProgramOn definitions. Implement and prove the state-map laws and derive the relation laws, including the typed form. Done means both acceptance checks pass without attaching a system or building an automaton.
由索引模型根据 Issue 内容生成。
描述
Background
A program $P$ with states $S$ gives the deterministic converter DDC.ofProgramOn s P F. Two programs often differ only in what they keep as their state. Let $R\subseteq S\times T$ relate the states of $P$ and $Q$. Suppose that from related states the two bodies ask the same inside query, or return the same reply with related next states:
R(x,y)\ \Longrightarrow\
\begin{cases}
P_x(u,h)=\mathrm{ask}\ q=Q_y(u,h), & \text{or}\\
P_x(u,h)=\mathrm{reply}\ (x',v),\quad Q_y(u,h)=\mathrm{reply}\ (y',v),\quad R(x',y').
\end{cases}
Then $P$ from $s$ and $Q$ from $t$ are one converter whenever $R(s,t)$. When $R$ is the graph of a map $f:S\to T$, this says that $Q$ is $P$ with its state sent along $f$. No system is attached, and $f$ need not be injective or surjective.
#221 is the same law for automata. #230 relates two programs attached to one inside system, along an invariant of that system's transcript.
Proposed change
Add the state-map law for programs: DDC.ofProgram_eq_of_stateMap, DDC.ofProgramOn_eq_of_stateMap and TypedConverter.ofDDC_ofProgramOn_eq_of_stateMap, with Program.Mode.mapState and the step laws Program.emit_stateMap, step_stateMap, after_stateMap.
From it, add the relation law DDC.ofProgram_eq_of_stateRel, DDC.ofProgramOn_eq_of_stateRel and
theorem TypedConverter.ofDDC_ofProgramOn_eq_of_stateRel
(P : Program S A.I B.I A.X A.Y B.X B.Y) (Q : Program T A.I B.I A.X A.Y B.X B.Y)
(R : S → T → Prop)
(hrel : ∀ σ τ o u h, R σ τ →
Sum.LiftRel (fun a b => R a.1 b.1 ∧ a.2 = b.2) Eq (P σ o u h) (Q τ o u h))
(hs : R s t)
(hP : IsDDCFrom B.domain A.domain b (DDC.ofProgramOn s P A.domain))
(hQ : IsDDCFrom B.domain A.domain b' (DDC.ofProgramOn t Q A.domain)) :
ofDDC (DDC.ofProgramOn s P A.domain) hP = ofDDC (DDC.ofProgramOn t Q A.domain) hQ
The relation law is the state-map law applied twice, through the program on the pairs of related states. The typed forms hold for any two certificates, since a typed converter determines its deterministic converter (#386).
Acceptance criteria
Relate a program that keeps a list to a program that keeps its image under a map. Show that two programs with states Unit × Unit and Unit and the same bodies are one converter, along the relation that always holds. In both checks no system is attached and no automaton is built.
- 主要语言
- Lean
- 星标
- 3
- 派生
- 0
- 平均合并
- 1 天 7 小时
- 30 天内合并 PR
- 123
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
trailofbits/constructive-cryptography 的其他 Issue
-
Automate monoidal whiskering and unitor normalization in cc_normalize可能已有人在做 @MarcIlunga 今天认领。 未关闭
难度 5/5 一周以上 新手友好度 20/100
trailofbits/constructive-cryptography#480 ·
维护者通常 1 天内回复
-
Add MR16 Lemma 5, indifferentiability composition, and specification可能已有人在做 @MarcIlunga 于 1 天前认领。 未关闭
难度 5/5 一周以上 新手友好度 12/100
trailofbits/constructive-cryptography#473 ·
维护者通常 1 天内回复
-
needs-format
难度 5/5 一周以上 新手友好度 12/100
trailofbits/constructive-cryptography#471 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 15/100
trailofbits/constructive-cryptography#465 ·
维护者通常 1 天内回复
-
needs-format
难度 5/5 一周以上 新手友好度 8/100
trailofbits/constructive-cryptography#462 ·
维护者通常 1 天内回复
查看 trailofbits/constructive-cryptography 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 74/100
Deltakit/deltakit-compile#27 ·
-
bug
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
new issue
难度 2/5 1-3 小时 新手友好度 62/100
llvm/llvm-project#245835 ·
维护者通常 1 天内回复