Compose converters that ask their inside at most once as functions
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
Start with the four serialM step laws and the existing program definitions in src/RandomSystems/DDC/. Then read the one-call bounds and run equations, followed by the TypedConverter composition laws named in the issue. Done means implementing the listed one-call composition and parallel results, stock converter instances, DSL characterizations, and acceptance criteria as converter equalities.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Background
A deterministic converter that asks its inside at most once per outside query is a function $\delta$ of its state and the query:
\delta(s,u)=\mathrm{inl}\,(s',v)\quad\text{reply } v \text{ and continue in } s',
\qquad
\delta(s,u)=\mathrm{inr}\,(q,k)\quad\text{ask } q;\ \text{on the reply } y,\ (s',v)=k(y).
The stateless router (#220), the reply map (#229), forwarding, the transcript router (#388) and the converter that answers from its transcript (#231) are of this form.
Two such converters compose as functions on the pair of states. In series, with $\delta_1$ outside:
(\delta_1\,;\delta_2)\big((s,t),u\big)=
\begin{cases}
\mathrm{inl}\,\big((s',t),v\big) & \text{if } \delta_1(s,u)=\mathrm{inl}\,(s',v),\\[2pt]
\mathrm{inl}\,\big((s',t'),v\big),\ \ (s',v)=k(w) & \text{if } \delta_1(s,u)=\mathrm{inr}\,(q,k),\ \delta_2(t,q)=\mathrm{inl}\,(t',w),\\[2pt]
\mathrm{inr}\,\big(z,\ y\mapsto((s',t'),v)\big),\ \ (t',w)=k'(y),\ (s',v)=k(w) & \text{if } \delta_1(s,u)=\mathrm{inr}\,(q,k),\ \delta_2(t,q)=\mathrm{inr}\,(z,k').
\end{cases}
Side by side, each port is served by its own side and the other state is kept. The closed form exists because the serial composition of two such converters answers one more input by one of four runs of internal exchanges. When the outer converter may ask again after a reply, the run is a recursion and there is no such form.
#229 states the router identities attached to a system. As identities of converters they need no system and no assumption on its replies. #246 asks for the composition of two arbitrary programs. This issue is its case of at most one call, as an equality of converters.
Proposed change
- In
src/RandomSystems/DDC/, the four step laws ofserialM β α:induces_serialM_snoc_reply,induces_serialM_snoc_query_reply_reply,induces_serialM_snoc_query_query,induces_serialM_snoc_reply_reply. Each gives the next output of the serial composition from the next outputs of the two sides, with no other hypothesis on them. Program.oneCall δ, the program of $\delta$, with its three equations, its call boundoneCall_bounded : (oneCall δ).Bounded 1, and its run read off $\delta$ (step_oneCall_idle_inl,step_oneCall_idle_inr,step_oneCall_busy,after_oneCall_cases). For every program with call bound one, the query comes before any exchange (Program.Bounded.eq_nil_of_one).Program.oneCallComp δ₁ δ₂andProgram.oneCallSum δ₁ δ₂, with the two laws, for any certificates:
comp (ofDDC (ofProgramOn s (oneCall δ₁) A.domain) h₁) (ofDDC (ofProgramOn t (oneCall δ₂) B.domain) h₂)
= ofDDC (ofProgramOn (s, t) (oneCall (oneCallComp δ₁ δ₂)) A.domain) h
parallel (ofDDC (ofProgramOn s (oneCall δ₁) A.domain) hP) (ofDDC (ofProgramOn t (oneCall δ₂) C.domain) hQ)
= ofDDC (ofProgramOn (s, t) (oneCall (oneCallSum δ₁ δ₂)) (A.tensor C).domain) h
(TypedConverter.ofDDC_ofProgramOn_oneCall_comp, TypedConverter.parallel_ofDDC_ofProgramOn_oneCall), and the certificates of the two composites.
- The stock converters as instances:
TypedConverter.routingAt_eq_ofDDC_oneCall,mapRepliesAt_eq_ofDDC_oneCall,Program.forward_eq_oneCall,Program.routingByTranscript_eq_oneCall,answerFromTranscriptProgram_eq_oneCall. - The body of
oneCall δin the statements of the DSL: a return, or one call followed by a return (Program.oneCall_eq_returnProg,Program.oneCall_eq_callProg). ConverselyProgram.eq_oneCall_of_body: a program whose bodies have one of these two shapes isoneCallof the function read off them. - The comparison of two such converters from their two functions alone (
TypedConverter.ofDDC_ofProgramOn_oneCall_eq_of_stateRel, by #387).
Acceptance criteria
- Two stateless routers in series are one router, as an equality of typed converters: no system attached, no inhabitance assumption, no condition on the second request map.
- Behind a converter that never asks, the composite never asks.
- A transcript router with a constant request is the stateless router.
- The square of #357 for a transcript router holds as an identity of converters,
routingByTranscript₂ ≫ mapRepliesAt f = mapRepliesAt g ≫ routingByTranscript. Its attached form follows bycomp_smul.
- Ngôn ngữ chính
- Lean
- Star
- 3
- Fork
- 0
- Merge trung bình
- 1 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 123
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của trailofbits/constructive-cryptography
-
Automate monoidal whiskering and unitor normalization in cc_normalizeCó thể đã có người làm @MarcIlunga đã nhận hôm nay. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
trailofbits/constructive-cryptography#480 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add MR16 Lemma 5, indifferentiability composition, and specificationCó thể đã có người làm @MarcIlunga đã nhận hôm nay. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
trailofbits/constructive-cryptography#473 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-format
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
trailofbits/constructive-cryptography#471 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
trailofbits/constructive-cryptography#465 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-format
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 8/100
trailofbits/constructive-cryptography#462 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của trailofbits/constructive-cryptography
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
uxlfoundation/oneDNN#6604 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Bug]: RoundToNearest truncates in plugins compiled with spcomp 1.13Có thể đã có người làm @fmu1337 đã nhận hôm nay. Đang mởBug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
alliedmodders/sourcemod#2627 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
marketcalls/openalgo#2502 ·
Maintainer thường phản hồi trong vòng 1 ngày