Skip to content

docs: state the formula conversion rules with kalyx - #13

Merged
erthoaers merged 3 commits into
mainfrom
docs/formula-conversion
Nov 16, 2026
Merged

erthoaers merged 3 commits into
mainfrom
docs/formula-conversion

Conversation

@erthoaers

Copy link
Copy Markdown
Contributor

Adds a "Formula conversion" section to docs/architecture.md: the rules kosmo follows when it gives a formula to kalyx 0.1.0 as linear text and reads results from kalyx's output lines.

  • Only complete input is converted; incomplete and invalid structures produce no text and no job.
  • Conversion writes only forms that kalyx 0.1.0's grammar accepts; function-call syntax and reserved names are the one exception and are passed on for kalyx to report as Unsupported.
  • Text that kalyx 0.1.0 accepts keeps its reading in later kalyx versions; rejected writings are judged again when kosmo moves to a later version.
  • Results arrive only as output lines; kalyx terms and Outcome stay with the kalyx runner on the worker thread.
  • Spans map back into the snapshot that the text was converted from; an error without a span maps to the whole line.
  • The echoed versions are checked against the request before a result is judged current.
  • Display text reads back into a separate editing structure, checked against the editing structure's own limits.

The first paragraph of the page lists the new section, and one sentence of the host job layer now says "conversion into kalyx types" so that the two kinds of conversion are not confused.

cargo xtask check passes locally.

@erthoaers
erthoaers merged commit b01ab20 into main Nov 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant