fixture README를 현재 상태에 맞게 정리
This commit is contained in:
+16
-17
@@ -1,21 +1,20 @@
|
|||||||
# M9 fixtures
|
# 제네릭
|
||||||
|
|
||||||
M9 adds comptime type parameters and monomorphization.
|
이 디렉터리는 제네릭 타입/함수/인스턴스화 관련 고정 fixture입니다.
|
||||||
|
|
||||||
`ok*.fe` must compile; `bad*.fe` must fail according to the first-line marker.
|
실행 방법:
|
||||||
`defscope/` and `okscope/` are multi-unit definition-scope tests and require M8 imports. `okscope/` verifies that an exported generic may use its definition unit's private helper through `.fei` support metadata.
|
|
||||||
|
|
||||||
Coverage:
|
`uv run python tests/run.py -k generic`
|
||||||
- generic functions and structs,
|
|
||||||
- multiple and duplicate instantiations,
|
|
||||||
- type aliases as comptime type values,
|
|
||||||
- `T == U` and `@is_int(T)` in comptime,
|
|
||||||
- instantiation-time operation errors,
|
|
||||||
- arity/type-argument errors,
|
|
||||||
- runtime `type` values forbidden,
|
|
||||||
- definition-unit name lookup,
|
|
||||||
- recursive instantiation depth limit.
|
|
||||||
- rejection of user value generics and generic type inference,
|
|
||||||
- same-instance recursive request reuse and selected-out `comptime if` semantic skipping.
|
|
||||||
|
|
||||||
M9's DOS gate should additionally inspect generated `fe_generics.c`: `okdedup.fe` must emit one body for the repeated `(id, i32)` instantiation.
|
현재 수록 케이스:
|
||||||
|
|
||||||
|
- `okalias.fe`, `okbox.fe`, `okdedup.fe`, `okid.fe`, `okisint.fe`
|
||||||
|
- `okmulti.fe`, `oknested.fe`, `okpair.fe`, `okscope/main.fe`, `okscope/lib.fe`
|
||||||
|
- `oksamrec.fe`, `okskip.fe`, `oktypeeq.fe`
|
||||||
|
- `badarity.fe`, `badarg.fe`, `badbody.fe`, `baddepth.fe`, `baddist.fe`
|
||||||
|
- `badfew.fe`, `badinfer.fe`, `badop.fe`, `badtype.fe`, `badvalue.fe`
|
||||||
|
- `defscope/main.fe`, `defscope/lib.fe`
|
||||||
|
|
||||||
|
미구현/미완료 구간:
|
||||||
|
|
||||||
|
현재 다수의 제네릭 케이스가 통과하지 않습니다.
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
# M7 fixtures
|
# 옵션/에러유니온
|
||||||
|
|
||||||
M7 adds optionals and error unions on top of the M6 ownership model.
|
이 디렉터리는 `?T`/`null`/`try`/`catch`/`orelse`/명목 에러 유니온 동작을 검증합니다.
|
||||||
|
|
||||||
`ok*.fe` must compile. `bad*.fe` must fail according to the first-line error marker.
|
실행 방법:
|
||||||
The files are registered in `src/ferrolang_vm/registry.py`.
|
|
||||||
|
|
||||||
Coverage: contextual `null`, `?T`, `.?`, `Some`/`None` pattern-only non-destructive views, `mem.replace` extraction, lazy `orelse`/`catch`, nominal error unions, `try`, block/short `catch`, and error code/name uniqueness, plus R4/R7 interactions with optional references/owners.
|
`uv run python tests/run.py -k optional`
|
||||||
|
|
||||||
|
- `ok*.fe`는 통과해야 합니다.
|
||||||
|
- `bad*.fe`는 실패해야 하며, 첫 줄 `// ERROR:...` 마커가 있으면 그 패턴을 따른다.
|
||||||
|
|
||||||
|
실행은 프런트엔드(`--check`) 기준이며, 코드 생성 단계는 포함하지 않습니다.
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
# M6 fixtures
|
# 소유권과 대여
|
||||||
|
|
||||||
These fixtures pin the M6 ownership/borrow rules before implementation.
|
이 디렉터리는 `fec/tests`에서 소유권(Ownership)과 대여(Borrow) 동작을 검증하는 고정 fixture 입니다.
|
||||||
|
|
||||||
- `ok*.fe` must compile with `--target=bits32 --emit-c`.
|
실행 방법:
|
||||||
- `bad*.fe` must fail compilation; the first line follows the `// ERROR:<line>:<substring>` convention from SPEC §12.
|
|
||||||
- They are registered in `src/ferrolang_vm/registry.py`, which is what decides whether a milestone runs.
|
|
||||||
- When M6 starts, wire this directory into the DOS/QEMU gate without changing the expected result of any fixture.
|
|
||||||
- M6 also owns the general-global borrow restriction from R10 because AGENTS.md explicitly groups that change with the `own.c` state-machine work.
|
|
||||||
|
|
||||||
Coverage: R4 storage restrictions, R5 scope, R6 shared/exclusive liveness, root-local field/index conflicts, call-only `&mut -> &` reborrows, branch/loop `MaybeMoved` and initialization-state merging, R7 invalidation, R8 derived-return provenance joins, defer lifetime extension, and global borrow restrictions.
|
`uv run python tests/run.py -k own`
|
||||||
|
|
||||||
|
- `ok*.fe`는 통과해야 합니다.
|
||||||
|
- `bad*.fe`는 실패해야 하며, 첫 줄 `// ERROR:...` 마커가 있으면 그 패턴을 따른다.
|
||||||
|
|
||||||
|
현재 구현 범위는 타입 검사/의미 검사를 통과한 소스 기반만 포함하고, 별도 코드 생성/런타임 동작은 포함하지 않습니다.
|
||||||
|
|||||||
+25
-21
@@ -1,26 +1,30 @@
|
|||||||
# M8 fixtures
|
# 단위 모듈
|
||||||
|
|
||||||
M8 is the first multi-unit milestone, so cases live in subdirectories. Each case is compiled separately with that directory on the import path.
|
이 디렉터리는 `unit` 선언, `import` 경로/별칭, 다중 파일 단위 경계를 다룹니다.
|
||||||
|
|
||||||
Pass cases:
|
실행 방법:
|
||||||
- `basic`: public function across units.
|
|
||||||
- `pubfld`: public type and public field across units.
|
|
||||||
- `dotted` and `alias`: canonical dotted unit paths, last-segment binding, and explicit import aliases.
|
|
||||||
- `dotpriv`: a dotted unit prefix does not grant access to another unit's private declarations.
|
|
||||||
- `errsame`: two units use the same anonymous `error.Name`; the driver must assign one deterministic `core.Error` code.
|
|
||||||
- `errdet`: the same anonymous error-name set appears in a different source/import order; generated `fe_errors.h` must be byte-identical to `errsame` modulo the intentionally different unit graph.
|
|
||||||
|
|
||||||
Fail cases:
|
`uv run python tests/run.py -k units`
|
||||||
- `privfn`: private declaration access.
|
|
||||||
- `privfld`: private field access.
|
|
||||||
- `missing`: unresolved import.
|
|
||||||
- `cycle`: cyclic imports.
|
|
||||||
- `unitbad`: filename/unit-name mismatch.
|
|
||||||
- `badupper` and `badlong`: DOS-safe lowercase, eight-character unit-segment limit.
|
|
||||||
- `bindconf`: two imports with the same last-segment binding require an alias.
|
|
||||||
- `pubpriv`: a public signature cannot expose a private nominal type.
|
|
||||||
- `errnom`: nominal error cannot flow into `core.Error` via `try`.
|
|
||||||
|
|
||||||
They are not registered in `src/ferrolang_vm/registry.py` yet. M8 should add procedural checks for `.fei` creation/hash invalidation and deterministic `fe_errors.h` using these fixtures.
|
현재 수록 케이스:
|
||||||
|
|
||||||
The M8 DOS gate must additionally construct two separate `-I` roots containing the same canonical unit and require an ambiguity error; repeat the case with two paths to the same canonical file and require deduplication. It must also verify that `std.*` resolves only from the built-in std root, ordinary user units never do, and that changing a private non-generic implementation preserves the dependent interface-cache hit. Those checks need temporary roots/cache inspection and deliberately remain procedural rather than encoding host paths in fixtures.
|
- `alias/`
|
||||||
|
- `basic/`
|
||||||
|
- `badlong/`
|
||||||
|
- `badupper/`
|
||||||
|
- `bindconf/`
|
||||||
|
- `cycle/`
|
||||||
|
- `dotpriv/`
|
||||||
|
- `dotted/`
|
||||||
|
- `errdet/`
|
||||||
|
- `errnom/`
|
||||||
|
- `errsame/`
|
||||||
|
- `missing/`
|
||||||
|
- `privfld/`
|
||||||
|
- `privfn/`
|
||||||
|
- `pubfld/`
|
||||||
|
- `pubpriv/`
|
||||||
|
- `unitbad/`
|
||||||
|
|
||||||
|
미구현/미완료 구간:
|
||||||
|
현재 다수 케이스가 완전 통과하지 않고, `badlong`, `badupper`, `unitbad`는 규칙 고의 위반 케이스입니다.
|
||||||
|
|||||||
Reference in New Issue
Block a user