AshR2RML.Telemetry.OCEL2 (AshR2RML v26.8.22)

Copy Markdown View Source

Formal IEEE/W3C Object-Centric Event Log (OCEL 2.0) Model, Serializer, Validator, and Conformance Checking Engine. Conforms to the formal OCEL 2.0 specification by Farhang, Park, and van der Aalst (2023).

Key Features:

  • Object Types and Instance Catalog with static and dynamic time-varying attributes
  • Polymorphic Event-to-Object (E2O) relations with explicit semantic qualifiers (:target, :actor, :initiator, :compensates, :input, :output, :context, :resource)
  • Object-to-Object (O2O) relations with semantic qualifiers (:memberOf, :hasPart, :wasDerivedFrom, :dependsOn, :relatesTo, :parentOf, :childOf)
  • Complete lifecycle transition states (:start, :stop, :error, :compensation, :undo, :retry, :guard_halt, :branch_selected)
  • Conformance checking: trace fitness calculation, detection of impossible event sequences, missing activity occurrences, and temporal causality preservation
  • Deterministic replay, point-in-time state reconstruction, and multigraph querying

Summary

Functions

Evaluates process conformance of an OCEL 2.0 log or events list against an expected model

Reconstructs the full graph of object states, dynamic time-varying attributes, E2O qualified bindings, and O2O multigraph relationships directly from an OCEL 2.0 event stream. Proves deterministic replay, point-in-time state reconstruction, and state convergence.

Returns the standard supported E2O qualifiers.

Returns the standard supported lifecycle states.

Returns the standard supported O2O qualifiers.

Queries the exact attribute state and relationships of an object at an arbitrary point in time.

Validates an OCEL 2.0 event log structure or NDJSON string against the formal specification.

Functions

check_conformance(events_or_log, model_or_expected)

@spec check_conformance(
  [map()]
  | %AshR2RML.Telemetry.OCEL2.Log{
      event_types: term(),
      events: term(),
      o2o: term(),
      object_types: term(),
      objects: term()
    },
  [String.t()] | struct() | map()
) ::
  {:ok,
   %AshR2RML.Telemetry.OCEL2.ConformanceReport{
     aligned_steps: term(),
     causality_violations: term(),
     diagnostics: term(),
     event_count: term(),
     fitness: term(),
     impossible_sequences: term(),
     lifecycle_violations: term(),
     missing_activities: term(),
     temporal_violations: term(),
     unexpected_activities: term(),
     valid?: term()
   }}
  | {:error, AshR2RML.Refusal.t()}

Evaluates process conformance of an OCEL 2.0 log or events list against an expected model:

  • Expected activity order / list
  • POWL Partial Order (AshR2RML.POWL.Model.PartialOrder)
  • POWL Choice Graph (AshR2RML.POWL.Model.ChoiceGraph)
  • Workflow Net (AshR2RML.POWL.WorkflowNet)

Detects:

  • Trace fitness score [0.0 - 1.0]
  • Missing activity occurrences
  • Impossible / unexpected activity sequences
  • Temporal ordering and causality violations
  • Lifecycle state progression anomalies

reconstruct_from_events(log)

@spec reconstruct_from_events(
  [map()]
  | %AshR2RML.Telemetry.OCEL2.Log{
      event_types: term(),
      events: term(),
      o2o: term(),
      object_types: term(),
      objects: term()
    }
) :: {:ok, map()}

Reconstructs the full graph of object states, dynamic time-varying attributes, E2O qualified bindings, and O2O multigraph relationships directly from an OCEL 2.0 event stream. Proves deterministic replay, point-in-time state reconstruction, and state convergence.

standard_e2o_qualifiers()

Returns the standard supported E2O qualifiers.

standard_lifecycles()

Returns the standard supported lifecycle states.

standard_o2o_qualifiers()

Returns the standard supported O2O qualifiers.

state_at(reconstruction, object_id, target_time)

@spec state_at(map(), String.t(), String.t() | DateTime.t()) ::
  {:ok, map()} | {:error, :not_found}

Queries the exact attribute state and relationships of an object at an arbitrary point in time.

validate(raw_events)

@spec validate(
  [map()]
  | String.t()
  | %AshR2RML.Telemetry.OCEL2.Log{
      event_types: term(),
      events: term(),
      o2o: term(),
      object_types: term(),
      objects: term()
    }
) :: {:ok, map()} | {:error, AshR2RML.Refusal.t()}

Validates an OCEL 2.0 event log structure or NDJSON string against the formal specification.