Skip to content

Serialize any links network to links-notation text (full LiNo round-trip) #53

@konard

Description

@konard

Context

Issue #47 requires "storage (presenting as links notation (text based as in
https://github.com/link-foundation/links-notation) ...)". LiNo parses in
(src/lino_parser.rs), but arbitrary networks cannot be written back out as
links-notation text - only self_description_text emits LiNo-style lines. See
requirements.md R-7 and
solution-plans.md S-5.

The reference Rust parser is the links-notation crate 0.13.0 (verified on
crates.io 2026-06-10), which formal-ai also pins
(formats-storage-apis.md Part B).

Scope

  • Implement LinkNetwork::to_lino() and LinkNetwork::from_lino() covering
    every link kind (references, names, metadata) so any network round-trips.
  • Property test: from_lino(to_lino(n)) is isomorphic to n across parsed
    and hand-built networks.
  • Align the emitted dialect with the links-notation 0.13 crate so other
    ecosystem parsers can consume the output; record divergences as parity
    fixtures.
  • Use a doublets-style id discipline for unnamed links so text and (future)
    binary storage share one addressing scheme.

Acceptance criteria

  • to_lino/from_lino round-trip property test passes on language
    fixtures and synthetic networks.
  • Output of to_lino is accepted by the links-notation crate parser in
    a test.
  • links-notation PARITY_FIXTURES gain a serialization (output-side)
    fixture, not just parse-side.
  • Changelog fragment added (bump: minor).

References


Filed from docs/case-studies/issue-47/proposed-issues/05-lino-network-serialization.md. Part of the implementation plan for #47.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions