Skip to content

Latest commit

 

History

143 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RL2: A Deterministic Policy Language for ODRL

RL2 is a candidate language contribution for the evolution of ODRL: a deterministic target for the supported ODRL 2.2 fragment, not a wholesale replacement of it. It retains the familiar policy concepts of permissions, prohibitions, duties, actions, assets, parties, constraints, profiles, offers, and agreements while defining the inputs and algorithms needed for independent evaluators to agree. Translation from ODRL 2.2 is deliberately partial and fail-closed — unsupported constructs are rejected or profile-gated, never silently weakened (ODRL 2.2 migration).

The proposal addresses three recurring sources of ambiguity:

  • the meaning of a policy for a particular request;
  • the facts and evidence that constitute the state of the world; and
  • the fulfillment, violation, and applicability of duties.

RL2 defines a pure evaluation contract:

Eval(PolicyUniverse, Request, WorldSnapshot, EvaluationConfiguration)
    -> EvaluationResult

It adds canonical RDF projection, SHACL validation, typed three-valued condition evaluation, declarative Duty status, explained conflict resolution, and a pure Offer-to-Agreement transformation.

Canonical shapes and total semantics make RL2 suitable for generation by software and language models. Generated RDF is not trusted as prose: it must pass canonical projection, validation, and the same evaluator semantics as any other policy.

Documents

  1. Scope
  2. Information model
  3. Formal semantics
  4. Compilation contract
  5. ODRL 2.2 migration
  6. Ontology and SHACL shapes
  7. Primer
  8. Use cases and conformance material

Repository Structure

Area Contents
spec/ Normative model, semantics, ontology, shapes, profiles, and migration rules
conformance/ Use cases, semantic vectors, and ODRL translation fixtures
docs/ Informative Primer, architecture, external-data guidance, vocabulary, and bibliography
future/ One non-normative list of possible follow-on work
backlog.md Working backlog: remaining execution items, deferred decisions with reopen triggers
tools/ Validation tooling

Example

@prefix rl2: <https://w3id.org/rl2#> .
@prefix ex:  <https://example.org/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

ex:policy a rl2:Set ;
    rl2:clause ex:researchUse .

ex:researchUse a rl2:Privilege ;
    rl2:subject ex:Researcher ;
    rl2:action ex:use ;
    rl2:object ex:Dataset ;
    rl2:condition [
        a rl2:AtomicConstraint ;
        rl2:leftOperand ex:purpose ;
        rl2:constraintOperator rl2:eq ;
        rl2:rightOperand "research"
    ] .

ex:Researcher a rl2:Agent .
ex:use a rl2:Action .
ex:Dataset a rl2:Asset .
ex:purpose a rl2:LeftOperand ;
    rdfs:range xsd:string ;
    rl2:resolutionPath "context.purpose" .

For a matching request and a snapshot containing context.purpose = "research", the Privilege contributes a permit. A missing purpose produces an attributed Indeterminate result rather than being silently interpreted as false.

Validation

The tools use uv:

uv run tools/validate.py
uv run tools/validate.py --per-fence spec/RL2_Semantics.md

This tool is structural smoke testing — it confirms Turtle fences parse and SHACL shapes hold; it is not evaluator, compiler, or semantic-vector conformance evidence.

Status

RL2 0.7 is a draft proposal for technical and academic review. The namespace is https://w3id.org/rl2#, stable unless future W3C or organizational adoption forces a change; the namespace is single-point-defined and always prefix-declared so a swap remains mechanical.

About

An attempt to define a better syntax and semantics that handles ODRL

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages