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
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.
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:
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
Acceptance Criteria
Vc,ResolvedVc,OperationVc,TransientValue,State) as applicable to phase scope.read(...)input/output typing against expected Vc-based contracts.Test Scenarios
read(vc)usage succeeds with no diagnostics.Vcread input yields semantic error.Out of Scope