Skip to content

Commit

Permalink
Remove experimental years
Browse files Browse the repository at this point in the history
  • Loading branch information
bobot committed May 15, 2024
1 parent be05a9f commit 6ea1749
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions smtcomp/selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,17 @@
c_file = pl.col("file")


def find_trivial(results: pl.DataFrame) -> pl.LazyFrame:
def find_trivial(results: pl.LazyFrame) -> pl.LazyFrame:
tally = (
results.lazy()
.group_by("file")
.agg(
trivial=((c_result != int(defs.Status.Unknown)) & (c_cpu_time <= 1.0)).all()
results
# Remove the results of non-competitive year (the only result for this file for this year)
.filter(c_file.len().over("file", "year") > 1)
# Aggregate information for each file
.group_by("file").agg(
trivial=
# All the results are sat or unsat and the time is below 1s
((c_result != int(defs.Status.Unknown)) & (c_cpu_time <= 1.0)).all()
# No contradictory results
& ((c_result == int(defs.Status.Sat)).any() & (c_result == int(defs.Status.Unsat)).any()).not_(),
run=True,
)
Expand All @@ -37,7 +42,7 @@ def find_trivial(results: pl.DataFrame) -> pl.LazyFrame:

def add_trivial_run_info(benchmarks: pl.DataFrame, previous_results: pl.DataFrame) -> pl.LazyFrame:

is_trivial = find_trivial(previous_results)
is_trivial = find_trivial(previous_results.lazy())
return (
benchmarks.lazy()
.join(is_trivial, on="file", how="outer_coalesce")
Expand Down

0 comments on commit 6ea1749

Please sign in to comment.