"""Check printed arithmetic, without choosing a corrected experimental value.""" from fractions import Fraction import json ROWS = ( ("TokuFS", "15.74", "72", "27", "1.7"), ("XFS", "5.53", "426", "77", "77"), ("gzip -5", "9.23", "52", "46", "5.6"), ) SOURCE = { "url": "https://www.usenix.org/system/files/conference/hotstorage12/hotstorage12-final52.pdf", "page": 5, "figure": 4, "accessed": "2026-12-01", "sha256": "efd056ac39db6787cc7dbecd3af3add008119d6feffc428f6c7289adcdfa73b7", } def rounded_interval(text): """Assume rounding to nearest displayed decimal unit, conservatively closed.""" if not isinstance(text, str) or not text or text.count(".") > 1: raise ValueError("Expected a positive decimal string") parts = text.split(".") if any(not part.isascii() or not part.isdigit() for part in parts): raise ValueError("Expected a positive decimal string") value = Fraction(text) places = len(parts[1]) if len(parts) == 2 else 0 half_unit = Fraction(1, 2 * 10 ** places) if value <= half_unit: raise ValueError("Rounding interval must remain strictly positive") return value - half_unit, value + half_unit def quotient_interval(numerator, denominator): low_n, high_n = rounded_interval(numerator) low_d, high_d = rounded_interval(denominator) return low_n / high_d, high_n / low_d def overlap(left, right): return max(left[0], right[0]) <= min(left[1], right[1]) def exact(value): return {"numerator": value.numerator, "denominator": value.denominator} def check_rate(size, seconds, printed_rate): quotient = Fraction(size) / Fraction(seconds) bounds = quotient_interval(size, seconds) printed_bounds = rounded_interval(printed_rate) return { "size": size, "printedRate": printed_rate, "quotientExact": exact(quotient), "quotientApprox": float(quotient), "conditionalQuotientIntervalExact": [exact(value) for value in bounds], "conditionalRoundingCompatible": overlap(bounds, printed_bounds), } def ordering_example(): paths = ["/a", "/a/x", "/b"] return { "type": "synthetic example, not a native filesystem trace", "paths": paths, "lexicographic": sorted(paths), "depthThenPath": sorted(paths, key=lambda path: (path.count("/"), path)), "subtree": "/a", "conclusion": "A full-path key alone does not guarantee subtree contiguity.", } def audit(): return { "type": "published-table arithmetic audit, not experiment reproduction", "source": SOURCE, "units": {"size": "MB as printed", "time": "seconds", "rate": "MB/s as printed"}, "roundingAssumption": "Each printed cell was independently rounded to its displayed decimal precision. This is a sensitivity assumption, not a reported measurement procedure.", "limitation": "No printed cell is presumed correct. These quotients do not measure device-written bytes or resolve the erroneous experimental field.", "rows": [ {"system": name, "seconds": seconds, "fileBandwidth": check_rate("426", seconds, file_rate), "diskBandwidth": check_rate(size, seconds, disk_rate)} for name, seconds, size, file_rate, disk_rate in ROWS ], "orderingExample": ordering_example(), } if __name__ == "__main__": print(json.dumps(audit(), indent=2) + "\n", end="")