← Latest papers
💻 computer science

FC-Datalog as a Framework for Efficient String Querying

This paper proposes a framework of tailored FC-Datalog fragments that balance expressive power and computational efficiency to enable efficient, tractable string querying for core spanners, demonstrated by simulating deterministic regex.

Original authors: Owen M. Bell, Joel D. Day, Dominik D. Freydenberger

Published 2026-06-23
📖 5 min read🧠 Deep dive

Original authors: Owen M. Bell, Joel D. Day, Dominik D. Freydenberger

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 have a massive, unorganized library of text—like a giant pile of unsorted letters, tweets, or medical notes. Your goal is to find specific patterns within this chaos, like "find all sentences where a person's name is followed by a date." This task is called Information Extraction.

The paper introduces a new, powerful tool for doing this called FC-Datalog. Think of it as a super-smart, recursive recipe book for finding patterns in text. However, the authors discovered that while this tool is incredibly powerful, it can be dangerously slow and unpredictable, like a recipe that might take a million years to finish cooking or might get stuck in an infinite loop.

Here is the breakdown of their work, using simple analogies:

1. The Problem: The "Magic" Tool That's Too Slow

The authors start with a logic system called FC (which looks at chunks of text directly) and combine it with Datalog (a language for writing recursive rules).

  • The Analogy: Imagine you have a magic magnifying glass (FC) that can instantly spot any word or phrase in a document. You pair it with a set of instructions (Datalog) that say, "If you find this pattern, look for that pattern inside it, and keep doing this forever."
  • The Issue: While this combination is very expressive (it can solve almost any text puzzle), the authors proved that checking if a specific text fits these rules is EXP-complete. In plain English, this means the time it takes to solve the puzzle grows so fast that for even moderately sized texts, the computer would need more time than the age of the universe to finish. It's like trying to count every grain of sand on every beach on Earth, one by one, but the number of grains doubles every second.

2. The Solution: Building a "Speed Limit" Framework

To fix this, the authors didn't throw the tool away; they built a series of restrictions (or "speed limits") to create different versions of the tool. They wanted versions that are:

  1. Fast: They finish quickly.
  2. Predictable: You can tell in advance if a rule set is safe to use.
  3. Useful: They can still solve interesting problems.

They created a "spectrum" or a range of these restricted tools:

Level 1: The "Linear" Version (NLOGSPACE)

  • The Restriction: They forced the rules to be "linear." Imagine a detective who can only follow one clue at a time. They can't split up and search two different paths simultaneously.
  • The Result: This made the tool much faster (NLOGSPACE), but it's still a bit slow for the most complex puzzles, and checking if a rule set is "linear" is easy.

Level 2: The "Deterministic" Version (LOGSPACE)

  • The Restriction: They made the tool "deterministic." Imagine a GPS that never gets confused. At every intersection, there is only one correct turn. There is no guessing.
  • The Result: This is the fastest version (LOGSPACE). It's incredibly efficient.
  • The Catch: Checking if a set of rules is truly "deterministic" is a nightmare. It's like trying to prove a maze has only one path without actually walking through it; it's so hard that it's almost impossible to verify automatically.

Level 3: The "One-Letter Lookahead" Version (DOLLA)

  • The Restriction: To make the "deterministic" check easy again, they added a rule called One-Letter Lookahead (OLLA). Imagine a robot that can only look at the very next letter of a word to decide what to do next. It can't look ahead two letters or guess the whole word.
  • The Result: This is the sweet spot. It is still super fast (LOGSPACE), and unlike the previous version, you can easily check if a rule set follows this rule (in polynomial time). It's like a robot that only takes one step at a time but is guaranteed not to get lost.

Level 4: The "Strictly Decreasing" Version (SD-DOLLA)

  • The Final Restriction: They added a rule that every step the tool takes must make the remaining text shorter. Imagine a game where you must eat a cookie, and every bite must be smaller than the last. You can't keep eating the same size forever.
  • The Result: This guarantees the tool finishes in linear time (the fastest possible speed). If the text has 1,000 letters, the tool takes roughly 1,000 steps. No more, no less.

3. The Payoff: Simulating "Deterministic Regex"

The authors showed that by picking the right version from their "speed limit" menu, they could simulate Deterministic Regex (a common, powerful way to search text used in programming languages like Python or Java).

  • The Analogy: Usually, to check if a complex text pattern matches, you have to build a giant, complicated machine (an automaton) that is hard to design.
  • The Innovation: With their tailored version of FC-Datalog (specifically a "DOLLA+" version they created), they could write these patterns as simple, short recipes. It's like replacing a complex Rube Goldberg machine with a simple, elegant screwdriver.

Summary

The paper is about taking a "super-powerful but dangerous" text-searching tool and creating a framework of safe, fast, and verifiable versions of it.

  • They proved the original tool is too slow.
  • They created a ladder of restrictions (Linear -> Deterministic -> One-Letter Lookahead -> Strictly Decreasing).
  • The bottom of the ladder (SD-DOLLA) is so fast and safe that it can be used for real-world applications, allowing us to write complex text-search programs that are both powerful and guaranteed to finish quickly.

They didn't invent a new medical cure or a new social media app; they invented a better way to organize the logic behind how computers search and understand text, ensuring that these searches don't crash the system or take forever.

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 →