From 88b0c83538fbe462f36c1a9e47fa57c7b3639a72 Mon Sep 17 00:00:00 2001 From: Sebastian Jeong Date: Mon, 17 Aug 2026 04:05:13 +0900 Subject: [PATCH] =?UTF-8?q?fixture=20README=EB=A5=BC=20=ED=98=84=EC=9E=AC?= =?UTF-8?q?=20=EC=83=81=ED=83=9C=EC=97=90=20=EB=A7=9E=EA=B2=8C=20=EC=A0=95?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fec/tests/generic/README.md | 33 +++++++++++++------------- fec/tests/optional/README.md | 14 +++++++---- fec/tests/own/README.md | 17 ++++++------- fec/tests/units/README.md | 46 ++++++++++++++++++++---------------- 4 files changed, 59 insertions(+), 51 deletions(-) diff --git a/fec/tests/generic/README.md b/fec/tests/generic/README.md index 5fec504..b00050e 100644 --- a/fec/tests/generic/README.md +++ b/fec/tests/generic/README.md @@ -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: -- 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. +`uv run python tests/run.py -k generic` -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` + +미구현/미완료 구간: + +현재 다수의 제네릭 케이스가 통과하지 않습니다. diff --git a/fec/tests/optional/README.md b/fec/tests/optional/README.md index 237a2e6..d9212a1 100644 --- a/fec/tests/optional/README.md +++ b/fec/tests/optional/README.md @@ -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`) 기준이며, 코드 생성 단계는 포함하지 않습니다. diff --git a/fec/tests/own/README.md b/fec/tests/own/README.md index 3d0fcd7..b1fcff9 100644 --- a/fec/tests/own/README.md +++ b/fec/tests/own/README.md @@ -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::` 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:...` 마커가 있으면 그 패턴을 따른다. + +현재 구현 범위는 타입 검사/의미 검사를 통과한 소스 기반만 포함하고, 별도 코드 생성/런타임 동작은 포함하지 않습니다. diff --git a/fec/tests/units/README.md b/fec/tests/units/README.md index c5ac55b..96134df 100644 --- a/fec/tests/units/README.md +++ b/fec/tests/units/README.md @@ -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: -- `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`. +`uv run python tests/run.py -k units` -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`는 규칙 고의 위반 케이스입니다.