Commit 076ae494 authored by Anthony Lick's avatar Anthony Lick

Merge 'quantifiedExpr' with 'forExpr'

parent 6f6f5817
...@@ -27,7 +27,7 @@ printf '\\toprule\n' ...@@ -27,7 +27,7 @@ printf '\\toprule\n'
printf 'Operator & XSLT & XQuery & Total \\\\\n' printf 'Operator & XSLT & XQuery & Total \\\\\n'
printf '\\midrule\n' printf '\\midrule\n'
list=(xpathAxis rootExpr functionCallExpr ifThenElseExpr letExpr forExpr simpleMapExpr dynamicFunctionInvocationExpr inlineFunctionExpr namedFunctionRef quantifiedExpr rangeSequenceExpr instanceOfExpr treatExpr nameTest piTest castableExpr castExpr) list=(xpathAxis rootExpr functionCallExpr ifThenElseExpr letExpr forExpr simpleMapExpr dynamicFunctionInvocationExpr inlineFunctionExpr namedFunctionRef rangeSequenceExpr instanceOfExpr treatExpr nameTest piTest castableExpr castExpr)
for name in ${list[*]} for name in ${list[*]}
do do
...@@ -37,7 +37,11 @@ do ...@@ -37,7 +37,11 @@ do
count_xslt=0 count_xslt=0
for file in $xslt for file in $xslt
do do
count=`xmlstarlet sel -N xqx="http://www.w3.org/2005/XQueryX" -t -c "count(/benchmark/xpath[ast//xqx:$name])" $file` if [ $name = "forExpr" ]; then
count=`xmlstarlet sel -N xqx="http://www.w3.org/2005/XQueryX" -t -c "count(/benchmark/xpath[ast[.//xqx:forExpr or .//xqx:quantifiedExpr]])" $file`
else
count=`xmlstarlet sel -N xqx="http://www.w3.org/2005/XQueryX" -t -c "count(/benchmark/xpath[ast//xqx:$name])" $file`
fi
count_xslt=$(($count_xslt+$count)) count_xslt=$(($count_xslt+$count))
done done
percent=`echo "scale=1; 100*$count_xslt/$total_xslt" | bc` percent=`echo "scale=1; 100*$count_xslt/$total_xslt" | bc`
...@@ -47,7 +51,11 @@ do ...@@ -47,7 +51,11 @@ do
count_xquery=0 count_xquery=0
for file in $xquery for file in $xquery
do do
count=`xmlstarlet sel -N xqx="http://www.w3.org/2005/XQueryX" -t -c "count(/benchmark/xpath[ast//xqx:$name])" $file` if [ $name = "forExpr" ]; then
count=`xmlstarlet sel -N xqx="http://www.w3.org/2005/XQueryX" -t -c "count(/benchmark/xpath[ast[.//xqx:forExpr or .//xqx:quantifiedExpr]])" $file`
else
count=`xmlstarlet sel -N xqx="http://www.w3.org/2005/XQueryX" -t -c "count(/benchmark/xpath[ast//xqx:$name])" $file`
fi
count_xquery=$(($count_xquery+$count)) count_xquery=$(($count_xquery+$count))
done done
percent=`echo "scale=1; 100*$count_xquery/$total_xquery" | bc` percent=`echo "scale=1; 100*$count_xquery/$total_xquery" | bc`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment