HomeDocs-Technical WhitePaper13-EFT.WP.Methods.SimStack v1.0

Appendix A: Interface Reference & Prototypes


I. Scope & Objectives


II. Common Conventions & Generic Types

  1. Identifiers and time
    • Published clock ts, internal monotonic base tau_mono, with mapping ts = alpha + beta * tau_mono.
    • Paths and measures: gamma(ell), d ell.
  2. Two arrival-time formulations
    • Constant factored form: T_arr = ( 1 / c_ref ) * ( ∫ n_eff d ell )
    • General form: T_arr = ( ∫ ( n_eff / c_ref ) d ell )
    • Compute in parallel and publish the discrepancy delta_form.
  3. Generic data types (text schema)
    • CouplingRef, PipeRef, EnvLock, PipeCard, ParamCard, CalReport, StepReport, BenchmarkReport, Attest.
    • Common result keys: TS.*, eps_norm, eps_mass, cfl, stable, sha256.
  4. Errors (enumerated string codes)
    E_DIM_MISMATCH, E_INVALID_UNITS, E_PATH_UNSPECIFIED, E_TIMEBASE_UNLOCKED, E_CFL_UNSTABLE, E_CONSERVATION_FAIL, E_RESOURCE_EXHAUSTED, E_DEADLINE, E_BACKPRESSURE, E_SCHEMA_MISMATCH, E_STORAGE_IO, E_IDEMPOTENCY, E_RETRYABLE, E_NONRETRYABLE, E_MISSING_HW_CAP.
  5. Idempotency & consistency
    Interfaces marked idempotent=true must return the same Ref or enact identical side effects on retries. Cross-thread communication obeys hb (happens-before) semantics with dedup keys msg.dedup_key.

III. I60-1 couple_fields — Continuous–Discrete Coupling

  1. Prototype
    I60-1 couple_fields(sim_state:any, continuous_kernels:list, discrete_nets:list, opts:dict) -> CouplingRef
  2. Inputs
    • continuous_kernels = [{id, kind, units, domain, bc}]
    • discrete_nets = [{id, graph=G=(V,E), io, semantics}]
    • opts = {interfaces, units.map, path.gamma.list, c_ref, timebase={alpha,beta}}
  3. Output
    CouplingRef with boundary mappings, unit mappings, and the path manifest.
  4. Errors
    E_SCHEMA_MISMATCH, E_INVALID_UNITS, E_PATH_UNSPECIFIED.
  5. Contract
    Idempotent. After creation, units.map and path.gamma.list are immutable (convention immutability).

IV. I60-2 exchange_packets — Boundary Exchange


V. I60-3 advance_dt — Time Advancement


VI. I60-4 calibrate_arrival_time — Arrival-Time Calibration


VII. I60-5 emit_metrics — Runtime Metrics


VIII. I60-6 freeze_env — Environment Lock


IX. I60-7 generate_pipeline_card — Pipeline Card Generation


X. I60-8 materialize_pipeline — Pipeline Materialization


XI. I60-9 run_with_attestation — Attested Run


XII. I60-10 verify_repro — Reproducibility Check


XIII. I60-11 export_repro_pack — Repro Pack Export


XIV. I60-20 manifest_emit — Manifest Persistence


XV. I60-21 dataset_write — Dataset Write


XVI. I60-30 plan_schedule — Planning & Ready Set


XVII. I60-31 set_backpressure — Backpressure & Throttling


XVIII. I60-60 fit_step — Single Fitting Step


XIX. I60-65 run_fit_loop — Fitting Loop


XX. I60-70 compute_error_budget — Error Budget


XXI. I60-71 check_conservation — Conservation Check


XXII. I60-90 run_benchmark — Benchmark Run


XXIII. I60-91 report_benchmark — Benchmark Publication


XXIV. Utility Functions (Conventional Implementations)


XXV. Typical Call Sequences (Pseudocode)

  1. Bootstrap & coupling
    • EnvLock = I60-6.freeze_env(env_spec)
    • CouplingRef = I60-1.couple_fields(sim_state, kernels, nets, opts)
    • PipeCard = I60-7.generate_pipeline_card(sim_state, fit, opts)
    • PipeRef = I60-8.materialize_pipeline(PipeCard, ParamCard, EnvLock)
  2. Advancement & calibration
    • CalReport = I60-4.calibrate_arrival_time(trace, paths, c_ref, medium)
    • Loop I60-3.advance_dt(...) and periodically I60-2.exchange_packets(...)
    • I60-5.emit_metrics(sim_state)
  3. Conservation & publication
    • I60-71.check_conservation(...)
    • BenchmarkReport = I60-90.run_benchmark(PipeRef, suite, opts)
    • Attest = I60-9.run_with_attestation(PipeRef, seeds)
    • ReproPack = I60-11.export_repro_pack(PipeCard, ParamCard, EnvLock, Attest)
    • I60-91.report_benchmark(BenchmarkReport, targets)

XXVI. Versioning & Compatibility

  1. Semantic versioning
    • Major: convention or unit changes; adjustments to the two T_arr definitions; time-base mapping changes.
    • Minor: parameter and default-policy changes without convention changes.
    • Patch: defect fixes and non-functional optimizations.
  2. Compatibility strategy
    New optional parameters in I60-* remain backward compatible. Deletions or semantic changes occur only in major versions, with a migration script cid.

XXVII. New Terms & Symbols (to memorize)


Copyright & License (CC BY 4.0)

Copyright: Unless otherwise noted, the copyright of “Energy Filament Theory” (text, charts, illustrations, symbols, and formulas) belongs to the author “Guanglin Tu”.
License: This work is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0). You may copy, redistribute, excerpt, adapt, and share for commercial or non‑commercial purposes with proper attribution.
Suggested attribution: Author: “Guanglin Tu”; Work: “Energy Filament Theory”; Source: energyfilament.org; License: CC BY 4.0.

First published: 2025-11-11|Current version:v5.1
License link:https://creativecommons.org/licenses/by/4.0/