Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,11 @@ def __post_init__(self) -> None:
tool2color: dict[ToolName, str] = {
"bitwuzla": "#FFAB40", "fplean": "#2E7D32", "fplean-nokernel": "#1565C0",
"fplean-nancanon": "#C62828", "exhaustive-enumeration": "#8E24AA"}
# Display labels for the plots. Our solver is presented anonymously as "ours"
# (never by its internal name) so no tool identity leaks into paper figures.
tool2label: dict[ToolName, str] = {
"bitwuzla": "Bitwuzla", "fplean": "FP-Lean", "fplean-nokernel": "FP-Lean (no kernel)",
"fplean-nancanon": "FP-Lean + NaN-canon", "exhaustive-enumeration": "Exhaustive enum"}
"bitwuzla": "Bitwuzla", "fplean": "ours", "fplean-nokernel": "ours (nokernel)",
"fplean-nancanon": "ours (NaN-canon)", "exhaustive-enumeration": "Exhaustive enum"}


class Problem(TypedDict):
Expand Down
2 changes: 1 addition & 1 deletion leanwuzla
11 changes: 10 additions & 1 deletion plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,18 @@
# plotted are still reported in the summary and the LaTeX macros.


# Our solver is anonymized as "Ours" in LaTeX macro names too, so no tool
# identity leaks into the paper's \input'd macros.
_TEXNAME_OVERRIDE = {
"fplean": "Ours", "fplean-nokernel": "OursNokernel",
"fplean-nancanon": "OursNancanon"}


def _texname(tool: str) -> str:
"""Letters-only, capitalized form of a tool name for use in LaTeX
\\newcommand names (which may not contain hyphens or digits)."""
if tool in _TEXNAME_OVERRIDE:
return _TEXNAME_OVERRIDE[tool]
return re.sub(r"[^A-Za-z]", "", tool).capitalize()


Expand Down Expand Up @@ -295,7 +304,7 @@ def plot_cactus(indir: pathlib.Path, outdir: pathlib.Path, opts: argparse.Namesp
f"{pfx}GeomeanMs{cap}": f"{s['geomean_ms']:.1f}",
}
lines.append("")
lines.append(f"%% {tool}")
lines.append(f"%% {bench.tool2label[tool]}")
lines.extend(bench.format_newcommand(k, v) for k, v in per_tool.items())

speedups = {
Expand Down
Loading