Skip to content

Commit

Permalink
Update smt-logs and add time
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasAlaif committed Jan 27, 2025
1 parent 044bfb5 commit 4775b3e
Show file tree
Hide file tree
Showing 5 changed files with 851 additions and 81 deletions.
915 changes: 838 additions & 77 deletions eval/Analyse.ipynb

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions eval/eval.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,17 @@ while read -r file; do

# [ "$FILE" == "silicon/silver/src/test/resources/quantifiedpermissions/misc/functions-01.smt2" ] || continue
cd "$DIRNAME/data"
"$SMT2_DIR/z3.sh" "$file"
exec 3>&1 4>&2
Z3_TIME=$(TIMEFORMAT="%R"; { time "$SMT2_DIR/z3.sh" "$file" 1>&3 2>&4; } 2>&1)
exec 3>&- 4>&-

OUTPUT_DIR="$(dirname "$OUTPUT")"
LOGFILE="$(find "$OUTPUT_DIR" -name "$(basename "$OUTPUT")-fHash-*.log" -maxdepth 1 -type f)"
[ ! -n "$LOGFILE" ] && echo "!!! No logfile found" && continue || true
[ ! -s "$LOGFILE" ] && echo "!!! Log file is empty for \"$FILE\"" && continue || true
cd "$OUTPUT_DIR"

echo "[LOGFILE] $(basename "$LOGFILE") $(ls -l "$LOGFILE" | awk '{print $5}')b" > "$OUTPUT.data"
echo "[LOGFILE] $(basename "$LOGFILE") $(ls -l "$LOGFILE" | awk '{print $5}')b ${Z3_TIME}s" > "$OUTPUT.data"
"$DIRNAME/run.sh" "$LOGFILE" >> "$OUTPUT.data"

rm -f "$LOGFILE"
Expand Down
2 changes: 1 addition & 1 deletion eval/smt-logs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use mem_dbg::{MemDbg, MemSize};

use crate::{idx, items::InstIdx, BoxSlice, FxHashMap, Graph, TiVec};

pub const MIN_MATCHING_LOOP_LENGTH: u32 = 6;
pub const MIN_MATCHING_LOOP_LENGTH: u32 = 5;

idx!(MlSigIdx, "∞{}");

Expand Down
7 changes: 7 additions & 0 deletions smt-log-parser/src/bin/smt-scope/cmd/eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ pub fn run(logfile: PathBuf, dummy: bool) -> Result<(), String> {
}
}
println!("{}", to_print.join(" -> "));
if ml.leaves.0.len() > 1 {
print!("[ExtraLoop]");
for (repetitions, _) in ml.leaves.0.iter().skip(1) {
print!(" {repetitions}");
}
println!();
}
}
let rpq = redundancy.per_quant.iter_enumerated();
let pos_im = rpq.filter(|(_, d)| d.input_multiplicativity() > 1.0);
Expand Down

0 comments on commit 4775b3e

Please sign in to comment.