Skip to main content

Module sync

Module sync 

Source
Expand description

Bidirectional synchronization between physics state and RDF.

The existing parameter-extraction pipeline (crate::simulation::ParameterExtractor) handles the RDF → physics direction: pull entity properties from an RDF graph, parse typed literals, run a simulation. This module adds the reverse direction:

  1. state_to_rdf — render a physics state vector as RDF triples in a dedicated “state graph”.
  2. rdf_to_state — re-extract parameters from the RDF graph and rebuild a physics state vector (used after an external update).
  3. bidirectional — orchestrates periodic, snapshot-isolated round trips between the two halves.

State diffs use an in-house comparison (HashMap<String, f64>); we do not pull in the SAMM aspect-differ for scalar diffs.

Re-exports§

pub use bidirectional::BidirectionalSync;
pub use bidirectional::BidirectionalSyncConfig;
pub use bidirectional::BidirectionalSyncReport;
pub use bidirectional::SyncDirection;
pub use rdf_to_state::RdfToStateExtractor;
pub use rdf_to_state::RdfToStateOutput;
pub use state_to_rdf::state_diff;
pub use state_to_rdf::PhysicsState;
pub use state_to_rdf::PhysicsStateValue;
pub use state_to_rdf::StateDiff;
pub use state_to_rdf::StateGraphConfig;
pub use state_to_rdf::StateToRdfWriter;

Modules§

bidirectional
Periodic bidirectional sync orchestrator.
rdf_to_state
Re-extract a PhysicsState from RDF triples.
state_to_rdf
Render a physics state vector to RDF triples.