← Latest papers
💻 computer science

Common Foundations for Recursive Shape Languages

This paper addresses the semantic divergence between recursive ShEx and SHACL schema languages by presenting a unifying formal framework that clarifies the relationships between least and greatest fixpoint semantics, demonstrates the existence of expressively equivalent fragments between the two standards, and analyzes their respective computational complexities.

Original authors: Shqiponja Ahmetaj, Iovka Boneva, Jan Hidders, Maxime Jakubowski, Jose-Emilio Labra-Gayo, Wim Martens, Fabio Mogavero, Filip Murlak, Cem Okulmus, Ognjen Savković, Mantas Šimkus, Dominik Tomaszuk

Published 2026-04-24
📖 5 min read🧠 Deep dive

Original authors: Shqiponja Ahmetaj, Iovka Boneva, Jan Hidders, Maxime Jakubowski, Jose-Emilio Labra-Gayo, Wim Martens, Fabio Mogavero, Filip Murlak, Cem Okulmus, Ognjen Savković, Mantas Šimkus, Dominik Tomaszuk

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are building a massive, interconnected city of information called the RDF Graph. In this city, every building (data point) is connected to others by roads (relationships). To keep this city organized, you need a City Planner's Rulebook (a schema language) that tells you what a valid building looks like.

Two major groups of architects have created their own rulebooks for this city: ShEx and SHACL.

For a long time, these rulebooks worked fine for simple, straight roads. But recently, the city started getting complicated with loops (roads that circle back on themselves) and recursive rules (rules that refer to themselves, like "A building is valid if it is connected to another valid building").

This is where things got messy. The paper you asked about is a team of experts from around the world coming together to solve a massive misunderstanding between these two groups. Here is the story of what they found, explained simply.

The Core Problem: The "Who's on First?" Confusion

Imagine you are trying to define a rule for a "Safe Building."

  • The ShEx Team says: "A building is safe if it can be part of a safe loop. We look for the biggest possible group of safe buildings." (They call this Greatest Fixpoint or GFP).
  • The SHACL Team is arguing about it. Some say: "A building is safe only if we can prove it's safe step-by-step from nothing." (They lean toward Least Fixpoint or LFP).
  • Others say: "Let's just pick any group of buildings that makes sense logically, even if there are multiple ways to do it." (This is Supported Model Semantics or SMS).

The Result: Because they are using different definitions of "valid," the same building might be approved by a ShEx validator but rejected by a SHACL validator. It's like two traffic cops giving opposite directions to the same driver. This breaks the city's ability to talk to itself (interoperability).

The Investigation: The "Taste Test"

The authors didn't just talk about theory; they built a Taste Test (a set of 13 specific test cases). They fed these tests into the actual software tools (validators) that people use today.

What they found:

  1. ShEx Tools: They are all consistent. They all follow the "Biggest Group" rule (GFP). They are like a choir singing in perfect harmony.
  2. SHACL Tools: They are a chaotic jazz band.
    • Some tools follow the "Step-by-Step" rule (LFP).
    • Some follow the "Pick Any Logic" rule (Brave SMS).
    • One tool (Topbraid) seems to have its own secret rulebook that doesn't match anyone else.
    • Some tools just crash when they see a loop.

The Takeaway: If you write a rule for SHACL today, you don't know if it will work tomorrow because you don't know which "flavor" of logic your validator is using.

The Big Discovery: The "Mirror" Trick

Here is the most exciting part of the paper. The authors realized that while ShEx and SHACL seem to be going in opposite directions, they are actually mirror images of each other.

  • The Analogy: Imagine ShEx is looking at a reflection in a mirror, and SHACL is looking at the real object.
  • If you take a ShEx rule (looking for the "biggest group") and flip it inside out (negate it), it becomes mathematically identical to a SHACL rule looking for the "smallest group."
  • Why this matters: It means that despite using different words and different logic, ShEx and SHACL are actually equally powerful. They can describe the exact same complex shapes in the data. They just speak different dialects.

The Cost of Confusion: The "Expensive Menu"

The paper also looked at how hard it is for computers to check these rules.

  • LFP and GFP (The Standard Rules): These are like ordering a burger. It takes a predictable, reasonable amount of time and money (computing power) to check if a building is valid.
  • SMS (The "Pick Any Logic" Rule): This is like ordering a meal where the chef has to guess every possible combination of ingredients that might work, check them all, and then pick one. This is exponentially more expensive. It can make the computer crash or take forever to finish, even for simple rules.

The Conclusion: A Peace Treaty

The authors, who include people who helped design both ShEx and SHACL, have reached a consensus:

  1. Stop the fighting: It is okay for ShEx to keep using its "Biggest Group" rule (GFP) and for SHACL to adopt the "Smallest Group" rule (LFP).
  2. The Mirror is Real: Because of the "Mirror Trick," these two different approaches can still talk to each other and handle the same complex data.
  3. Avoid the Expensive Option: They strongly advise against using the "Pick Any Logic" (SMS) approach because it is too slow and unpredictable for real-world use.

In a nutshell: The paper says, "Don't panic. The two main rulebooks are actually compatible if we understand they are mirrors of each other. Let's standardize on the fast, predictable rules and stop letting the software tools guess what they should do."

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →