dprod icon indicating copy to clipboard operation
dprod copied to clipboard

DPROD Contracts: align formal-semantics.md with SKOS lifecycle properties (1.3 follow-on)

Open jgeluk opened this issue 6 months ago • 2 comments

Track: DPROD 1.1 data-contracts post-merge follow-up from PR #156.

Plan item 1.3 (follow-on) of `dprod-contracts/docs/changes-plan.md`. The group decided to remove `owl:oneOf` from `dprod:State` and open it for extension; the follow-on is to split into two named lifecycle subclasses so evaluation algorithms can branch on the relevant axis:

  • `dprod:DutyLifeCycleState` (used by `odrl:Duty`)
  • `dprod:DataContractLifeCycleState` (used by `dprod:DataOffer` and `dprod:DataContract`)

Both subclass `dprod:State` so existing extenders that targeted the unified enumeration still work.

Touches:

  • `dprod-contracts/dprod-contracts.ttl` — class hierarchy
  • `dprod-contracts/dprod-contracts-shapes.ttl` — `StatePropertyGroup` becomes two property groups with different `sh:in` enumerations
  • `dprod-contracts/docs/specification.md` and `docs/formal-semantics.md` — distinguish the two state axes
  • `dprod-contracts/examples/*.ttl` — no value changes (the four states are the same), only the rdf:type declarations on the named individuals shift

cc @tonyseale @matthiasautrata

jgeluk avatar May 28 '26 16:05 jgeluk

The main §1.3 work is done and merged in #199 (d53c62c): dprod:State was removed and replaced with three skos:Concept-ranged properties — dprod:offerLifeCycleStatus, dprod:contractLifeCycleStatus, dprod:dutyState. The originally-proposed subclass split (this issue's old title) was not the chosen approach.

What remains open is the 1.3 follow-on (algorithm-branching) — the doc sweep in #199 missed formal-semantics.md, which is now inconsistent with the ontology:

  • formal-semantics.md:244 still describes State as "a unified lifecycle enum shared by duties, contracts, and subscriptions" — that unified dprod:State enum no longer exists.
  • updateDutyStates (lines 373, 673) and §5 "Duty Lifecycle" still frame state around the removed enum.
  • The three new lifecycle properties appear 0 times in formal-semantics.md.

Task: update formal-semantics.md so the evaluation/state-machine semantics reference the three skos:Concept lifecycle properties (which is computed/evaluated vs. administrative-only), and drop references to the removed unified dprod:State enum. All other contracts docs (specification.md, overview.md, the guides, term-mapping.md) were already swept correctly in #199 and are consistent.

jgeluk avatar Jun 16 '26 15:06 jgeluk

The bigger questions: Do we need to specify a formal semantics? How do we check it?

Currently, I fear there was quite a bit of drift from the original. This would require careful fixing - not a quick task,

matthiasautrata avatar Aug 17 '26 17:08 matthiasautrata