Skip to content

ttl: enforce core-type and read(vc) semantic validation #220

@kdy1

Description

@kdy1

Summary

Current semantic checks cover return shape and read arity, but do not enforce comprehensive core-type contracts or read(vc) type boundaries.

Evidence

Contract Evidence:

  • docs/project-ttl-language.md:44
  • docs/project-ttl-language.md:99
  • cmds/ttlc/internal/contracts/enums.go:36
  • cmds/ttlc/internal/sema/checker.go:150

Current Gap

Current semantic checks cover return shape and read arity, but do not enforce comprehensive core-type contracts or read(vc) type boundaries.

Proposed Scope

  • Not documented yet.

Acceptance Criteria

  • Enforce stable rules for TTL core types (Vc, ResolvedVc, OperationVc, TransientValue, State) as applicable to phase scope.
  • Validate read(...) input/output typing against expected Vc-based contracts.
  • Emit dedicated diagnostics for core-type misuse and invalid read usage.
  • Keep behavior deterministic and documented.

Test Scenarios

  • Valid read(vc) usage succeeds with no diagnostics.
  • Non-Vc read input yields semantic error.
  • Core-type misuse surfaces targeted diagnostic kind/message.

Out of Scope

  • New language syntax unrelated to core type semantics.
  • Runtime-side dynamic type checks beyond compile contract.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions