State how a compiler package's plan sites are numbered

Open
#400 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
rust

Research direction

Start with Section 4.1 or TA-Obs in Section 1.5, then compare the rule with Appendix A.1, Table 15 and crates/ambyte-oracle/src/package/translate.rs. Check how scripts/check-typed-atom-vectors.py handles site derivation and use it to verify a worked example. Done means the specification defines site order, counts, starting number, and site-free constructs; Table 15 follows from the rule, the vector can be checked without the oracle, and the translator cites the rule.

Written by the indexing model from the issue text.

Description

enhancement release:target-ir type: goalpost
Problem

A failure occurrence's identity (κ, ℓ, ρ) contains the plan site ℓ, and the observation encoding writes it (Appendix A, Table 12). So two runtimes produce the same digest for a failed run only if they number sites the same way.

The specification gives site numbers only for one shape. Appendix A.1, Table 15 says the retained program has "a typed atom read at site 1 with M = 1,048,576, a comparison at site 2, a guard at site 3". It states no general rule for deriving sites from a compiler-produced package.

The only general rule is in the reference oracle's translator (crates/ambyte-oracle/src/package/translate.rs, Translator::site). It walks the target IR intent's executionOrder. Each read step takes the next site. Each requirement takes two: its comparison, then its guard. Sites start at 1.

Echo's bounded-read evaluator (flyingrobots/echo#1054) numbers sites the same way, in execution order, but its authority is Table 15 and the oracle's behaviour. The specification is not its authority. A runtime must not take a semantic rule from an implementation.

Request

State the site-numbering rule in the specification, next to the observation's definition (Section 4.1, or TA-Obs in Section 1.5):

  • which artifact and order the sites come from (executionOrder of the target IR intent);
  • how many sites each occurrence kind takes (a read step one; a requirement two, comparison then guard) and in which order;
  • the first site number;
  • what happens to constructs with no site (for example pure bindings), or whether they are refused.

Add a vector or a worked example that a reader can check without the oracle.

Acceptance
  • The specification states the rule, and Table 15's sites follow from it.
  • scripts/check-typed-atom-vectors.py (or a companion) derives the sites from the rule.
  • The oracle's translator cites the rule.
Related
  • flyingrobots/echo#1054 (Echo's observation encoding)
  • flyingrobots/echo#1056 (W9 conformance)
Dominant language
Rust
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from flyingrobots/edict

All issues in flyingrobots/edict

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.