Step the run of a program body against a probabilistic system

Abierto
#392 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
43/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo

Línea de trabajo

Start in src/RandomSystems/Typed/DSL/ and read the existing Program definitions and proofs for probabilistic invocation and combination. Define Program.probRun and establish the listed equations, then check the acceptance cases: ordered stateful calls, a three-query loop, and a combined step that negates a forwarded reply.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Background

An invocation of a program against a probabilistic step is a mixture over the runs of its body (Program.probInvoke, Program.probCombine). For a body built from returns and calls, the run follows the statements:

\mathrm{run}(\mathbf{return}\ a)\ \text{from}\ r=\delta_{(r,a)},\qquad
\mathrm{run}(\mathbf{call}\ j(x);\ k)\ \text{from}\ r=\ (r',y)\leftarrow\mathrm{step}(r,j,x);\ \ \mathrm{run}(k\,y)\ \text{from}\ r'.

Without these equations, a statement about one invocation of a converter against a system is proved by unfolding the invocation.

Two cases recur. A call followed by a return is the image of one step. When the step answers the port $j$ by a function $g$ and keeps its state, a call at $j$ is computed, and so is a loop that makes one such call per element of a list:

\mathrm{run}\big(\mathbf{for}\ a\in xs:\ y\leftarrow j(q(a,c));\ c\leftarrow\mathrm{upd}(a,c,y);\ \ \mathit{finish}(c)\big)
=\mathrm{run}\big(\mathit{finish}(\mathrm{fold}_{a\in xs}\ \mathrm{upd}(a,c,g(q(a,c))))\big).
Proposed change

In src/RandomSystems/Typed/DSL/, add Program.probRun with

  • Program.probInvoke_eq_probRun and Program.probCombine_val_eq_probRun: an invocation, and a combined step, is the run of the body;
  • Program.probRun_returnProg and Program.probRun_callProg: the two equations above;
  • Program.probRun_callProg_returnProg and Program.probCombine_of_callProg_returnProg: a call followed by a return;
  • Program.probRun_callProg_of_single and Program.probRun_forEach_callProg: a call, and a loop of calls, at a port that a function answers.
Acceptance criteria

Run a body with two calls against an arbitrary step: the result is the two steps in order, the second from the state the first left, then the return. Run a loop over three queries against a fixed function, collecting the answers: the result is the list of the function's three values. Compute the combined step of a converter that forwards its query and negates the reply as the image of one inside step.

Lenguaje dominante
Lean
Estrellas
3
Forks
0
Merge medio
1 d 7 h
PR fusionados (30 d)
123

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de trailofbits/constructive-cryptography

Todos los issues de trailofbits/constructive-cryptography

Issues similares

Más issues de Backend & API Design

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.