/conflict-serializable-validator

A Python tool to check if a given transaction schedule is conflict serializable. It analyzes the schedule, builds a dependency graph, detects cycles, and determines whether the schedule can be serialized. Supports input from Excel files and provides a graphical representation of the dependency graph

Primary LanguagePythonMIT LicenseMIT

Conflict Serializable Validator Awesome

This Python script checks if a given schedule of transactions is conflict serializable by constructing a dependency graph and detecting cycles. If the graph has no cycles, the schedule is conflict serializable, and the script provides a topological order of transactions. The script also visualizes the dependency graph using networkx and matplotlib.

usage

python css.py <schedule.xlsx> [--verbose]

example

  • operations corresponding to transactions of schedule are entered in a excle file for ease of use
  • more transaction can be added as columns

image

output

No cycles detected. The given schedule is conflict serializable.
Order of serializability: ['T2', 'T3', 'T1']

dependency graph

example