Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
ee5cdf9
graceful parsing for invalid workloads
ajpal Apr 21, 2025
e4ca429
clippy
ajpal Apr 21, 2025
8ca8cd0
Update tests.yml
ajpal Apr 21, 2025
23d2e76
Update tests.yml
ajpal Apr 21, 2025
fe72ce9
Update tests.yml
ajpal Apr 21, 2025
4f78ec5
checkpoint: create bool workload
ajpal Apr 22, 2025
ddc1e81
checkpoint: add a row to nightly
ajpal Apr 22, 2025
d8e2d02
oops, api key
ajpal Apr 22, 2025
9ae172f
api key for tests
ajpal Apr 22, 2025
0f704af
nightly tweaks
ajpal May 5, 2025
c425e88
checkpoint: enumo + LLM for term enum
ajpal May 5, 2025
3af6933
resilient to malformed rules
ajpal May 8, 2025
feee9ec
ruleset from llm
ajpal May 8, 2025
e0161f7
skip derive
ajpal May 8, 2025
cb83638
support multiple models
ajpal May 8, 2025
6353933
make sure we can hit every model
ajpal May 8, 2025
f2e533d
bool and halide experiments
ajpal May 8, 2025
c1dd573
implement validation
ajpal May 12, 2025
7320c35
Merge branch 'main' into ajpal-llm
ajpal May 12, 2025
4b0cb1a
skip llm tests in CI
ajpal May 12, 2025
becaabf
clippy + fix test
ajpal May 13, 2025
a96f141
Update halide.rs
ajpal May 13, 2025
e5232ca
filter out unsound rules from llm
ajpal May 13, 2025
965eb6f
Gracefully handle invalid rules
ajpal May 15, 2025
350a404
full llm script
ajpal May 16, 2025
0adb6b8
write derivability results to files
ajpal May 16, 2025
5127cf8
skip tests in ci; cheaper model
ajpal May 16, 2025
016b690
fix filenames
ajpal May 19, 2025
0a83355
trig
ajpal May 20, 2025
fe653e3
snapshot prompts
ajpal May 21, 2025
9098949
mostly logging
ajpal May 23, 2025
6420905
case study 2
ajpal May 23, 2025
a1221f3
clippy
ajpal May 23, 2025
4e5f23f
checkpoint from last week
ajpal May 27, 2025
60ded66
progress bar
ajpal May 27, 2025
96fc1e3
progress bar for minimization
ajpal May 27, 2025
fa444b0
workload from llm aggregate models
ajpal May 27, 2025
0f2daa5
halide case studies
ajpal May 27, 2025
280ef50
tweaks to case studies
ajpal May 28, 2025
3873af9
more models
ajpal May 28, 2025
f8a65a2
disable claude sonnet
ajpal May 28, 2025
6a890bd
halide constnt folding
ajpal May 28, 2025
079322e
cs1 tweaks
ajpal May 28, 2025
eff5c04
separate case studies for run
ajpal May 28, 2025
9d4f399
step_size as parameter
ajpal May 29, 2025
4ada6b9
baselines
ajpal May 29, 2025
1c071c7
exp and trig final
ajpal May 29, 2025
c27f3a8
halide case study 1 final
ajpal May 29, 2025
3fc2efc
minimize trig and exp rules
ajpal May 29, 2025
7a72ee1
clippy
ajpal May 29, 2025
2e0ce32
halide cs1
ajpal May 29, 2025
e6b9139
halide cs1
ajpal May 29, 2025
ccb8291
halide case study 2
ajpal May 30, 2025
b9d4440
derive a5 cs2
ajpal May 30, 2025
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/nightly
/*.terms
/*.rules
.env

# Scripts
scripts/ablation/output/*
Expand Down Expand Up @@ -34,3 +35,5 @@ out/
# Exceptions
!scripts/oopsla21/ablation/submitted-plots/**/*.pdf
!scripts/oopsla21/ablation/submitted-plots/**/*.json

