{
  "schemaVersion": 1,
  "evidenceType": "synthetic-state-enumeration",
  "initialValue": 100,
  "units": "dimensionless counter; LSNs are illustrative ordered labels, not byte offsets",
  "assumptions": [
    "One uncommitted transaction, one page, two integer increments.",
    "All update log records survive; zero, one or two compensation records survive.",
    "Data and pageLSN persist atomically; durable log is an intact prefix.",
    "Recovery runs to completion after the selected interruption."
  ],
  "limits": [
    "No real database, filesystem, I/O, power loss or timing is exercised.",
    "No concurrency, checkpoint analysis, dirty-page table, nested top action or torn-page handling.",
    "No claim about PostgreSQL, SQLite or failure probability."
  ],
  "sourceUrls": [
    "https://www.cs.cmu.edu/~15849g/readings/mohan92.pdf",
    "https://www.vldb.org/conf/1999/P1.pdf"
  ],
  "scenarioCount": 12,
  "scenarios": [
    {
      "durableClrs": 0,
      "before": {
        "value": 100,
        "lsn": 0
      },
      "afterRedo": {
        "value": 112,
        "lsn": 20
      },
      "replayed": [
        10,
        20
      ],
      "undone": [
        20,
        10
      ],
      "newClrs": 2,
      "afterUndo": {
        "value": 100,
        "lsn": 40
      },
      "log": [
        {
          "lsn": 10,
          "type": "update",
          "prevLSN": 0,
          "delta": 5
        },
        {
          "lsn": 20,
          "type": "update",
          "prevLSN": 10,
          "delta": 7
        },
        {
          "lsn": 30,
          "type": "clr",
          "prevLSN": 20,
          "undoNextLSN": 10,
          "delta": -7
        },
        {
          "lsn": 40,
          "type": "clr",
          "prevLSN": 30,
          "undoNextLSN": 0,
          "delta": -5
        }
      ]
    },
    {
      "durableClrs": 0,
      "before": {
        "value": 105,
        "lsn": 10
      },
      "afterRedo": {
        "value": 112,
        "lsn": 20
      },
      "replayed": [
        20
      ],
      "undone": [
        20,
        10
      ],
      "newClrs": 2,
      "afterUndo": {
        "value": 100,
        "lsn": 40
      },
      "log": [
        {
          "lsn": 10,
          "type": "update",
          "prevLSN": 0,
          "delta": 5
        },
        {
          "lsn": 20,
          "type": "update",
          "prevLSN": 10,
          "delta": 7
        },
        {
          "lsn": 30,
          "type": "clr",
          "prevLSN": 20,
          "undoNextLSN": 10,
          "delta": -7
        },
        {
          "lsn": 40,
          "type": "clr",
          "prevLSN": 30,
          "undoNextLSN": 0,
          "delta": -5
        }
      ]
    },
    {
      "durableClrs": 0,
      "before": {
        "value": 112,
        "lsn": 20
      },
      "afterRedo": {
        "value": 112,
        "lsn": 20
      },
      "replayed": [],
      "undone": [
        20,
        10
      ],
      "newClrs": 2,
      "afterUndo": {
        "value": 100,
        "lsn": 40
      },
      "log": [
        {
          "lsn": 10,
          "type": "update",
          "prevLSN": 0,
          "delta": 5
        },
        {
          "lsn": 20,
          "type": "update",
          "prevLSN": 10,
          "delta": 7
        },
        {
          "lsn": 30,
          "type": "clr",
          "prevLSN": 20,
          "undoNextLSN": 10,
          "delta": -7
        },
        {
          "lsn": 40,
          "type": "clr",
          "prevLSN": 30,
          "undoNextLSN": 0,
          "delta": -5
        }
      ]
    },
    {
      "durableClrs": 1,
      "before": {
        "value": 100,
        "lsn": 0
      },
      "afterRedo": {
        "value": 105,
        "lsn": 30
      },
      "replayed": [
        10,
        20,
        30
      ],
      "undone": [
        10
      ],
      "newClrs": 1,
      "afterUndo": {
        "value": 100,
        "lsn": 40
      },
      "log": [
        {
          "lsn": 10,
          "type": "update",
          "prevLSN": 0,
          "delta": 5
        },
        {
          "lsn": 20,
          "type": "update",
          "prevLSN": 10,
          "delta": 7
        },
        {
          "lsn": 30,
          "type": "clr",
          "prevLSN": 20,
          "undoNextLSN": 10,
          "delta": -7
        },
        {
          "lsn": 40,
          "type": "clr",
          "prevLSN": 30,
          "undoNextLSN": 0,
          "delta": -5
        }
      ]
    },
    {
      "durableClrs": 1,
      "before": {
        "value": 105,
        "lsn": 10
      },
      "afterRedo": {
        "value": 105,
        "lsn": 30
      },
      "replayed": [
        20,
        30
      ],
      "undone": [
        10
      ],
      "newClrs": 1,
      "afterUndo": {
        "value": 100,
        "lsn": 40
      },
      "log": [
        {
          "lsn": 10,
          "type": "update",
          "prevLSN": 0,
          "delta": 5
        },
        {
          "lsn": 20,
          "type": "update",
          "prevLSN": 10,
          "delta": 7
        },
        {
          "lsn": 30,
          "type": "clr",
          "prevLSN": 20,
          "undoNextLSN": 10,
          "delta": -7
        },
        {
          "lsn": 40,
          "type": "clr",
          "prevLSN": 30,
          "undoNextLSN": 0,
          "delta": -5
        }
      ]
    },
    {
      "durableClrs": 1,
      "before": {
        "value": 112,
        "lsn": 20
      },
      "afterRedo": {
        "value": 105,
        "lsn": 30
      },
      "replayed": [
        30
      ],
      "undone": [
        10
      ],
      "newClrs": 1,
      "afterUndo": {
        "value": 100,
        "lsn": 40
      },
      "log": [
        {
          "lsn": 10,
          "type": "update",
          "prevLSN": 0,
          "delta": 5
        },
        {
          "lsn": 20,
          "type": "update",
          "prevLSN": 10,
          "delta": 7
        },
        {
          "lsn": 30,
          "type": "clr",
          "prevLSN": 20,
          "undoNextLSN": 10,
          "delta": -7
        },
        {
          "lsn": 40,
          "type": "clr",
          "prevLSN": 30,
          "undoNextLSN": 0,
          "delta": -5
        }
      ]
    },
    {
      "durableClrs": 1,
      "before": {
        "value": 105,
        "lsn": 30
      },
      "afterRedo": {
        "value": 105,
        "lsn": 30
      },
      "replayed": [],
      "undone": [
        10
      ],
      "newClrs": 1,
      "afterUndo": {
        "value": 100,
        "lsn": 40
      },
      "log": [
        {
          "lsn": 10,
          "type": "update",
          "prevLSN": 0,
          "delta": 5
        },
        {
          "lsn": 20,
          "type": "update",
          "prevLSN": 10,
          "delta": 7
        },
        {
          "lsn": 30,
          "type": "clr",
          "prevLSN": 20,
          "undoNextLSN": 10,
          "delta": -7
        },
        {
          "lsn": 40,
          "type": "clr",
          "prevLSN": 30,
          "undoNextLSN": 0,
          "delta": -5
        }
      ]
    },
    {
      "durableClrs": 2,
      "before": {
        "value": 100,
        "lsn": 0
      },
      "afterRedo": {
        "value": 100,
        "lsn": 40
      },
      "replayed": [
        10,
        20,
        30,
        40
      ],
      "undone": [],
      "newClrs": 0,
      "afterUndo": {
        "value": 100,
        "lsn": 40
      },
      "log": [
        {
          "lsn": 10,
          "type": "update",
          "prevLSN": 0,
          "delta": 5
        },
        {
          "lsn": 20,
          "type": "update",
          "prevLSN": 10,
          "delta": 7
        },
        {
          "lsn": 30,
          "type": "clr",
          "prevLSN": 20,
          "undoNextLSN": 10,
          "delta": -7
        },
        {
          "lsn": 40,
          "type": "clr",
          "prevLSN": 30,
          "undoNextLSN": 0,
          "delta": -5
        }
      ]
    },
    {
      "durableClrs": 2,
      "before": {
        "value": 105,
        "lsn": 10
      },
      "afterRedo": {
        "value": 100,
        "lsn": 40
      },
      "replayed": [
        20,
        30,
        40
      ],
      "undone": [],
      "newClrs": 0,
      "afterUndo": {
        "value": 100,
        "lsn": 40
      },
      "log": [
        {
          "lsn": 10,
          "type": "update",
          "prevLSN": 0,
          "delta": 5
        },
        {
          "lsn": 20,
          "type": "update",
          "prevLSN": 10,
          "delta": 7
        },
        {
          "lsn": 30,
          "type": "clr",
          "prevLSN": 20,
          "undoNextLSN": 10,
          "delta": -7
        },
        {
          "lsn": 40,
          "type": "clr",
          "prevLSN": 30,
          "undoNextLSN": 0,
          "delta": -5
        }
      ]
    },
    {
      "durableClrs": 2,
      "before": {
        "value": 112,
        "lsn": 20
      },
      "afterRedo": {
        "value": 100,
        "lsn": 40
      },
      "replayed": [
        30,
        40
      ],
      "undone": [],
      "newClrs": 0,
      "afterUndo": {
        "value": 100,
        "lsn": 40
      },
      "log": [
        {
          "lsn": 10,
          "type": "update",
          "prevLSN": 0,
          "delta": 5
        },
        {
          "lsn": 20,
          "type": "update",
          "prevLSN": 10,
          "delta": 7
        },
        {
          "lsn": 30,
          "type": "clr",
          "prevLSN": 20,
          "undoNextLSN": 10,
          "delta": -7
        },
        {
          "lsn": 40,
          "type": "clr",
          "prevLSN": 30,
          "undoNextLSN": 0,
          "delta": -5
        }
      ]
    },
    {
      "durableClrs": 2,
      "before": {
        "value": 105,
        "lsn": 30
      },
      "afterRedo": {
        "value": 100,
        "lsn": 40
      },
      "replayed": [
        40
      ],
      "undone": [],
      "newClrs": 0,
      "afterUndo": {
        "value": 100,
        "lsn": 40
      },
      "log": [
        {
          "lsn": 10,
          "type": "update",
          "prevLSN": 0,
          "delta": 5
        },
        {
          "lsn": 20,
          "type": "update",
          "prevLSN": 10,
          "delta": 7
        },
        {
          "lsn": 30,
          "type": "clr",
          "prevLSN": 20,
          "undoNextLSN": 10,
          "delta": -7
        },
        {
          "lsn": 40,
          "type": "clr",
          "prevLSN": 30,
          "undoNextLSN": 0,
          "delta": -5
        }
      ]
    },
    {
      "durableClrs": 2,
      "before": {
        "value": 100,
        "lsn": 40
      },
      "afterRedo": {
        "value": 100,
        "lsn": 40
      },
      "replayed": [],
      "undone": [],
      "newClrs": 0,
      "afterUndo": {
        "value": 100,
        "lsn": 40
      },
      "log": [
        {
          "lsn": 10,
          "type": "update",
          "prevLSN": 0,
          "delta": 5
        },
        {
          "lsn": 20,
          "type": "update",
          "prevLSN": 10,
          "delta": 7
        },
        {
          "lsn": 30,
          "type": "clr",
          "prevLSN": 20,
          "undoNextLSN": 10,
          "delta": -7
        },
        {
          "lsn": 40,
          "type": "clr",
          "prevLSN": 30,
          "undoNextLSN": 0,
          "delta": -5
        }
      ]
    }
  ],
  "negativeControl": {
    "durableClrs": 1,
    "before": {
      "value": 112,
      "lsn": 20
    },
    "afterRedo": {
      "value": 105,
      "lsn": 30
    },
    "replayed": [
      30
    ],
    "undone": [
      20,
      10
    ],
    "newClrs": 2,
    "afterUndo": {
      "value": 93,
      "lsn": 50
    },
    "log": [
      {
        "lsn": 10,
        "type": "update",
        "prevLSN": 0,
        "delta": 5
      },
      {
        "lsn": 20,
        "type": "update",
        "prevLSN": 10,
        "delta": 7
      },
      {
        "lsn": 30,
        "type": "clr",
        "prevLSN": 20,
        "undoNextLSN": 10,
        "delta": -7
      },
      {
        "lsn": 40,
        "type": "clr",
        "prevLSN": 30,
        "undoNextLSN": 10,
        "delta": -7
      },
      {
        "lsn": 50,
        "type": "clr",
        "prevLSN": 40,
        "undoNextLSN": 0,
        "delta": -5
      }
    ]
  },
  "codeSha256": "e421b230826b6389aa95572a54b3fbce1a865c79f94a95771a272f40671759e7"
}
