...
 
Commits (2)
all: dist.dat axis-count.tex size-gte-100.tex matrices xslt.dat xqy.dat xslt-std.dat xqy-std.dat coverage-size.tex coverage-axis-step.tex numqueries.tex MAXcount.tex composition.tex composition_full.tex all-full-cov-pc.tex all-full-cov.tex
all: dist.dat axis-count.tex size-gte-100.tex matrices xslt.dat xqy.dat xslt-std.dat xqy-std.dat coverage-size.tex coverage-axis-step.tex numqueries.tex MAXcount.tex composition.tex composition_full.tex all-full-cov-pc.tex all-full-cov.tex occurences_axis.tex occurences_operators.tex
SHELL := /bin/bash
......@@ -127,3 +127,9 @@ composition.tex: composition.sh benchmarks-all-full.xml $(wildcard ../../benchma
composition_full.tex: composition_full.sh benchmarks-all-full.xml $(wildcard ../../benchmark/*-full.xml)
./$< > $@
occurences_axis.tex: occurences_axis.sh benchmarks-all-full.xml $(wildcard ../../benchmark/*-full.xml)
./$< > $@
occurences_operators.tex: occurences_operators.sh benchmarks-all-full.xml $(wildcard ../../benchmark/*-full.xml)
./$< > $@
#!/bin/bash
xslt=`grep 'xslt' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'`
xquery=`grep 'xquery' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'`
printf '\\begin{tabular}{lrrr}\n'
printf '\\toprule\n'
printf 'Axis & XSLT & XQuery & Total \\\\\n'
printf '\\midrule\n'
axis_list=("ancestor" "attribute" "child" "descendant" "following" "following-sibling" "namespace" "parent" "descendant" "preceding" "preceding-sibling" "self")
for axis in ${axis_list[*]}
do
printf '\\texttt{'
printf $axis
printf '}'
printf ' & '
# XSLT files
count_xslt=0
for file in $xslt
do
count=`xmlstarlet sel -N xqx="http://www.w3.org/2005/XQueryX" -t -c "count(//xpath[ast//xqx:xpathAxis[. = \"$axis\" or . = \"$axis-or-self\"]])" $file`
count_xslt=$(($count_xslt+$count))
done
printf $count_xslt
printf ' & '
# XQuery files
count_xquery=0
for file in $xquery
do
count=`xmlstarlet sel -N xqx="http://www.w3.org/2005/XQueryX" -t -c "count(//xpath[ast//xqx:xpathAxis[. = \"$axis\" or . = \"$axis-or-self\"]])" $file`
count_xquery=$(($count_xquery+$count))
done
printf $count_xquery
printf ' & '
count_total=$(($count_xslt+$count_xquery))
printf $count_total
printf ' \\\\\n'
done
printf '\\bottomrule\n'
printf '\\end{tabular}\n'
#!/bin/bash
xslt=`grep 'xslt' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'`
xquery=`grep 'xquery' benchmarks-all-full.xml | sed -e 's/.*href="\([^"]*\).*/\1/'`
printf '\\begin{tabular}{lrrr}\n'
printf '\\toprule\n'
printf 'Operator & XSLT & XQuery & Total \\\\\n'
printf '\\midrule\n'
list=(xpathAxis rootExpr functionCallExpr ifThenElseExpr letExpr forExpr simpleMapExpr dynamicFunctionInvocationExpr inlineFunctionExpr namedFunctionRef quantifiedExpr rangeSequenceExpr instanceOfExpr treatExpr nameTest piTest castableExpr castExpr)
for name in ${list[*]}
do
printf $name
printf ' & '
# XSLT files
count_xslt=0
for file in $xslt
do
count=`xmlstarlet sel -N xqx="http://www.w3.org/2005/XQueryX" -t -c "count(//xpath[ast//xqx:$name])" $file`
count_xslt=$(($count_xslt+$count))
done
printf $count_xslt
printf ' & '
# XQuery files
count_xquery=0
for file in $xquery
do
count=`xmlstarlet sel -N xqx="http://www.w3.org/2005/XQueryX" -t -c "count(//xpath[ast//xqx:$name])" $file`
count_xquery=$(($count_xquery+$count))
done
printf $count_xquery
printf ' & '
count_total=$(($count_xslt+$count_xquery))
printf $count_total
printf ' \\\\\n'
done
printf '\\bottomrule\n'
printf '\\end{tabular}\n'