stash
7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ authors = ["Max Willsey <me@mwillsey.com>", "Chandrakana Nandi <cnandi@cs.washin
edition = "2018"

[dependencies]
dotenv = "0.15"
openai-api-rs = "6.0.3"
tokio = { version = "1", features = ["full"] }
clap = { version = "3.0.7", features = ["derive"] }
log = "0.4"
env_logger = { version = "0.7", default-features = false }
Expand All @@ -25,8 +28,10 @@ itertools = "0.9.0"
z3 = {version = "0.10.0", features = ["static-link-z3"]}
rustc-hash = "1"
symbolic_expressions = "5"
rayon = "1"
rayon = "1.10"
indicatif = "0.17"
smallstr = "0.3"
glob = "0.3"
[dependencies.egg]
version = "0.9"
# git = "https://github.com/egraphs-good/egg"
Expand Down
29 changes: 29 additions & 0 deletions baseline/enumo_trig.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
(sin (/ PI 4)) <=> (cos (/ PI 4))
(sin (/ PI 2)) <=> (cos 0)
(cos 0) <=> (tan (/ PI 4))
(cos (* PI 2)) <=> (cos 0)
(cos (/ PI 2)) <=> (tan PI)
(tan (* PI 2)) <=> (tan PI)
(sin PI) <=> (sin (* PI 2))
(sin 0) <=> (sin PI)
(tan 0) <=> (tan PI)
0 <=> (tan PI)
(sin PI) <=> (tan PI)
(~ (cos ?a)) <=> (cos (- PI ?a))
(sin (- PI ?a)) <=> (sin ?a)
(tan ?a) <=> (tan (+ PI ?a))
(~ (sin ?a)) <=> (sin (~ ?a))
(tan (~ ?a)) <=> (~ (tan ?a))
(cos (~ ?a)) <=> (cos ?a)
(+ (* (sin ?a) (sin ?a)) (* (cos ?a) (cos ?a))) ==> (cos 0)
(- (* (cos ?b) (cos ?b)) (* (cos ?a) (cos ?a))) <=> (- (* (sin ?a) (sin ?a)) (* (sin ?b) (sin ?b)))
(- (* (sin ?b) (sin ?b)) (* (cos ?a) (cos ?a))) <=> (- (* (sin ?a) (sin ?a)) (* (cos ?b) (cos ?b)))
(cos (- (/ PI 2) ?a)) <=> (sin ?a)
(/ (- 1 (cos (* 2 ?a))) 2) <=> (* (sin ?a) (sin ?a))
(/ (+ 1 (cos (* 2 ?a))) 2) <=> (* (cos ?a) (cos ?a))
(- ?a ?a) <=> (~ (- ?a ?a))
(* (sin ?b) (sin ?a)) <=> (/ (- (cos (- ?b ?a)) (cos (+ ?b ?a))) 2)
(* (cos ?b) (cos ?a)) <=> (/ (+ (cos (+ ?b ?a)) (cos (- ?b ?a))) 2)
(+ ?b ?a) ==> (+ ?a ?b)
(- (* (cos ?b) (cos ?a)) (* (sin ?b) (sin ?a))) <=> (cos (+ ?b ?a))
(sin (+ ?b ?a)) <=> (+ (* (sin ?b) (cos ?a)) (* (sin ?a) (cos ?b)))
31 changes: 31 additions & 0 deletions infra/localnightly.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash
# The primary purpose of this script is to run all the tests and upload
# the results to the nightly-results server. It also generates some HTML
# to display the equiderivability tests in a nicely-formatted way.

echo "Beginning Ruler nightly script..."

# exit immediately upon first error
set -e

# determine physical directory of this script
src="${BASH_SOURCE[0]}"
while [ -L "$src" ]; do
dir="$(cd -P "$(dirname "$src")" && pwd)"
src="$(readlink "$src")"
[[ $src != /* ]] && src="$dir/$src"
done
MYDIR="$(cd -P "$(dirname "$src")" && pwd)"

RESOURCES_DIR="$MYDIR/nightly-resources"
NIGHTLY_DIR="$MYDIR/../nightly"
OUTPUT_DIR="$NIGHTLY_DIR/output"

rm -rf "$OUTPUT_DIR"
mkdir -p "$OUTPUT_DIR"
mkdir -p "$OUTPUT_DIR/data"

cp $RESOURCES_DIR/* "$OUTPUT_DIR"
(echo "var data = "; cat $NIGHTLY_DIR/data/output.json) > $OUTPUT_DIR/data/output.js

cd $OUTPUT_DIR && python3 -m http.server 8002
8 changes: 4 additions & 4 deletions infra/nightly-resources/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ function getBaseline(name) {
"Enumo LOC": (row) => row.loc,
"# Enumo": (row) => row.rules.length,
"Time (s)": (row) => row.time,
"Enumo Derives Baseline (LHS / LHSRHS)": (row) =>
"X Derives Baseline (LHS / LHSRHS)": (row) =>
`${getDerivability(
row.derivability.enumo_derives_baseline.lhs
)} / ${getDerivability(row.derivability.enumo_derives_baseline.lhs_rhs)}`,
"Enumo derives Baseline Time (s)": (row) => {
"X derives Baseline Time (s)": (row) => {
if (missingDerivability(row.derivability.enumo_derives_baseline)) {
return "-";
} else {
Expand All @@ -73,11 +73,11 @@ function getBaseline(name) {
)}`;
}
},
"Baseline Derives Enumo (LHS / LHSRHS)": (row) =>
"Baseline Derives X (LHS / LHSRHS)": (row) =>
`${getDerivability(
row.derivability.baseline_derives_enumo.lhs
)} / ${getDerivability(row.derivability.baseline_derives_enumo.lhs_rhs)}`,
"Baseline derives Enumo Time (s)": (row) => {
"Baseline derives X Time (s)": (row) => {
if (missingDerivability(row.derivability.baseline_derives_enumo)) {
return "-";
} else {
Expand Down
3 changes: 3 additions & 0 deletions infra/nightly-resources/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@

<body onload="load()">
<h2>Nightlies</h2>
<div>
<div class="table" id="enumo_table"></div>
</div>
<div>
<div class="table" id="baseline_table"></div>
</div>
Expand Down
12 changes: 8 additions & 4 deletions infra/nightly-resources/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// Populates the oopsla, herbie, and halide tables with data from the
// global data object
function load() {
document.getElementById("enumo_table").innerHTML = ConvertJsonToTable(
getBaseline("enumo")
);

document.getElementById("baseline_table").innerHTML = ConvertJsonToTable(
getBaseline("oopsla")
);
Expand Down Expand Up @@ -66,16 +70,16 @@ function loadDeriveDetail() {

let tableData = [
{
"Enumo->Baseline (derivable)": formatRules(
"X->Baseline (derivable)": formatRules(
derivability.enumo_derives_baseline[deriveType]?.can
),
"Enumo->Baseline (not derivable)": formatRules(
"X->Baseline (not derivable)": formatRules(
derivability.enumo_derives_baseline[deriveType]?.cannot
),
"Baseline->Enumo (derivable)": formatRules(
"Baseline->X (derivable)": formatRules(
derivability.baseline_derives_enumo[deriveType]?.can
),
"Baseline->Enumo (not derivable)": formatRules(
"Baseline->X (not derivable)": formatRules(
derivability.baseline_derives_enumo[deriveType]?.cannot
),
},
Expand Down
Loading
Loading