PULSE: An Executable Contract Language for Spatiotemporal Knowledge Graph Engineering
Dongxu Yang, Ziyi Liang
cs.AI
Jul 26, 2026 · v1
cs.DB cs.PL
TL;DR
A sorry-free Lean 4 development checks functional kernels for positions, evidence, clocks, monitors, atomicity, and scenarios, cross-checked against the Python runtime.
Abstract
Knowledge graph engineering often distributes accepted state, observations, constraints, processes, and hypothetical scenarios across artifacts whose combined execution contract remains external. We present PULSE, an Object-Process-Methodology-inspired language that localizes four operational roles and their write effects in one typed runtime. Here, modes denote operational roles rather than modal or deontic logic. The implemented contract fixes evidence non-overwrite, branch isolation, grounded multi-subject timers, guarded state change, and declaration-ranked event ordering over time and space; an external runner still decides whether evidence becomes an authoritative move. GeoSPARQL, SOSA, and SHACL remain generated views. A core calculus gives an effect-confinement lemma and six safety properties. Lean 4 checks kernel analogues for positions, evidence, clocks, monitors, atomicity, and branch source retention; 88 tests, 3,534 bounded checks, and 32 Lean/Python runtime-kernel cases bound the implementation claim to the checked cases. First-author implementations of a standards composition and a separate Sismic statechart reproduce the tested cold-chain trace. Across 37,440 generated temporal traces, PULSE matches a separate workflow and distinguishes ten single-field mutants. On the complete NOAA IBTrACS since1980 subset it agrees with GEOS and an event sweep on 1,476,290 transition-zone pairs, including 4,800 sampled and 12,831 duration-qualified events. Project-specific GeoSPARQL probes measure interface coverage. Overall, the results support contract localization, safety arguments, and trace parity for the tested fragment; language superiority and usability remain outside the evaluation.
Problem
Knowledge graph engineering spreads accepted state, observations, constraints, processes, and hypothetical scenarios across separate artifacts. Their combined execution contract therefore stays external and implicit.
Approach
PULSE is an OPM-inspired language with four operational roles (assertions, observations, constraints, scenarios) and typed write effects in one runtime. GeoSPARQL, SOSA, and SHACL are generated as views. A core calculus provides an effect-confinement lemma and six safety properties. A Lean 4 development (no sorry) checks post-parse kernel analogues and compiler lemmas, and a 32-case bridge compares Lean and Python runtime-kernel outputs.
Results
88 tests, 3,534 bounded checks, and 32 Lean/Python cases pass, and Lean and Python emit byte-identical IR for the example model. PULSE matches a reference workflow on 37,440 temporal traces and kills 10/10 mutants. It agrees with GEOS on 1,476,290 IBTrACS transition-zone pairs.
| Evidence | Result |
|---|
| Core properties (88 tests, Lean 4) | 3,534 checks; 32 runtime-kernel projections agree; no failures |
| Temporal sensitivity | 37,440/37,440 traces match; mutants killed 10/10 |
| Spatial agreement (GEOS corpus) | 0 differences; 7,396 Jena/PostGIS rows agree |
| IBTrACS scale | 1,476,290 pairs; 0 differences |
Selected executed evidence