HAIDOX
HAIDOX Help

Math Engine 구조와 공개 API 개요

제품 경계

Math Engine은 C++17로 구현되고 C17 호환 public ABI를 제공하는 공학 계산 library다. Public surface는 installed include/math_engine/ header, shared/static library, CMake package, ABI manifest와 capability manifest로 구성된다.

Math Engine native library
  -> installed Math Engine SDK
     -> C/C++ consumer
     -> generated binding -> Python facade

Native public ABI에는 STL, C++ class·template·exception, Python object와 Qt type을 노출하지 않는다. Shared와 static target은 같은 header revision과 같은 동작 계약을 사용한다.

Public API identity

  • 모든 export function은 math_engine_* prefix와 MATH_ENGINE_API 를 사용한다.
  • Public POD, enum, callback와 opaque handle은 C17 compiler가 읽을 수 있어야 한다.
  • Semantic version, ABI version, source revision과 generated wrapper hash는 서로 다른 identity다.
  • Installed header, library, CMake target과 manifest는 같은 source revision이어야 한다.

전체 header와 symbol 목록은 Reference index에서 찾는다. ABI declaration은 ABI Reference, 공통 type과 status는 Types Reference와 Status Reference가 소유한다.

호출 계약

Pointer와 buffer는 nullable, ownership, capacity, lifetime와 invalidation 조건을 선언한다. Callback은 호출 thread, 동기 호출 여부, 보관 여부, user data lifetime, exception 금지와 cancellation을 선언한다. 별도 허용이 없으면 실패한 호출은 caller-owned output을 호출 전 값으로 보존한다.

수치 API는 적용되는 경우 단위, frame, tolerance, precision, overflow, non-finite, deterministic 동작과 partial result 조건을 명시한다. 공통 실패 의미는 상태와 오류 계약을 따른다.

기능 분류

  • ABI, type, context, configuration, execution, mode와 capability.
  • Checked integer, binary float, fixed/precision decimal과 실행 profile.
  • Linear algebra, affine transform, geometry와 CAD.
  • 일반·특수 함수, number theory, RNG, root solver, interpolation, numerical analysis와 optimization.
  • Expression, bytecode program, 제한 CAS, calculator와 plot data.
  • Unit와 quantity.
  • Physics, collision, motion, dynamics, trajectory, integration, control, estimation, MPC와 deterministic replay.

각 기능의 정확한 declaration과 제한은 대응 module Reference가 소유한다.