Files
FESADev/phases/linear-static-3d-euler-beam/step11.md
T
2026-08-15 03:14:34 +09:00

4.0 KiB

Step 11: Abaqus INP Syntax Parser

담당 역할과 필수 스킬

  • 담당 역할: implementation-agent
  • 필수 스킬: fesa-cpp-msvc-tdd
  • 모든 C++ build/test와 최종 VERIFY는 MSVC x64 Debug 기준으로 수행한다.

읽어야 할 파일

  • /AGENTS.md
  • /docs/ARCHITECTURE.md
  • /docs/ADR.md
  • /docs/linear-static-3d-euler-beam/io.md
  • /docs/linear-static-3d-euler-beam/implementation-plan.md
  • /include/fesa/core/diagnostic.hpp
  • /include/fesa/core/status.hpp
  • /src/fesa/CMakeLists.txt
  • /tests/CMakeLists.txt
  • /reference/cantilever beam/cantilever beam.inp

소유 파일

  • Create: /include/fesa/io/abaqus/input_syntax.hpp
  • Create: /include/fesa/io/abaqus/input_reader.hpp
  • Create: /src/fesa/io/abaqus/input_reader.cpp
  • Create: /tests/unit/io/abaqus/input_syntax_test.cpp
  • Create: /tests/unit/io/abaqus/input_reader_test.cpp
  • Modify: /src/fesa/CMakeLists.txt
  • Modify: /tests/CMakeLists.txt

작업

keyword/data/comment lexical 및 syntax parsing만 위 exact paths에 구현하라. Semantic Domain mapping은 Step 12에 남긴다. 최소 계약은 다음과 같다.

struct KeywordParameter { std::string name; std::optional<std::string> value; };
struct DataLine { std::vector<std::string> fields; SourceLocation location; };
struct KeywordBlock {
    std::string canonicalName;
    std::string originalLine;
    std::vector<KeywordParameter> parameters;
    std::vector<DataLine> data;
    SourceLocation location;
};
struct ParsedInput { std::vector<KeywordBlock> blocks; };
class AbaqusInputReader {
public:
    Result<ParsedInput> read(const std::filesystem::path& inputPath) const;
};

Keyword와 parameter name은 uppercase canonical form으로 비교하되 parameter value와 data label 원문을 보존한다. ** comment line은 무시하고 blank line, comma-separated field, valueless parameter, line number와 file identity를 처리한다. Keyword/data 구분, malformed keyword, keyword 전 data line, unreadable file은 structured diagnostic으로 반환한다. Wrapper 의미, keyword allowlist, numeric conversion은 구현하지 않는다.

Tests는 mixed case, comments, blank/empty trailing fields, parameters, source locations, malformed syntax, legacy cantilever syntax parse를 포함하고 InpSyntax regex로 등록한다.

Acceptance Criteria

RED targeted command:

cmake --build .harness/build --config Debug --target fesa_tests
ctest --test-dir .harness/build -C Debug -R InpSyntax --output-on-failure

GREEN/VERIFY:

cmake -S . -B .harness/build -A x64 `
  -DFESA_GTEST_SOURCE_DIR=C:/git/googletest `
  "-DMKL_DIR=C:/Program Files (x86)/Intel/oneAPI/mkl/2026.1/lib/cmake/mkl" `
  "-DTBB_DIR=C:/Program Files (x86)/Intel/oneAPI/tbb/2023.1/lib/cmake/tbb" `
  "-DHDF5_DIR=C:/Program Files/HDF_Group/HDF5/2.1.1/cmake"
cmake --build .harness/build --config Debug
ctest --test-dir .harness/build -C Debug -R InpSyntax --output-on-failure
ctest --test-dir .harness/build -C Debug --show-only=json-v1
ctest --test-dir .harness/build -C Debug --output-on-failure

검증 절차

  1. syntax tests를 먼저 추가하고 reader 부재 RED를 확인한다.
  2. semantic 판단이 없는 최소 reader로 GREEN을 만든다.
  3. legacy input을 read-only fixture로 읽고 전체 VERIFY를 수행한다.
  4. /docs/linear-static-3d-euler-beam/implementation-report.md의 Step 11 section에 실제 RED/GREEN/VERIFY command, exit code, 핵심 output과 변경 파일을 기록한다.
  5. Step 11을 completed로 갱신하고 parsed syntax/source-location evidence를 summary에 기록한다.

금지사항

  • B33/B31 또는 supported keyword 정책을 syntax reader에 넣지 마라. 이유: semantic mapper 책임이다.
  • source label/value case를 canonicalize하지 마라. 이유: stable source identity를 보존해야 한다.
  • *INCLUDE 같은 미승인 기능을 추가하지 마라. 이유: scope 밖이다.
  • reference input을 수정하지 마라. 이유: read-only fixture다.
  • 직접 commit하지 마라. 이유: Harness executor가 담당한다.