Created
July 2, 2020 23:37
-
-
Save aterga/d8d50a11e75d9f9f85aabf8f908fbaec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple commands for collecting basic SMT statistics | |
# Get file names | |
for f in $(for file in group_*/*.smt2; do ls $file | xargs -n 1 basename; done); do printf ",$f"; done > stat.csv | |
echo >> stat.csv | |
# Get the logic | |
for f in $(for file in group_*/*.smt2; do cat $file | grep -oP "(?<=\(set-logic )(.*)(?=\))"; done); do printf ",$f"; done >> stat.csv | |
echo >> stat.csv | |
# Get the origins | |
for file in group_*/*.smt2; do cat $file | grep -oP "(?<=\(set-info :source \|)(.*)(?=\|\))" | sed 's/,/;/g'; done | tr "\n" "," >> stat.csv | |
#for file in group_*/*.smt2; do cat $file | grep -oP "(?<=\(set-info :source \|)(.*)(?=\|\))"; done | tr '\n' ',' >> stat.csv | |
echo >> stat.csv | |
# Get the file size | |
for file in group_*/*.smt2; do stat --printf=",%s" $file; done >> stat.csv | |
echo >> stat.csv | |
# Cound the assertions | |
for f in $(for file in group_*/*.smt2; do cat $file | grep "(assert " | wc -l; done); do printf ",$f"; done >> stat.csvecho >> stat.csv | |
echo >> stat.csv | |
# Cound the quantifiers | |
for f in $(for file in group_*/*.smt2; do cat $file | grep "(forall " | wc -l; done); do printf ",$f"; done >> stat.csv | |
echo >> stat.csv | |
# Count the patterns | |
for f in $(for file in group_*/*.smt2; do cat $file | grep ":pattern " | wc -l; done); do printf ",$f"; done >> stat.csv | |
echo >> stat.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment