← Latest papers
💻 computer science

DateSAT: A Framework for Solving Date and Period Constraints

This paper introduces DateSAT, the first framework for formally expressing and solving satisfiability constraints involving dates and calendar periods by reducing them to integer-based SMT formulas, and validates its effectiveness through an empirical evaluation on a curated dataset of 450 constraints.

Original authors: Leyi Cui, Shrey Tiwari, Rohan Padhye

Published 2026-05-26
📖 5 min read🧠 Deep dive

Original authors: Leyi Cui, Shrey Tiwari, Rohan Padhye

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 trying to solve a riddle: "The day before yesterday I was 25, and next year I will turn 28." When is this possible?

To a human, this is a fun brain teaser. To a computer, it's a nightmare. Computers are great at math, but they are terrible at calendars. They don't "know" that February sometimes has 29 days, or that adding "one month" to January 31st doesn't land on February 31st (because that day doesn't exist).

This paper introduces DateSAT, a new tool designed to teach computers how to think about dates and time periods without getting confused.

Here is how the authors broke it down, using some everyday analogies:

1. The Problem: Computers Hate "Fuzzy" Time

Think of a computer as a very strict librarian who only understands exact numbers. If you ask it to add "1 month" to a date, it panics if the math doesn't line up perfectly.

  • The Real-World Mess: The paper points out that this isn't just a puzzle. Real software has crashed because of date bugs. For example, a bug once caused gas pumps in New Zealand to stop working on February 29th because the computer didn't know how to handle the extra day. Another bug caused the US Patent Office to give the wrong expiration dates to thousands of patents.
  • The AI Glitch: Even modern AI (like the chatbots we use today) often gets these date riddles wrong because they aren't built to do strict calendar math.

2. The Solution: DateSAT (The "Calendar Translator")

The authors built a framework called DateSAT. Think of DateSAT as a translator that sits between a human's complex date question and a computer's strict math brain.

  • The Input: You give DateSAT a question like, "Is it possible for a company to make a legal election 500 days after buying stock, if the deadline is 9 months after the 'acquisition date'?"
  • The Magic: DateSAT translates this messy, human-language calendar problem into a clean, strict math problem that a computer solver (called an SMT solver) can handle perfectly.

3. How It Works: Five Different "Maps"

The hardest part of the project was figuring out how to translate the calendar into math. The authors tried five different strategies, like trying to navigate a city using five different types of maps:

  1. The Naive Map (The Step-by-Step Walker): This method tries to walk day-by-day. If you add 100 days, it takes 100 tiny steps. It's very accurate but incredibly slow, like walking across a country one foot at a time.
  2. The Epoch Map (The Milestone Marker): This method picks a fixed starting point (like "March 1, 2000") and counts how many days have passed since then. It's great for adding days, but getting confused when you need to jump by "months" or "years."
  3. The Hybrid Map (The Dual-View): This strategy uses two maps at once. It uses the "Milestone" map for adding days and the "Step-by-Step" map for adding months. It switches between them only when necessary to save time.
  4. The Alpha-Beta Map (The Calendar Grid): This is a clever shortcut. Instead of counting every single day, it counts "how many months have passed" and "how many days into the current month." It's like knowing you are on "Street 5, House 3" instead of counting every house from the start of the city.
  5. The Alpha-Beta-Table Map (The Cheat Sheet): This is the winner. It uses the "Calendar Grid" idea but adds a pre-written cheat sheet. Since calendars repeat in cycles (every 4 years), the tool just looks up the answer in a table instead of doing the math every time. This is the fastest method, solving complex problems up to 2.4 times faster than the slow "Naive" method.

4. The Test Drive: DateSATBench

To prove their tool works, the authors didn't just make up random questions. They built a test suite called DateSATBench with 450 different problems:

  • 100 were generated by AI to find tricky edge cases.
  • 150 were randomly generated "stress tests" designed to break the system.
  • 200 were pulled from real US tax laws to see if it could handle actual legal documents.

The Results:

  • The tool solved 85% of the problems in under a minute.
  • The "Cheat Sheet" method (Alpha-Beta-Table) was the clear champion, solving problems in a fraction of a second that took the "Naive" method much longer.
  • In one test, they found a hidden bug in a Python function that two different programmers wrote to check if a date was within an 18-month window. The human testers missed the bug, but DateSAT found it instantly.

5. Why This Matters

The paper concludes that DateSAT is the first tool that allows computers to reason about dates and periods symbolically. This means it can check if a piece of code is logically correct regarding time, or if a legal contract has a contradiction in its dates, without needing to run the code a million times to see if it crashes.

In short, DateSAT gives computers a "common sense" understanding of calendars, turning date-related logic from a source of expensive bugs into a solvable math problem.

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 →