source: docs/Balisage13/Bal2013came0601/Bal2013came0601.html @ 3060

Last change on this file since 3060 was 3060, checked in by cameron, 6 years ago

Citations

File size: 101.2 KB
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<html lang="en">
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5<title></title>
6<link rel="stylesheet" href="balisage-proceedings.css" type="text/css">
7<meta name="keywords" content="">
8</head>
9<body>
10<div id="balisage-header"><h1 style="text-align: right; font-family: serif; margin:0.25em">
11<i>Balisage:</i> <small>The Markup Conference</small>
12</h1></div>
13<html lang="en">
14<head>
15<title></title>
16<link rel="stylesheet" href="balisage-proceedings.css" type="text/css">
17<meta name="generator" content="Balisage Conference Proceedings XSLT (v1.2)">
18<script type="text/javascript">
19    function toggle(folderID) {
20      folder = document.getElementById("folder-"+folderID);
21      icon = document.getElementById("icon-"+folderID)
22      // need to:
23      //   switch folder.style.display between 'none' and 'block'
24      //   switch between collapse and expand icons
25      if (folder.style.display != "block") {
26        folder.style.display = "block";
27        icon.src = "minus.png" ;
28        icon.alt = "collapse" ;
29      }
30      else {
31        folder.style.display = "none";
32        icon.src = "plus.png" ;
33        icon.alt = "expand" ;
34      };
35      return;
36    }
37
38   function hidecite(citeID) {
39     cite = document.getElementById(citeID);
40     cite.style.display = "none";
41     return;
42   }
43   
44   function showcite(citeID,anchorID) {
45     cite = document.getElementById(citeID);
46
47     citeLeft = cite.style.left;
48     citeTop = cite.style.top;
49     
50     if (citeLeft != (getLeft(anchorID)+"px") ||
51         citeTop != (getTop(anchorID)+"px")) {
52       cite.style.display = "none";
53     }
54     
55     if (cite.style.display != "table-cell") {
56        movebox(citeID, anchorID);
57        cite.style.display = "table-cell";
58     }
59     else {
60       cite.style.display = "none";
61     };
62     return;
63   }
64
65   function movebox(citeID, anchorID) {
66
67     cite = document.getElementById(citeID);
68     
69     // alert(cite.offsetWidth + " by " + cite.offsetHeight)
70     
71     horizontalOffset = getLeft(anchorID);
72     // horizontalOffset = (inMain(anchorID)) ?
73     // (horizontalOffset - 260) : (horizontalOffset + 20)
74     // (horizontalOffset - (20 + cite.offsetWidth)) : (horizontalOffset + 20)
75
76     verticalOffset = getTop(anchorID);
77     // verticalOffset = (inMain(anchorID)) ?
78     // (verticalOffset - 20) : (verticalOffset + 20)
79     // (verticalOffset - (20 + cite.offsetHeight)) : (verticalOffset + 20)
80
81     /*
82     horizontalOffset = getAbsoluteLeft(anchorID) - getScrollLeft(anchorID) + 20;
83     if (inMain(anchorID)) {
84       horizontalOffset = horizontalOffset - 300;
85     }
86     verticalOffset = getAbsoluteTop(anchorID) - getScrollTop(anchorID) - 40;
87     if (inMain(anchorID)) {
88       verticalOffset = verticalOffset - 300;
89     }
90     */
91     
92     cite.style.left = horizontalOffset + "px";
93     cite.style.top = verticalOffset + "px";
94   }
95   
96   function getLeft(objectID) {
97     var left = getAbsoluteLeft(objectID) - getScrollLeft(objectID);
98     left = (inMain(objectID)) ? (left - 260) : (left + 20)   
99     return left;
100   }
101   
102   function getTop(objectID) {
103     var top = getAbsoluteTop(objectID) - getScrollTop(objectID);
104     top = (inMain(objectID)) ? (top - 50) : (top + 20)
105     return top;     
106   }
107   
108   function getAbsoluteLeft(objectId) {
109   // Get an object left position from the upper left viewport corner
110     o = document.getElementById(objectId)
111     oLeft = o.offsetLeft            // Get left position from the parent object
112     while(o.offsetParent!=null) {   // Parse the parent hierarchy up to the document element
113       oParent = o.offsetParent    // Get parent object reference
114       oLeft += oParent.offsetLeft // Add parent left position
115       o = oParent
116      }
117    return oLeft
118    }
119
120    function getAbsoluteTop(objectId) {
121    // Get an object top position from the upper left viewport corner
122      o = document.getElementById(objectId)
123      oTop = o.offsetTop            // Get top position from the parent object
124      while(o.offsetParent!=null) { // Parse the parent hierarchy up to the document element
125        oParent = o.offsetParent  // Get parent object reference
126        oTop += oParent.offsetTop // Add parent top position
127        o = oParent
128      }
129    return oTop
130    }
131
132   function getScrollLeft(objectId) {
133     // Get a left scroll position
134     o = document.getElementById(objectId)
135     oLeft = o.scrollLeft            // Get left position from the parent object
136     while(o.offsetParent!=null) {   // Parse the parent hierarchy up to the document element
137       oParent = o.offsetParent    // Get parent object reference
138       oLeft += oParent.scrollLeft // Add parent left position
139       o = oParent
140      }
141    return oLeft
142    }
143
144    function getScrollTop(objectId) {
145    // Get a right scroll position
146      o = document.getElementById(objectId)
147      oTop = o.scrollTop            // Get top position from the parent object
148      while(o.offsetParent!=null) { // Parse the parent hierarchy up to the document element
149        oParent = o.offsetParent  // Get parent object reference
150        oTop += oParent.scrollTop // Add parent top position
151        o = oParent
152      }
153    return oTop
154    }
155
156    function inMain(objectId) {
157    // returns true if in div#main
158      o = document.getElementById(objectId)
159      while(o.parentNode != null) { // Parse the parent hierarchy up to div#main
160        oParent = o.parentNode
161        if (o.id == "main") { return true; }
162        o = oParent;
163      }
164    return false;
165    }
166
167
168   /*
169   function showcite(citeID) {
170      cite = document.getElementById(citeID);
171      if (cite.style.display != "table-cell") {
172        cite.style.display = "table-cell";
173      }
174      else {
175        cite.style.display = "none";
176      };
177      return;
178    }
179    */
180
181      </script>
182</head>
183<body>
184<div class="inline-citation" id="cite-CameronHerdyLin2008" style="display:none;width: 240px">
185<a class="quiet" href="javascript:hidecite('cite-CameronHerdyLin2008')" style="font-size:90%"><img src="eks.png" alt="[x]" style="float:right;clear:both;margin:1px"></a><p style="margin:0ex">Cameron, Robert D., Herdy, Kenneth S. and Lin, Dan. High performance XML parsing using parallel bit stream technology. CASCON'08: Proc. 2008 conference of the center for advanced studies on collaborative research. 2008 New York, NY, USA</p>
186</div>
187<div class="inline-citation" id="cite-papi" style="display:none;width: 240px">
188<a class="quiet" href="javascript:hidecite('cite-papi')" style="font-size:90%"><img src="eks.png" alt="[x]" style="float:right;clear:both;margin:1px"></a><p style="margin:0ex">Innovative Computing Laboratory, University of Texas. Performance Application Programming Interface.<a href="http://icl.cs.utk.edu/papi/" class="link" target="_new">http://icl.cs.utk.edu/papi/</a></p>
189</div>
190<div class="inline-citation" id="cite-perf" style="display:none;width: 240px">
191<a class="quiet" href="javascript:hidecite('cite-perf')" style="font-size:90%"><img src="eks.png" alt="[x]" style="float:right;clear:both;margin:1px"></a><p style="margin:0ex">Eranian, Stephane, Gouriou, Eric, Moseley, Tipp and Bruijn, Willem de. Linux kernel profiling with perf.<a href="https://perf.wiki.kernel.org/index.php/Tutorial" class="link" target="_new">https://perf.wiki.kernel.org/index.php/Tutorial</a></p>
192</div>
193<div class="inline-citation" id="cite-Cameron2008" style="display:none;width: 240px">
194<a class="quiet" href="javascript:hidecite('cite-Cameron2008')" style="font-size:90%"><img src="eks.png" alt="[x]" style="float:right;clear:both;margin:1px"></a><p style="margin:0ex">Cameron, Robert D.. A case study in SIMD text processing with parallel bit streams: UTF-8 to UTF-16 transcoding. Proc. 13th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming. 2008 New York, NY, USA</p>
195</div>
196<div class="inline-citation" id="cite-ParaDOM2009" style="display:none;width: 240px">
197<a class="quiet" href="javascript:hidecite('cite-ParaDOM2009')" style="font-size:90%"><img src="eks.png" alt="[x]" style="float:right;clear:both;margin:1px"></a><p style="margin:0ex">Shah, Bhavik, Rao, Praveen, Moon, Bongki and Rajagopalan, Mohan. A Data Parallel Algorithm for XML DOM Parsing. Database and XML Technologies. 2009</p>
198</div>
199<div class="inline-citation" id="cite-XMLSSE42" style="display:none;width: 240px">
200<a class="quiet" href="javascript:hidecite('cite-XMLSSE42')" style="font-size:90%"><img src="eks.png" alt="[x]" style="float:right;clear:both;margin:1px"></a><p style="margin:0ex">Lei, Zhai. XML Parsing Accelerator with Intel Streaming SIMD Extensions 4 (Intel SSE4). 2008<a href="Intel%20Software%20Network" class="link" target="_new">Intel Software Network</a></p>
201</div>
202<div class="inline-citation" id="cite-Cameron2009" style="display:none;width: 240px">
203<a class="quiet" href="javascript:hidecite('cite-Cameron2009')" style="font-size:90%"><img src="eks.png" alt="[x]" style="float:right;clear:both;margin:1px"></a><p style="margin:0ex">Cameron, Rob, Herdy, Ken and Amiri, Ehsan Amiri. Parallel Bit Stream Technology as a Foundation for XML Parsing Performance. Int'l Symposium on Processing XML Efficiently: Overcoming Limits on Space, Time, or Bandwidth. 2009</p>
204</div>
205<div class="inline-citation" id="cite-HilewitzLee2006" style="display:none;width: 240px">
206<a class="quiet" href="javascript:hidecite('cite-HilewitzLee2006')" style="font-size:90%"><img src="eks.png" alt="[x]" style="float:right;clear:both;margin:1px"></a><p style="margin:0ex">Hilewitz, Yedidya and Lee, Ruby B.. Fast Bit Compression and Expansion with Parallel Extract and Parallel Deposit Instructions. ASAP '06: Proc. IEEE 17th Int'l Conference on Application-specific Systems, Architectures and Processors. 2006 Washington, DC, USA</p>
207</div>
208<div class="inline-citation" id="cite-Asanovic-EECS-2006-183" style="display:none;width: 240px">
209<a class="quiet" href="javascript:hidecite('cite-Asanovic-EECS-2006-183')" style="font-size:90%"><img src="eks.png" alt="[x]" style="float:right;clear:both;margin:1px"></a><p style="margin:0ex">Asanovic, Krste and others. The Landscape of Parallel Computing Research: A View from Berkeley. 2006</p>
210</div>
211<div class="inline-citation" id="cite-GRID2006" style="display:none;width: 240px">
212<a class="quiet" href="javascript:hidecite('cite-GRID2006')" style="font-size:90%"><img src="eks.png" alt="[x]" style="float:right;clear:both;margin:1px"></a><p style="margin:0ex">Lu, Wei, Chiu, Kenneth and Pan, Yinfei. A Parallel Approach to XML Parsing. Proceedings of the 7th IEEE/ACM International Conference on Grid Computing. 2006 Washington, DC, USA</p>
213</div>
214<div class="inline-citation" id="cite-cameron-EuroPar2011" style="display:none;width: 240px">
215<a class="quiet" href="javascript:hidecite('cite-cameron-EuroPar2011')" style="font-size:90%"><img src="eks.png" alt="[x]" style="float:right;clear:both;margin:1px"></a><p style="margin:0ex">Cameron, Robert D., Amiri, Ehsan, Herdy, Kenneth S., Lin, Dan, Shermer, Thomas C. and Popowich, Fred P.. Parallel Scanning with Bitstream Addition: An XML Case Study. Euro-Par 2011, LNCS 6853, Part II. 2011 Berlin, Heidelberg</p>
216</div>
217<div class="inline-citation" id="cite-HPCA2012" style="display:none;width: 240px">
218<a class="quiet" href="javascript:hidecite('cite-HPCA2012')" style="font-size:90%"><img src="eks.png" alt="[x]" style="float:right;clear:both;margin:1px"></a><p style="margin:0ex">Lin, Dan, Medforth, Nigel, Herdy, Kenneth S., Shriraman, Arrvindh and Cameron, Rob. Parabix: Boosting the efficiency of text processing on commodity processors. International Symposium on High-Performance Computer Architecture. 2012 Los Alamitos, CA, USA</p>
219</div>
220<div class="inline-citation" id="cite-HPCC2011" style="display:none;width: 240px">
221<a class="quiet" href="javascript:hidecite('cite-HPCC2011')" style="font-size:90%"><img src="eks.png" alt="[x]" style="float:right;clear:both;margin:1px"></a><p style="margin:0ex">You, Cheng-Han and Wang, Sheng-De. A Data Parallel Approach to XML Parsing and Query. 10th IEEE International Conference on High Performance Computing and Communications. 2011 Los Alamitos, CA, USA</p>
222</div>
223<div class="inline-citation" id="cite-E-SCIENCE2007" style="display:none;width: 240px">
224<a class="quiet" href="javascript:hidecite('cite-E-SCIENCE2007')" style="font-size:90%"><img src="eks.png" alt="[x]" style="float:right;clear:both;margin:1px"></a><p style="margin:0ex">Pan, Yinfei, Zhang, Ying, Chiu, Kenneth and Lu, Wei. Parallel XML Parsing Using Meta-DFAs. International Conference on e-Science and Grid Computing. 2007 Los Alamitos, CA, USA</p>
225</div>
226<div class="inline-citation" id="cite-ICWS2008" style="display:none;width: 240px">
227<a class="quiet" href="javascript:hidecite('cite-ICWS2008')" style="font-size:90%"><img src="eks.png" alt="[x]" style="float:right;clear:both;margin:1px"></a><p style="margin:0ex">Pan, Yinfei, Zhang, Ying and Chiu, Kenneth. Hybrid Parallelism for XML SAX Parsing. IEEE International Conference on Web Services. 2008 Los Alamitos, CA, USA</p>
228</div>
229<div class="inline-citation" id="cite-IPDPS2008" style="display:none;width: 240px">
230<a class="quiet" href="javascript:hidecite('cite-IPDPS2008')" style="font-size:90%"><img src="eks.png" alt="[x]" style="float:right;clear:both;margin:1px"></a><p style="margin:0ex">Pan, Yinfei, Zhang, Ying and Chiu, Kenneth. Simultaneous transducers for data-parallel XML parsing. International Parallel and Distributed Processing Symposium. 2008 Los Alamitos, CA, USA</p>
231</div>
232<div class="inline-citation" id="cite-HackersDelight" style="display:none;width: 240px">
233<a class="quiet" href="javascript:hidecite('cite-HackersDelight')" style="font-size:90%"><img src="eks.png" alt="[x]" style="float:right;clear:both;margin:1px"></a><p style="margin:0ex">Warren, Henry S.. Hacker's Delight. 2002</p>
234</div>
235<div class="inline-citation" id="cite-lu2007advances" style="display:none;width: 240px">
236<a class="quiet" href="javascript:hidecite('cite-lu2007advances')" style="font-size:90%"><img src="eks.png" alt="[x]" style="float:right;clear:both;margin:1px"></a><p style="margin:0ex">Lu, C.T., Dos Santos, R.F., Sripada, L.N. and Kou, Y.. Advances in GML for geospatial applications. 2007</p>
237</div>
238<div class="inline-citation" id="cite-lake2004geography" style="display:none;width: 240px">
239<a class="quiet" href="javascript:hidecite('cite-lake2004geography')" style="font-size:90%"><img src="eks.png" alt="[x]" style="float:right;clear:both;margin:1px"></a><p style="margin:0ex">Lake, R., Burggraf, D.S., Trninic, M. and Rae, L.. Geography mark-up language (GML) [foundation for the geo-web]. 2004</p>
240</div>
241<div id="mast"><div class="content">
242<h2 class="article-title" id="idp70464"></h2>
243<div class="author">
244<h3 class="author">Nigel Medforth</h3>
245<div class="affiliation">
246<p class="jobtitle">Developer</p>
247<p class="orgname">International Characters Inc.</p>
248</div>
249<div class="affiliation">
250<p class="jobtitle">Graduate Student, School of Computing Science</p>
251<p class="orgname">Simon Fraser University </p>
252</div>
253<h5 class="author-email"><code class="email">&lt;<a class="email" href="mailto:nmedfort@sfu.ca">nmedfort@sfu.ca</a>&gt;</code></h5>
254</div>
255<div class="author">
256<h3 class="author">Dan Lin</h3>
257<div class="affiliation">
258<p class="jobtitle">Graduate Student, School of Computing Science</p>
259<p class="orgname">Simon Fraser University </p>
260</div>
261<h5 class="author-email"><code class="email">&lt;<a class="email" href="mailto:lindanl@sfu.ca">lindanl@sfu.ca</a>&gt;</code></h5>
262</div>
263<div class="author">
264<h3 class="author">Kenneth Herdy</h3>
265<div class="affiliation">
266<p class="jobtitle">Graduate Student, School of Computing Science</p>
267<p class="orgname">Simon Fraser University </p>
268</div>
269<h5 class="author-email"><code class="email">&lt;<a class="email" href="mailto:ksherdy@sfu.ca">ksherdy@sfu.ca</a>&gt;</code></h5>
270</div>
271<div class="author">
272<h3 class="author">Rob Cameron</h3>
273<div class="affiliation">
274<p class="jobtitle">Professor of Computing Science</p>
275<p class="orgname">Simon Fraser University</p>
276</div>
277<div class="affiliation">
278<p class="jobtitle">Chief Technology Officer</p>
279<p class="orgname">International Characters, Inc.</p>
280</div>
281<h5 class="author-email"><code class="email">&lt;<a class="email" href="mailto:cameron@cs.sfu.ca">cameron@cs.sfu.ca</a>&gt;</code></h5>
282</div>
283<div class="author">
284<h3 class="author">Arrvindh Shriraman</h3>
285<div class="affiliation">
286<p class="jobtitle"></p>
287<p class="orgname"></p>
288</div>
289<h5 class="author-email"><code class="email">&lt;<a class="email" href="mailto:"></a>&gt;</code></h5>
290</div>
291<div class="mast-box">
292<p class="title"><a href="javascript:toggle('idp71584')" class="quiet"><img class="toc-icon" src="plus.png" alt="expand" id="icon-idp71584"></a> <span onclick="javascript:toggle('idp71584');return true">Abstract</span></p>
293<div class="folder" id="folder-idp71584" style="display:none"><p id="idp71888">Prior research on the acceleration of XML processing using SIMD and multi-core
294            parallelism has lead to a number of interesting research prototypes. This work
295            investigates the extent to which the techniques underlying these prototypes could result
296            in systematic performance benefits when fully integrated into a commercial XML parser.
297            The widely used Xerces-C++ parser of the Apache Software Foundation was chosen as the
298            foundation for the study. A systematic restructuring of the parser was undertaken, while
299            maintaining the existing API for application programmers. Using SIMD techniques alone,
300            an increase in parsing speed of at least 50% was observed in a range of applications.
301            When coupled with pipeline parallelism on dual core processors, improvements of 2x and
302            beyond were realized. </p></div>
303</div>
304<div class="toc">
305<p><b>Table of Contents</b></p>
306<dl>
307<dt><span class="section"><a href="#idp280112" class="toc">Introduction</a></span></dt>
308<dt><span class="section"><a href="#background" class="toc">Background</a></span></dt>
309<dd><dl>
310<dt><span class="section"><a href="#background-xerces" class="toc">Xerces C++ Structure</a></span></dt>
311<dt><span class="section"><a href="#idp354992" class="toc">The Parabix Framework</a></span></dt>
312<dt><span class="section"><a href="#idp449616" class="toc">Sequential vs. Parallel Paradigm</a></span></dt>
313</dl></dd>
314<dt><span class="section"><a href="#architecture" class="toc">Architecture</a></span></dt>
315<dd><dl>
316<dt><span class="section"><a href="#idp457296" class="toc">Overview</a></span></dt>
317<dt><span class="section"><a href="#character-set-adapter" class="toc">Character Set Adapters</a></span></dt>
318<dt><span class="section"><a href="#par-filter" class="toc">Combined Parallel Filtering</a></span></dt>
319<dt><span class="section"><a href="#contentstream" class="toc">Content Stream</a></span></dt>
320<dt><span class="section"><a href="#namespace-handling" class="toc">Namespace Handling</a></span></dt>
321<dt><span class="section"><a href="#errorhandling" class="toc">Error Handling</a></span></dt>
322</dl></dd>
323<dt><span class="section"><a href="#multithread" class="toc">Multithreading with Pipeline Parallelism</a></span></dt>
324<dt><span class="section"><a href="#performance" class="toc">Performance</a></span></dt>
325<dd><dl>
326<dt><span class="section"><a href="#idp629568" class="toc">Xerces C++ SAXCount</a></span></dt>
327<dt><span class="section"><a href="#idp655888" class="toc">GML2SVG</a></span></dt>
328</dl></dd>
329<dt><span class="section"><a href="#conclusion" class="toc">Conclusion and Future Work</a></span></dt>
330</dl>
331</div>
332<div class="mast-box">
333<p class="title"><a href="javascript:toggle('idp73312')" class="linkbox"><img class="toc-icon" src="plus.png" alt="expand" id="icon-idp73312"></a> <span onclick="javascript:toggle('idp73312');return true">Nigel Medforth</span></p>
334<div class="folder" id="folder-idp73312" style="display:none">
335<h5 class="author-email"><code class="email">&lt;<a class="email" href="mailto:nmedfort@sfu.ca">nmedfort@sfu.ca</a>&gt;</code></h5>
336<div class="affiliation">
337<p class="jobtitle">Developer</p>
338<p class="orgname">International Characters Inc.</p>
339</div>
340<div class="affiliation">
341<p class="jobtitle">Graduate Student, School of Computing Science</p>
342<p class="orgname">Simon Fraser University </p>
343</div>
344<div class="personblurb">
345<p id="idp55040">Nigel Medforth is a M.Sc. student at Simon Fraser University and the lead
346               developer of icXML. He earned a Bachelor of Technology in Information Technology at
347               Kwantlen Polytechnic University in 2009 and was awarded the Dean’s Medal for
348               Outstanding Achievement.</p>
349<p id="idp56048">Nigel is currently researching ways to leverage both the Parabix framework and
350               stream-processing models to further accelerate XML parsing within icXML.</p>
351</div>
352</div>
353</div>
354<div class="mast-box">
355<p class="title"><a href="javascript:toggle('idp59712')" class="linkbox"><img class="toc-icon" src="plus.png" alt="expand" id="icon-idp59712"></a> <span onclick="javascript:toggle('idp59712');return true">Dan Lin</span></p>
356<div class="folder" id="folder-idp59712" style="display:none">
357<h5 class="author-email"><code class="email">&lt;<a class="email" href="mailto:lindanl@sfu.ca">lindanl@sfu.ca</a>&gt;</code></h5>
358<div class="affiliation">
359<p class="jobtitle">Graduate Student, School of Computing Science</p>
360<p class="orgname">Simon Fraser University </p>
361</div>
362<div class="personblurb"><p id="idp61424">Dan Lin is a Ph.D student at Simon Fraser University. She earned a Master of Science
363             in Computing Science at Simon Fraser University in 2010. Her research focus on on high
364             performance algorithms that exploit parallelization strategies on various multicore platforms.
365           </p></div>
366</div>
367</div>
368<div class="mast-box">
369<p class="title"><a href="javascript:toggle('idp63984')" class="linkbox"><img class="toc-icon" src="plus.png" alt="expand" id="icon-idp63984"></a> <span onclick="javascript:toggle('idp63984');return true">Kenneth Herdy</span></p>
370<div class="folder" id="folder-idp63984" style="display:none">
371<h5 class="author-email"><code class="email">&lt;<a class="email" href="mailto:ksherdy@sfu.ca">ksherdy@sfu.ca</a>&gt;</code></h5>
372<div class="affiliation">
373<p class="jobtitle">Graduate Student, School of Computing Science</p>
374<p class="orgname">Simon Fraser University </p>
375</div>
376<div class="personblurb">
377<p id="idp65712"> Ken Herdy completed an Advanced Diploma of Technology in Geographical Information
378               Systems at the British Columbia Institute of Technology in 2003 and earned a Bachelor
379               of Science in Computing Science with a Certificate in Spatial Information Systems at
380               Simon Fraser University in 2005. </p>
381<p id="idp266976"> Ken is currently pursuing PhD studies in Computing Science at Simon Fraser
382               University with industrial scholarship support from the Natural Sciences and
383               Engineering Research Council of Canada, the Mathematics of Information Technology and
384               Complex Systems NCE, and the BC Innovation Council. His research focus is an analysis
385               of the principal techniques that may be used to improve XML processing performance in
386               the context of the Geography Markup Language (GML). </p>
387</div>
388</div>
389</div>
390<div class="mast-box">
391<p class="title"><a href="javascript:toggle('idp269712')" class="linkbox"><img class="toc-icon" src="plus.png" alt="expand" id="icon-idp269712"></a> <span onclick="javascript:toggle('idp269712');return true">Rob Cameron</span></p>
392<div class="folder" id="folder-idp269712" style="display:none">
393<h5 class="author-email"><code class="email">&lt;<a class="email" href="mailto:cameron@cs.sfu.ca">cameron@cs.sfu.ca</a>&gt;</code></h5>
394<div class="affiliation">
395<p class="jobtitle">Professor of Computing Science</p>
396<p class="orgname">Simon Fraser University</p>
397</div>
398<div class="affiliation">
399<p class="jobtitle">Chief Technology Officer</p>
400<p class="orgname">International Characters, Inc.</p>
401</div>
402<div class="personblurb"><p id="idp271376">Dr. Rob Cameron is Professor of Computing Science and Associate Dean of Applied
403               Sciences at Simon Fraser University. His research interests include programming
404               language and software system technology, with a specific focus on high performance
405               text processing using SIMD and multicore parallelism. He is the developer of the REX
406               XML shallow parser as well as the parallel bit stream (Parabix) framework for SIMD
407               text processing. </p></div>
408</div>
409</div>
410</div></div>
411<div id="navbar"></div>
412<div id="balisage-header" style="background-color: #6699CC">
413<a class="quiet" href="http://www.balisage.net"><img style="float:right;border:none" alt="Balisage logo" height="130" src="http://balisage.net/Logo/BalisageSeries-logo.png"></a><h2 class="page-header">Balisage: The Markup Conference</h2>
414<h1 class="page-header">Proceedings preview</h1>
415</div>
416<div id="main">
417<div class="article">
418<h2 class="article-title" id="idp70464"></h2>
419<div class="section" id="idp280112">
420<h2 class="title" style="clear: both">Introduction</h2>
421<p id="idp280752">   
422        Parallelization and acceleration of XML parsing is a widely
423        studied problem that has seen the development of a number
424        of interesting research prototypes using both SIMD and
425        multicore parallelism.   Most works have investigated
426        data parallel solutions on multicore
427        architectures using various strategies to break input
428        documents into segments that can be allocated to different cores.
429        For example, one possibility for data
430        parallelization is to add a pre-parsing step to compute
431        a skeleton tree structure of an  XML document <a class="xref" id="idp281568" href="javascript:showcite('cite-GRID2006','idp281568')">Lu and Chiu 2006</a>.
432        The parallelization of the pre-parsing stage itself can be tackled with
433          state machines <a class="xref" id="idp294480" href="javascript:showcite('cite-E-SCIENCE2007','idp294480')">Pan and Zhang 2007</a>, <a class="xref" id="idp295232" href="javascript:showcite('cite-IPDPS2008','idp295232')">Pan and Zhang 2008</a>.
434        Methods without pre-parsing have used speculation <a class="xref" id="idp296048" href="javascript:showcite('cite-HPCC2011','idp296048')">You and Wang 2011</a> or post-processing that
435        combines the partial results <a class="xref" id="idp296880" href="javascript:showcite('cite-ParaDOM2009','idp296880')">Shah and Rao 2009</a>.
436        A hybrid technique that combines data and pipeline parallelism was proposed to
437        hide the latency of a "job" that has to be done sequentially <a class="xref" id="idp297744" href="javascript:showcite('cite-ICWS2008','idp297744')">Pan and Zhang 2008</a>.
438      </p>
439<p id="idp298624">
440        Fewer efforts have investigated SIMD parallelism, although this approach
441        has the potential advantage of improving single core performance as well
442        as offering savings in energy consumption <a class="xref" id="idp299088" href="javascript:showcite('cite-HPCA2012','idp299088')">Lin and Medforth 2012</a>.
443        Intel introduced specialized SIMD string processing instructions in the SSE 4.2 instruction set extension
444        and showed how they can be used to improve the performance of XML parsing <a class="xref" id="idp300032" href="javascript:showcite('cite-XMLSSE42','idp300032')">Lei 2008</a>.
445        The Parabix framework uses generic SIMD extensions and bit parallel methods to
446        process hundreds of XML input characters simultaneously <a class="xref" id="idp300944" href="javascript:showcite('cite-Cameron2009','idp300944')">Cameron and Herdy 2009</a> <a class="xref" id="idp301696" href="javascript:showcite('cite-cameron-EuroPar2011','idp301696')">Cameron and Amiri 2011</a>.
447        Parabix prototypes have also combined SIMD methods with thread-level parallelism to
448        achieve further acceleration on multicore systems <a class="xref" id="idp302608" href="javascript:showcite('cite-HPCA2012','idp302608')">Lin and Medforth 2012</a>.
449      </p>
450<p id="idp303376">
451        In this paper, we move beyond research prototypes to consider
452        the detailed integration of both SIMD and multicore parallelism into the
453        Xerces-C++ parser of the Apache Software Foundation, an existing
454        standards-compliant open-source parser that is widely used
455        in commercial practice.    The challenge of this work is
456        to parallelize the Xerces parser in such a way as to
457        preserve the existing APIs as well as offering worthwhile
458        end-to-end acceleration of XML processing.   
459        To achieve the best results possible, we undertook
460        a nine-month comprehensive restructuring of the Xerces-C++ parser,
461        seeking to expose as many critical aspects of XML parsing
462        as possible for parallelization, the result of which we named icXML.   
463        Overall, we employed Parabix-style methods of transcoding, tokenization
464        and tag parsing, parallel string comparison methods in symbol
465        resolution, bit parallel methods in namespace processing,
466        as well as staged processing using pipeline parallelism to take advantage of
467        multiple cores.
468      </p>
469<p id="idp304816">
470        The remainder of this paper is organized as follows.   
471          <a class="xref" href="#background" title="Background">section “Background”</a> discusses the structure of the Xerces and Parabix XML parsers and the fundamental
472        differences between the two parsing models.   
473        <a class="xref" href="#architecture" title="Architecture">section “Architecture”</a> then presents the icXML design based on a restructured Xerces architecture to
474        incorporate SIMD parallelism using Parabix methods.   
475        <a class="xref" href="#multithread" title="Multithreading with Pipeline Parallelism">section “Multithreading with Pipeline Parallelism”</a> moves on to consider the multithreading of the icXML architecture
476        using the pipeline parallelism model. 
477        <a class="xref" href="#performance" title="Performance">section “Performance”</a> analyzes the performance of both the single-threaded and
478        multi-threaded versions of icXML in comparison to original Xerces,
479        demonstrating substantial end-to-end acceleration of
480        a GML-to-SVG translation application written against the Xerces API.
481          <a class="xref" href="#conclusion" title="Conclusion and Future Work">section “Conclusion and Future Work”</a> concludes the paper with a discussion of future work and the potential for
482        applying the techniques discussed herein in other application domains.
483      </p>
484</div>
485<div class="section" id="background">
486<h2 class="title" style="clear: both">Background</h2>
487<div class="section" id="background-xerces">
488<h3 class="title" style="clear: both">Xerces C++ Structure</h3>
489<p id="idp312144"> The Xerces C++ parser is a widely-used standards-conformant
490            XML parser produced as open-source software
491             by the Apache Software Foundation.
492            It features comprehensive support for a variety of character encodings both
493            commonplace (e.g., UTF-8, UTF-16) and rarely used (e.g., EBCDIC), support for multiple
494            XML vocabularies through the XML namespace mechanism, as well as complete
495            implementations of structure and data validation through multiple grammars declared
496            using either legacy DTDs (document type definitions) or modern XML Schema facilities.
497            Xerces also supports several APIs for accessing parser services, including event-based
498            parsing using either pull parsing or SAX/SAX2 push-style parsing as well as a DOM
499            tree-based parsing interface. </p>
500<p id="idp313408">
501            Xerces,
502            like all traditional parsers, processes XML documents sequentially a byte-at-a-time from
503            the first to the last byte of input data. Each byte passes through several processing
504            layers and is classified and eventually validated within the context of the document
505            state. This introduces implicit dependencies between the various tasks within the
506            application that make it difficult to optimize for performance. As a complex software
507              system, no one feature dominates the overall parsing performance. <a class="xref" href="#xerces-profile">Table I</a>
508            shows the execution time profile of the top ten functions in a
509            typical run. Even if it were possible, Amdahl's Law dictates that tackling any one of
510            these functions for parallelization in isolation would only produce a minute improvement
511            in performance. Unfortunately, early investigation into these functions found that
512            incorporating speculation-free thread-level parallelization was impossible and they were
513            already performing well in their given tasks; thus only trivial enhancements were
514            attainable. In order to obtain a systematic acceleration of Xerces, it should be
515            expected that a comprehensive restructuring is required, involving all aspects of the
516            parser. </p>
517<div class="table-wrapper" id="xerces-profile">
518<p class="title">Table I</p>
519<div class="caption"><p id="idm821408">Execution Time of Top 10 Xerces Functions</p></div>
520<table class="table" xml:id="xerces-profile">
521<colgroup span="1">
522<col align="left" valign="top" span="1">
523<col align="left" valign="top" span="1">
524</colgroup>
525<thead><tr>
526<th>Time (%) </th>
527<th> Function Name </th>
528</tr></thead>
529<tbody>
530<tr valign="top">
531<td>13.29       </td>
532<td>XMLUTF8Transcoder::transcodeFrom </td>
533</tr>
534<tr valign="top">
535<td>7.45        </td>
536<td>IGXMLScanner::scanCharData </td>
537</tr>
538<tr valign="top">
539<td>6.83        </td>
540<td>memcpy </td>
541</tr>
542<tr valign="top">
543<td>5.83        </td>
544<td>XMLReader::getNCName </td>
545</tr>
546<tr valign="top">
547<td>4.67        </td>
548<td>IGXMLScanner::buildAttList </td>
549</tr>
550<tr valign="top">
551<td>4.54        </td>
552<td>RefHashTableO&lt;&gt;::findBucketElem </td>
553</tr>
554<tr valign="top">
555<td>4.20        </td>
556<td>IGXMLScanner::scanStartTagNS </td>
557</tr>
558<tr valign="top">
559<td>3.75        </td>
560<td>ElemStack::mapPrefixToURI </td>
561</tr>
562<tr valign="top">
563<td>3.58        </td>
564<td>ReaderMgr::getNextChar </td>
565</tr>
566<tr valign="top">
567<td>3.20        </td>
568<td>IGXMLScanner::basicAttrValueScan </td>
569</tr>
570</tbody>
571</table>
572</div>
573</div>
574<div class="section" id="idp354992">
575<h3 class="title" style="clear: both">The Parabix Framework</h3>
576<p id="idp355664"> The Parabix (parallel bit stream) framework is a transformative approach to XML
577            parsing (and other forms of text processing.) The key idea is to exploit the
578            availability of wide SIMD registers (e.g., 128-bit) in commodity processors to represent
579            data from long blocks of input data by using one register bit per single input byte. To
580            facilitate this, the input data is first transposed into a set of basis bit streams.
581              For example, <a class="xref" href="#xml-bytes">Table II</a> shows  the ASCII bytes for the string "<code class="code">b7&lt;A</code>" with
582                the corresponding  8 basis bit streams, b<sub>0</sub> through  b<sub>7</sub> shown in  <a class="xref" href="#xml-bits">Table III</a>.
583            The bits used to construct b<sub>7</sub> have been highlighted in this example.
584              Boolean-logic operations (∧, \√ and ¬ denote the
585              boolean AND, OR and NOT operators) are used to classify the input bits into a set of
586               <span class="ital">character-class bit streams</span>, which identify key
587            characters (or groups of characters) with a <code class="code">1</code>. For example, one of the
588            fundamental characters in XML is a left-angle bracket. A character is an
589               <code class="code">'&lt;' if and only if
590               Â¬(b<sub>0</sub> âˆš b<sub>1</sub>)
591               âˆ§ (b<sub>2</sub> âˆ§ b<sub>3</sub>)
592               âˆ§ (b<sub>4</sub> âˆ§ b<sub>5</sub>)
593               âˆ§ ¬ (b<sub>6</sub> âˆš
594               b<sub>7</sub>) = 1</code>. Similarly, a character is numeric, <code class="code">[0-9]
595               if and only if ¬(b<sub>0</sub> âˆš
596               b<sub>1</sub>) ∧ (b<sub>2</sub> âˆ§
597                  b<sub>3</sub>) ∧ ¬(b<sub>4</sub>
598               âˆ§ (b<sub>5</sub> âˆš
599            b<sub>6</sub>))</code>. An important observation here is that ranges of
600            characters may require fewer operations than individual characters and
601             multiple
602            classes can share the classification cost. </p>
603<div class="table-wrapper" id="xml-bytes">
604<p class="title">Table II</p>
605<div class="caption"><p id="idp370304">XML Source Data</p></div>
606<table class="table" xml:id="xml-bytes">
607<colgroup span="1">
608<col align="right" valign="top" span="1">
609<col align="centre" valign="top" span="1">
610<col align="centre" valign="top" span="1">
611<col align="centre" valign="top" span="1">
612<col align="centre" valign="top" span="1">
613</colgroup>
614<tbody>
615<tr>
616<td>String </td>
617<td> <code class="code">b</code> </td>
618<td> <code class="code">7</code> </td>
619<td> <code class="code">&lt;</code> </td>
620<td> <code class="code">A</code> </td>
621</tr>
622<tr>
623<td>ASCII </td>
624<td> <code class="code">0110001<span class="bold">0</span></code> </td>
625<td> <code class="code">0011011<span class="bold">1</span></code> </td>
626<td> <code class="code">0011110<span class="bold">0</span></code> </td>
627<td> <code class="code">0100000<span class="bold">1</span></code> </td>
628</tr>
629</tbody>
630</table>
631</div>
632<div class="table-wrapper" id="xml-bits">
633<p class="title">Table III</p>
634<div class="caption"><p id="idp386512">8-bit ASCII Basis Bit Streams</p></div>
635<table class="table" xml:id="xml-bits">
636<colgroup span="1">
637<col align="centre" valign="top" span="1">
638<col align="centre" valign="top" span="1">
639<col align="centre" valign="top" span="1">
640<col align="centre" valign="top" span="1">
641<col align="centre" valign="top" span="1">
642<col align="centre" valign="top" span="1">
643<col align="centre" valign="top" span="1">
644<col align="centre" valign="top" span="1">
645</colgroup>
646<tbody>
647<tr>
648<td> b<sub>0</sub> </td>
649<td> b<sub>1</sub> </td>
650<td> b<sub>2</sub> </td>
651<td> b<sub>3</sub>
652</td>
653<td> b<sub>4</sub> </td>
654<td> b<sub>5</sub> </td>
655<td> b<sub>6</sub> </td>
656<td> b<sub>7</sub> </td>
657</tr>
658<tr>
659<td> <code class="code">0</code> </td>
660<td> <code class="code">1</code> </td>
661<td> <code class="code">1</code> </td>
662<td> <code class="code">0</code> </td>
663<td> <code class="code">0</code> </td>
664<td> <code class="code">0</code> </td>
665<td> <code class="code">1</code> </td>
666<td> <span class="bold"><code class="code">0</code></span> </td>
667</tr>
668<tr>
669<td> <code class="code">0</code> </td>
670<td> <code class="code">0</code> </td>
671<td> <code class="code">1</code> </td>
672<td> <code class="code">1</code> </td>
673<td> <code class="code">0</code> </td>
674<td> <code class="code">1</code> </td>
675<td> <code class="code">1</code> </td>
676<td> <span class="bold"><code class="code">1</code></span> </td>
677</tr>
678<tr>
679<td> <code class="code">0</code> </td>
680<td> <code class="code">0</code> </td>
681<td> <code class="code">1</code> </td>
682<td> <code class="code">1</code> </td>
683<td> <code class="code">1</code> </td>
684<td> <code class="code">1</code> </td>
685<td> <code class="code">0</code> </td>
686<td> <span class="bold"><code class="code">0</code></span> </td>
687</tr>
688<tr>
689<td> <code class="code">0</code> </td>
690<td> <code class="code">1</code> </td>
691<td> <code class="code">0</code> </td>
692<td> <code class="code">0</code> </td>
693<td> <code class="code">0</code> </td>
694<td> <code class="code">0</code> </td>
695<td> <code class="code">0</code> </td>
696<td> <span class="bold"><code class="code">1</code></span> </td>
697</tr>
698</tbody>
699</table>
700</div>
701<p id="idp426096"> Consider, for example, the XML source data stream shown in the first line of <a class="xref" href="#derived">Table IV</a>.
702The remaining lines of this figure show
703            several parallel bit streams that are computed in Parabix-style parsing, with each bit
704            of each stream in one-to-one correspondence to the source character code units of the
705            input stream. For clarity, 1 bits are denoted with 1 in each stream and 0 bits are
706            represented as underscores. The first bit stream shown is that for the opening angle
707            brackets that represent tag openers in XML. The second and third streams show a
708            partition of the tag openers into start tag marks and end tag marks depending on the
709            character immediately following the opener (i.e., "<code class="code">/</code>") or
710            not. The remaining three lines show streams that can be computed in subsequent parsing
711            (using the technique of bitstream addition <a class="xref" id="idp429040" href="javascript:showcite('cite-cameron-EuroPar2011','idp429040')">Cameron and Amiri 2011</a>), namely streams
712            marking the element names, attribute names and attribute values of tags. </p>
713<div class="table-wrapper" id="derived">
714<p class="title">Table IV</p>
715<div class="caption"><p id="idp430592">XML Source Data and Derived Parallel Bit Streams</p></div>
716<table class="table" xml:id="derived">
717<colgroup span="1">
718<col align="centre" valign="top" span="1">
719<col align="left" valign="top" span="1">
720</colgroup>
721<tbody>
722<tr>
723<td> Source Data </td>
724<td> <code class="code"> &lt;document&gt;fee&lt;element a1='fie' a2 = 'foe'&gt;&lt;/element&gt;fum&lt;/document&gt; </code>
725</td>
726</tr>
727<tr>
728<td> Tag Openers </td>
729<td> <code class="code">1____________1____________________________1____________1__________</code>
730</td>
731</tr>
732<tr>
733<td> Start Tag Marks </td>
734<td> <code class="code">_1____________1___________________________________________________</code>
735</td>
736</tr>
737<tr>
738<td> End Tag Marks </td>
739<td> <code class="code">___________________________________________1____________1_________</code>
740</td>
741</tr>
742<tr>
743<td> Empty Tag Marks </td>
744<td> <code class="code">__________________________________________________________________</code>
745</td>
746</tr>
747<tr>
748<td> Element Names </td>
749<td> <code class="code">_11111111_____1111111_____________________________________________</code>
750</td>
751</tr>
752<tr>
753<td> Attribute Names </td>
754<td> <code class="code">______________________11_______11_________________________________</code>
755</td>
756</tr>
757<tr>
758<td> Attribute Values </td>
759<td> <code class="code">__________________________111________111__________________________</code>
760</td>
761</tr>
762</tbody>
763</table>
764</div>
765<p id="idp443616"> Two intuitions may help explain how the Parabix approach can lead to improved XML
766            parsing performance. The first is that the use of the full register width offers a
767            considerable information advantage over sequential byte-at-a-time parsing. That is,
768            sequential processing of bytes uses just 8 bits of each register, greatly limiting the
769            processor resources that are effectively being used at any one time. The second is that
770            byte-at-a-time loop scanning loops are actually often just computing a single bit of
771            information per iteration: is the scan complete yet? Rather than computing these
772            individual decision-bits, an approach that computes many of them in parallel (e.g., 128
773            bytes at a time using 128-bit registers) should provide substantial benefit. </p>
774<p id="idp444864"> Previous studies have shown that the Parabix approach improves many aspects of XML
775            processing, including transcoding <a class="xref" id="idp445264" href="javascript:showcite('cite-Cameron2008','idp445264')">Cameron 2008</a>, character classification and
776            validation, tag parsing and well-formedness checking. The first Parabix parser used
777            processor bit scan instructions to considerably accelerate sequential scanning loops for
778            individual characters <a class="xref" id="idp446176" href="javascript:showcite('cite-CameronHerdyLin2008','idp446176')">Cameron and Herdy 2008</a>. Recent work has incorporated a method
779            of parallel scanning using bitstream addition <a class="xref" id="idp447040" href="javascript:showcite('cite-cameron-EuroPar2011','idp447040')">Cameron and Amiri 2011</a>, as well as
780            combining SIMD methods with 4-stage pipeline parallelism to further improve throughput
781            <a class="xref" id="idp447824" href="javascript:showcite('cite-HPCA2012','idp447824')">Lin and Medforth 2012</a>. Although these research prototypes handled the full syntax of
782            schema-less XML documents, they lacked the functionality required by full XML parsers. </p>
783<p id="idp448768"> Commercial XML processors support transcoding of multiple character sets and can
784            parse and validate against multiple document vocabularies. Additionally, they provide
785            API facilities beyond those found in research prototypes, including the widely used SAX,
786            SAX2 and DOM interfaces. </p>
787</div>
788<div class="section" id="idp449616">
789<h3 class="title" style="clear: both">Sequential vs. Parallel Paradigm</h3>
790<p id="idp450304"> Xerces—like all traditional XML parsers—processes XML documents
791            sequentially. Each character is examined to distinguish between the XML-specific markup,
792            such as a left angle bracket <code class="code">&lt;</code>, and the content held within the
793            document. As the parser progresses through the document, it alternates between markup
794            scanning, validation and content processing modes. </p>
795<p id="idp451840"> In other words, Xerces belongs to an equivalence class of applications termed FSM
796           applications<sup class="fn-label"><a href="#FSM" class="footnoteref">[1]</a></sup>.<sup class="fn-label"><a href="#FSM" class="footnoteref" id="FSM-ref">[1]</a></sup> Each state transition indicates the processing context of
797            subsequent characters. Unfortunately, textual data tends to be unpredictable and any
798            character could induce a state transition. </p>
799<p id="idp454368"> Parabix-style XML parsers utilize a concept of layered processing. A block of source
800            text is transformed into a set of lexical bitstreams, which undergo a series of
801            operations that can be grouped into logical layers, e.g., transposition, character
802            classification, and lexical analysis. Each layer is pipeline parallel and require
803            neither speculation nor pre-parsing stages<a class="xref" id="idp455056" href="javascript:showcite('cite-HPCA2012','idp455056')">Lin and Medforth 2012</a>. To meet the API requirements
804            of the document-ordered Xerces output, the results of the Parabix processing layers must
805            be interleaved to produce the equivalent behaviour. </p>
806</div>
807</div>
808<div class="section" id="architecture">
809<h2 class="title" style="clear: both">Architecture</h2>
810<div class="section" id="idp457296">
811<h3 class="title" style="clear: both">Overview</h3>
812<p id="idp458352"> icXML is more than an optimized version of Xerces. Many components were grouped,
813            restructured and rearchitected with pipeline parallelism in mind. In this section, we
814            highlight the core differences between the two systems. As shown in Figure
815              <a class="xref" href="#xerces-arch" title="Xerces Architecture">Figure 1</a>, Xerces is comprised of five main modules: the transcoder, reader,
816            scanner, namespace binder, and validator. The <span class="ital">Transcoder</span> converts source data into UTF-16 before Xerces parses it as XML;
817            the majority of the character set encoding validation is performed as a byproduct of
818            this process. The <span class="ital">Reader</span> is responsible for the
819            streaming and buffering of all raw and transcoded (UTF-16) text. It tracks the current
820            line/column position,
821           
822            performs line-break normalization and validates context-specific character set issues,
823            such as tokenization of qualified-names. The <span class="ital">Scanner</span>
824            pulls data through the reader and constructs the intermediate representation (IR) of the
825            document; it deals with all issues related to entity expansion, validates the XML
826            well-formedness constraints and any character set encoding issues that cannot be
827            completely handled by the reader or transcoder (e.g., surrogate characters, validation
828            and normalization of character references, etc.) The <span class="ital">Namespace
829               Binder</span> is a core piece of the element stack. It handles namespace scoping
830            issues between different XML vocabularies. This allows the scanner to properly select
831            the correct schema grammar structures. The <span class="ital">Validator</span>
832            takes the IR produced by the Scanner (and potentially annotated by the Namespace Binder)
833            and assesses whether the final output matches the user-defined DTD and schema grammar(s)
834            before passing it to the end-user. </p>
835<div class="figure" id="xerces-arch">
836<p class="title">Figure 1: Xerces Architecture</p>
837<div class="figure-contents">
838<div class="mediaobject" id="idp466320"><img alt="png image (xerces.png)" src="xerces.png" width="150cm"></div>
839<div class="caption"></div>
840</div>
841</div>
842<p id="idp468640"> In icXML functions are grouped into logical components. As shown in
843             <a class="xref" href="#xerces-arch" title="Xerces Architecture">Figure 1</a>, two major categories exist: (1) the Parabix Subsystem and (2) the
844               Markup Processor. All tasks in (1) use the Parabix Framework <a class="xref" id="idp469728" href="javascript:showcite('cite-HPCA2012','idp469728')">Lin and Medforth 2012</a>, which
845            represents data as a set of parallel bitstreams. The <span class="ital">Character Set
846              Adapter</span>, discussed in <a class="xref" href="#character-set-adapter" title="Character Set Adapters">section “Character Set Adapters”</a>, mirrors
847            Xerces's Transcoder duties; however instead of producing UTF-16 it produces a set of
848              lexical bitstreams, similar to those shown in . These lexical
849            bitstreams are later transformed into UTF-16 in the Content Stream Generator, after
850            additional processing is performed. The first precursor to producing UTF-16 is the
851               <span class="ital">Parallel Markup Parser</span> phase. It takes the lexical
852            streams and produces a set of marker bitstreams in which a 1-bit identifies significant
853            positions within the input data. One bitstream for each of the critical piece of
854            information is created, such as the beginning and ending of start tags, end tags,
855            element names, attribute names, attribute values and content. Intra-element
856            well-formedness validation is performed as an artifact of this process. Like Xerces,
857            icXML must provide the Line and Column position of each error. The <span class="ital">Line-Column Tracker</span> uses the lexical information to keep track of the
858            document position(s) through the use of an optimized population count algorithm,
859              described in <a class="xref" href="#errorhandling" title="Error Handling">section “Error Handling”</a>. From here, two data-independent
860            branches exist: the Symbol Resolver and Content Preparation Unit. </p>
861<p id="idp476192"> A typical XML file contains few unique element and attribute names—but
862            each of them will occur frequently. icXML stores these as distinct data structures,
863            called symbols, each with their own global identifier (GID). Using the symbol marker
864            streams produced by the Parallel Markup Parser, the <span class="ital">Symbol
865               Resolver</span> scans through the raw data to produce a sequence of GIDs, called
866            the <span class="ital">symbol stream</span>. </p>
867<p id="idp478848"> The final components of the Parabix Subsystem are the <span class="ital">Content
868               Preparation Unit</span> and <span class="ital">Content Stream
869            Generator</span>. The former takes the (transposed) basis bitstreams and selectively
870            filters them, according to the information provided by the Parallel Markup Parser, and
871            the latter transforms the filtered streams into the tagged UTF-16 <span class="ital">content stream</span>, discussed in <a class="xref" href="#contentstream" title="Content Stream">section “Content Stream”</a>. </p>
872<p id="idp482448"> Combined, the symbol and content stream form icXML's compressed IR of the XML
873            document. The <span class="ital">Markup Processor</span>~parses the IR to
874            validate and produce the sequential output for the end user. The <span class="ital">Final WF checker</span> performs inter-element well-formedness validation that
875            would be too costly to perform in bit space, such as ensuring every start tag has a
876            matching end tag. Xerces's namespace binding functionality is replaced by the <span class="ital">Namespace Processor</span>. Unlike Xerces, it is a discrete phase
877            that produces a series of URI identifiers (URI IDs), the <span class="ital">URI
878               stream</span>, which are associated with each symbol occurrence. This is
879                 discussed in <a class="xref" href="#namespace-handling" title="Namespace Handling">section “Namespace Handling”</a>. Finally, the <span class="ital">Validation</span> layer implements the Xerces's validator. However,
880            preprocessing associated with each symbol greatly reduces the work of this stage. </p>
881<div class="figure" id="icxml-arch">
882<p class="title">Figure 2: icXML Architecture</p>
883<div class="figure-contents">
884<div class="mediaobject" id="idp488912"><img alt="png image (icxml.png)" src="icxml.png" width="500cm"></div>
885<div class="caption"></div>
886</div>
887</div>
888</div>
889<div class="section" id="character-set-adapter">
890<h3 class="title" style="clear: both">Character Set Adapters</h3>
891<p id="idp492400"> In Xerces, all input is transcoded into UTF-16 to simplify the parsing costs of
892            Xerces itself and provide the end-consumer with a single encoding format. In the
893            important case of UTF-8 to UTF-16 transcoding, the transcoding costs can be significant,
894            because of the need to decode and classify each byte of input, mapping variable-length
895            UTF-8 byte sequences into 16-bit UTF-16 code units with bit manipulation operations. In
896            other cases, transcoding may involve table look-up operations for each byte of input. In
897            any case, transcoding imposes at least a cost of buffer copying. </p>
898<p id="idp493456"> In icXML, however, the concept of Character Set Adapters (CSAs) is used to minimize
899            transcoding costs. Given a specified input encoding, a CSA is responsible for checking
900            that input code units represent valid characters, mapping the characters of the encoding
901            into the appropriate bitstreams for XML parsing actions (i.e., producing the lexical
902            item streams), as well as supporting ultimate transcoding requirements. All of this work
903            is performed using the parallel bitstream representation of the source input. </p>
904<p id="idp494432"> An important observation is that many character sets are an extension to the legacy
905            7-bit ASCII character set. This includes the various ISO Latin character sets, UTF-8,
906            UTF-16 and many others. Furthermore, all significant characters for parsing XML are
907            confined to the ASCII repertoire. Thus, a single common set of lexical item calculations
908            serves to compute lexical item streams for all such ASCII-based character sets. </p>
909<p id="idp33888"> A second observation is that—regardless of which character set is
910            used—quite often all of the characters in a particular block of input will be
911            within the ASCII range. This is a very simple test to perform using the bitstream
912            representation, simply confirming that the bit 0 stream is zero for the entire block.
913            For blocks satisfying this test, all logic dealing with non-ASCII characters can simply
914            be skipped. Transcoding to UTF-16 becomes trivial as the high eight bitstreams of the
915            UTF-16 form are each set to zero in this case. </p>
916<p id="idp35808"> A third observation is that repeated transcoding of the names of XML elements,
917            attributes and so on can be avoided by using a look-up mechanism. That is, the first
918            occurrence of each symbol is stored in a look-up table mapping the input encoding to a
919            numeric symbol ID. Transcoding of the symbol is applied at this time. Subsequent look-up
920            operations can avoid transcoding by simply retrieving the stored representation. As
921            symbol look up is required to apply various XML validation rules, there is achieves the
922            effect of transcoding each occurrence without additional cost. </p>
923<p id="idp36864"> The cost of individual character transcoding is avoided whenever a block of input is
924            confined to the ASCII subset and for all but the first occurrence of any XML element or
925            attribute name. Furthermore, when transcoding is required, the parallel bitstream
926            representation supports efficient transcoding operations. In the important case of UTF-8
927            to UTF-16 transcoding, the corresponding UTF-16 bitstreams can be calculated in bit
928              parallel fashion based on UTF-8 streams <a class="xref" id="idp37664" href="javascript:showcite('cite-Cameron2008','idp37664')">Cameron 2008</a>, and all but the final bytes
929            of multi-byte sequences can be marked for deletion as discussed in the following
930            subsection. In other cases, transcoding within a block only need be applied for
931            non-ASCII bytes, which are conveniently identified by iterating through the bit 0 stream
932            using bit scan operations. </p>
933</div>
934<div class="section" id="par-filter">
935<h3 class="title" style="clear: both">Combined Parallel Filtering</h3>
936<p id="idp40016"> As just mentioned, UTF-8 to UTF-16 transcoding involves marking all but the last
937            bytes of multi-byte UTF-8 sequences as positions for deletion. For example, the two
938            Chinese characters <code class="code">䜠奜</code> are represented as two
939            three-byte UTF-8 sequences <code class="code">E4 BD A0</code> and <code class="code">E5 A5 BD</code> while the
940            UTF-16 representation must be compressed down to the two code units <code class="code">4F60</code>
941            and <code class="code">597D</code>. In the bit parallel representation, this corresponds to a
942            reduction from six bit positions representing UTF-8 code units (bytes) down to just two
943            bit positions representing UTF-16 code units (double bytes). This compression may be
944            achieved by arranging to calculate the correct UTF-16 bits at the final position of each
945            sequence and creating a deletion mask to mark the first two bytes of each 3-byte
946            sequence for deletion. In this case, the portion of the mask corresponding to these
947            input bytes is the bit sequence <code class="code">110110</code>. Using this approach, transcoding
948            may then be completed by applying parallel deletion and inverse transposition of the
949            UTF-16 bitstreams<a class="xref" id="idp513616" href="javascript:showcite('cite-Cameron2008','idp513616')">Cameron 2008</a>. </p>
950<p id="idp514416"> Rather than immediately paying the costs of deletion and transposition just for
951            transcoding, however, icXML defers these steps so that the deletion masks for several
952            stages of processing may be combined. In particular, this includes core XML requirements
953            to normalize line breaks and to replace character reference and entity references by
954            their corresponding text. In the case of line break normalization, all forms of line
955            breaks, including bare carriage returns (CR), line feeds (LF) and CR-LF combinations
956            must be normalized to a single LF character in each case. In icXML, this is achieved by
957            first marking CR positions, performing two bit parallel operations to transform the
958            marked CRs into LFs, and then marking for deletion any LF that is found immediately
959            after the marked CR as shown by the Pablo source code in
960              <a class="xref" href="#fig-LBnormalization">Figure 3</a>.
961              <div class="figure" id="fig-LBnormalization">
962<p class="title">Figure 3</p>
963<div class="figure-contents">
964<div class="caption">Line Break Normalization Logic</div>
965<pre class="programlisting" id="idp518368">
966# XML 1.0 line-break normalization rules.
967if lex.CR:
968# Modify CR (#x0D) to LF (#x0A)
969  u16lo.bit_5 ^= lex.CR
970  u16lo.bit_6 ^= lex.CR
971  u16lo.bit_7 ^= lex.CR
972  CRLF = pablo.Advance(lex.CR) &amp; lex.LF
973  callouts.delmask |= CRLF
974# Adjust LF streams for line/column tracker
975  lex.LF |= lex.CR
976  lex.LF ^= CRLF
977</pre>
978</div>
979</div>
980         </p>
981<p id="idp519712"> In essence, the deletion masks for transcoding and for line break normalization each
982            represent a bitwise filter; these filters can be combined using bitwise-or so that the
983            parallel deletion algorithm need only be applied once. </p>
984<p id="idp520368"> A further application of combined filtering is the processing of XML character and
985            entity references. Consider, for example, the references <code class="code">&amp;</code> or
986               <code class="code">&lt;</code>. which must be replaced in XML processing with the single
987               <code class="code">&amp;</code> and <code class="code">&lt;</code> characters, respectively. The
988            approach in icXML is to mark all but the first character positions of each reference for
989            deletion, leaving a single character position unmodified. Thus, for the references
990               <code class="code">&amp;</code> or <code class="code">&lt;</code> the masks <code class="code">01111</code> and
991               <code class="code">011111</code> are formed and combined into the overall deletion mask. After the
992            deletion and inverse transposition operations are finally applied, a post-processing
993            step inserts the proper character at these positions. One note about this process is
994            that it is speculative; references are assumed to generally be replaced by a single
995            UTF-16 code unit. In the case, that this is not true, it is addressed in
996            post-processing. </p>
997<p id="idp525184"> The final step of combined filtering occurs during the process of reducing markup
998            data to tag bytes preceding each significant XML transition as described in
999              <a class="xref" href="#contentstream" title="Content Stream">section “Content Stream”</a>. Overall, icXML avoids separate buffer copying
1000            operations for each of the these filtering steps, paying the cost of parallel deletion
1001            and inverse transposition only once. Currently, icXML employs the parallel-prefix
1002            compress algorithm of Steele~<a class="xref" id="idp526608" href="javascript:showcite('cite-HackersDelight','idp526608')">Warren 2002</a> Performance is independent of the
1003            number of positions deleted. Future versions of icXML are expected to take advantage of
1004            the parallel extract operation~<a class="xref" id="idp527552" href="javascript:showcite('cite-HilewitzLee2006','idp527552')">Hilewitz and Lee 2006</a> that Intel is now providing in its
1005            Haswell architecture. </p>
1006</div>
1007<div class="section" id="contentstream">
1008<h3 class="title" style="clear: both">Content Stream</h3>
1009<p id="idp529664"> A relatively-unique concept for icXML is the use of a filtered content stream.
1010            Rather that parsing an XML document in its original format, the input is transformed
1011            into one that is easier for the parser to iterate through and produce the sequential
1012            output. In , the source data
1013           
1014            is transformed into
1015           
1016            through the parallel filtering algorithm, described in <a class="xref" href="#par-filter" title="Combined Parallel Filtering">section “Combined Parallel Filtering”</a>. </p>
1017<p id="idp532848"> Combined with the symbol stream, the parser traverses the content stream to
1018            effectively reconstructs the input document in its output form. The initial <span class="ital">0</span> indicates an empty content string. The following
1019               <code class="code">&gt;</code> indicates that a start tag without any attributes is the first
1020            element in this text and the first unused symbol, <code class="code">document</code>, is the element
1021            name. Succeeding that is the content string <code class="code">fee</code>, which is null-terminated
1022            in accordance with the Xerces API specification. Unlike Xerces, no memory-copy
1023            operations are required to produce these strings, which as
1024              <a class="xref" href="#xerces-profile">Table I</a> shows accounts for 6.83% of Xerces's execution time.
1025            Additionally, it is cheap to locate the terminal character of each string: using the
1026            String End bitstream, the Parabix Subsystem can effectively calculate the offset of each
1027            null character in the content stream in parallel, which in turn means the parser can
1028            directly jump to the end of every string without scanning for it. </p>
1029<p id="idp536896"> Following <code class="code">'fee'</code> is a <code class="code">=</code>, which marks the
1030            existence of an attribute. Because all of the intra-element was performed in the Parabix
1031            Subsystem, this must be a legal attribute. Since attributes can only occur within start
1032            tags and must be accompanied by a textual value, the next symbol in the symbol stream
1033            must be the element name of a start tag, and the following one must be the name of the
1034            attribute and the string that follows the <code class="code">=</code> must be its value. However, the
1035            subsequent <code class="code">=</code> is not treated as an independent attribute because the parser
1036            has yet to read a <code class="code">&gt;</code>, which marks the end of a start tag. Thus only
1037            one symbol is taken from the symbol stream and it (along with the string value) is added
1038            to the element. Eventually the parser reaches a <code class="code">/</code>, which marks the
1039            existence of an end tag. Every end tag requires an element name, which means they
1040            require a symbol. Inter-element validation whenever an empty tag is detected to ensure
1041            that the appropriate scope-nesting rules have been applied. </p>
1042</div>
1043<div class="section" id="namespace-handling">
1044<h3 class="title" style="clear: both">Namespace Handling</h3>
1045<p id="idp542464"> In XML, namespaces prevents naming conflicts when multiple vocabularies are used
1046            together. It is especially important when a vocabulary application-dependant meaning,
1047            such as when XML or SVG documents are embedded within XHTML files. Namespaces are bound
1048            to uniform resource identifiers (URIs), which are strings used to identify specific
1049            names or resources. On line 1 in <a class="xref" href="#namespace-ex">Table V</a>, the <code class="code">xmlns</code>
1050            attribute instructs the XML processor to bind the prefix <code class="code">p</code> to the URI
1051               '<code class="code">pub.net</code>' and the default (empty) prefix to
1052               <code class="code">book.org</code>. Thus to the XML processor, the <code class="code">title</code> on line 2
1053            and <code class="code">price</code> on line 4 both read as
1054            <code class="code">"book.org":title</code> and
1055               <code class="code">"book.org":price</code> respectively, whereas on line 3 and
1056            5, <code class="code">p:name</code> and <code class="code">price</code> are seen as
1057               <code class="code">"pub.net":name</code> and
1058               <code class="code">"pub.net":price</code>. Even though the actual element name
1059               <code class="code">price</code>, due to namespace scoping rules they are viewed as two
1060            uniquely-named items because the current vocabulary is determined by the namespace(s)
1061            that are in-scope. </p>
1062<div class="table-wrapper" id="namespace-ex">
1063<p class="title">Table V</p>
1064<div class="caption"><p id="idp551200">XML Namespace Example</p></div>
1065<table class="table" xml:id="namespace-ex">
1066<colgroup span="1">
1067<col align="centre" valign="top" span="1">
1068<col align="left" valign="top" span="1">
1069</colgroup>
1070<tbody>
1071<tr>
1072<td>1. </td>
1073<td>&lt;book xmlns:p="pub.net" xmlns="book.org"&gt; </td>
1074</tr>
1075<tr>
1076<td>2. </td>
1077<td>  &lt;title&gt;BOOK NAME&lt;/title&gt; </td>
1078</tr>
1079<tr>
1080<td>3. </td>
1081<td>  &lt;p:name&gt;PUBLISHER NAME&lt;/p:name&gt; </td>
1082</tr>
1083<tr>
1084<td>4. </td>
1085<td>  &lt;price&gt;X&lt;/price&gt; </td>
1086</tr>
1087<tr>
1088<td>5. </td>
1089<td>  &lt;price xmlns="publisher.net"&gt;Y&lt;/price&gt; </td>
1090</tr>
1091<tr>
1092<td>6. </td>
1093<td>&lt;/book&gt; </td>
1094</tr>
1095</tbody>
1096</table>
1097</div>
1098<p id="idp560096"> In both Xerces and icXML, every URI has a one-to-one mapping to a URI ID. These
1099            persist for the lifetime of the application through the use of a global URI pool. Xerces
1100            maintains a stack of namespace scopes that is pushed (popped) every time a start tag
1101            (end tag) occurs in the document. Because a namespace declaration affects the entire
1102            element, it must be processed prior to grammar validation. This is a costly process
1103            considering that a typical namespaced XML document only comes in one of two forms: (1)
1104            those that declare a set of namespaces upfront and never change them, and (2) those that
1105            repeatedly modify the namespaces in predictable patterns. </p>
1106<p id="idp561232"> For that reason, icXML contains an independent namespace stack and utilizes bit
1107            vectors to cheaply perform
1108             When a prefix is
1109            declared (e.g., <code class="code">xmlns:p="pub.net"</code>), a namespace binding
1110            is created that maps the prefix (which are assigned Prefix IDs in the symbol resolution
1111            process) to the URI. Each unique namespace binding has a unique namespace id (NSID) and
1112            every prefix contains a bit vector marking every NSID that has ever been associated with
1113              it within the document. For example, in <a class="xref" href="#namespace-ex">Table V</a>, the prefix binding
1114            set of <code class="code">p</code> and <code class="code">xmlns</code> would be <code class="code">01</code> and
1115            <code class="code">11</code> respectively. To resolve the in-scope namespace binding for each prefix,
1116            a bit vector of the currently visible namespaces is maintained by the system. By ANDing
1117            the prefix bit vector with the currently visible namespaces, the in-scope NSID can be
1118            found using a bit-scan intrinsic. A namespace binding table, similar to
1119            <a class="xref" href="#namespace-binding">Table VI</a>, provides the actual URI ID. </p>
1120<div class="table-wrapper" id="namespace-binding">
1121<p class="title">Table VI</p>
1122<div class="caption"><p id="idp567856">Namespace Binding Table Example</p></div>
1123<table class="table" xml:id="namespace-binding">
1124<colgroup span="1">
1125<col align="centre" valign="top" span="1">
1126<col align="centre" valign="top" span="1">
1127<col align="centre" valign="top" span="1">
1128<col align="centre" valign="top" span="1">
1129<col align="centre" valign="top" span="1">
1130</colgroup>
1131<thead><tr>
1132<th>NSID </th>
1133<th> Prefix </th>
1134<th> URI </th>
1135<th> Prefix ID </th>
1136<th> URI ID </th>
1137</tr></thead>
1138<tbody>
1139<tr>
1140<td>0 </td>
1141<td> <code class="code"> p</code> </td>
1142<td> <code class="code"> pub.net</code> </td>
1143<td> 0 </td>
1144<td> 0 </td>
1145</tr>
1146<tr>
1147<td>1 </td>
1148<td> <code class="code"> xmlns</code> </td>
1149<td> <code class="code"> books.org</code> </td>
1150<td> 1 </td>
1151<td> 1 </td>
1152</tr>
1153<tr>
1154<td>2 </td>
1155<td> <code class="code"> xmlns</code> </td>
1156<td> <code class="code"> pub.net</code> </td>
1157<td> 1 </td>
1158<td> 0 </td>
1159</tr>
1160</tbody>
1161</table>
1162</div>
1163<p id="idp584128">
1164           
1165           
1166           
1167           
1168         </p>
1169<p id="idp586032"> To ensure that scoping rules are adhered to, whenever a start tag is encountered,
1170            any modification to the currently visible namespaces is calculated and stored within a
1171            stack of bit vectors denoting the locally modified namespace bindings. When an end tag
1172            is found, the currently visible namespaces is XORed with the vector at the top of the
1173            stack. This allows any number of changes to be performed at each scope-level with a
1174            constant time.
1175           
1176         </p>
1177</div>
1178<div class="section" id="errorhandling">
1179<h3 class="title" style="clear: both">Error Handling</h3>
1180<p id="idp588464">
1181           
1182            Xerces outputs error messages in two ways: through the programmer API and as thrown
1183            objects for fatal errors. As Xerces parses a file, it uses context-dependant logic to
1184            assess whether the next character is legal; if not, the current state determines the
1185            type and severity of the error. icXML emits errors in the similar manner—but
1186            how it discovers them is substantially different. Recall that in Figure
1187            <a class="xref" href="#icxml-arch" title="icXML Architecture">Figure 2</a>, icXML is divided into two sections: the Parabix Subsystem and
1188            Markup Processor, each with its own system for detecting and producing error messages. </p>
1189<p id="idp590960"> Within the Parabix Subsystem, all computations are performed in parallel, a block at
1190            a time. Errors are derived as artifacts of bitstream calculations, with a 1-bit marking
1191            the byte-position of an error within a block, and the type of error is determined by the
1192            equation that discovered it. The difficulty of error processing in this section is that
1193            in Xerces the line and column number must be given with every error production. Two
1194            major issues exist because of this: (1) line position adheres to XML white-normalization
1195            rules; as such, some sequences of characters, e.g., a carriage return followed by a line
1196            feed, are counted as a single new line character. (2) column position is counted in
1197            characters, not bytes or code units; thus multi-code-unit code-points and surrogate
1198            character pairs are all counted as a single column position. Note that typical XML
1199            documents are error-free but the calculation of the line/column position is a constant
1200            overhead in Xerces.  To
1201            reduce this, icXML pushes the bulk cost of the line/column calculation to the occurrence
1202            of the error and performs the minimal amount of book-keeping necessary to facilitate it.
1203            icXML leverages the byproducts of the Character Set Adapter (CSA) module and amalgamates
1204            the information within the Line Column Tracker (LCT). One of the CSA's major
1205            responsibilities is transcoding an input text.
1206             During this process,
1207            white-space normalization rules are applied and multi-code-unit and surrogate characters
1208            are detected and validated. A <span class="ital">line-feed bitstream</span>,
1209            which marks the positions of the normalized new lines characters, is a natural
1210            derivative of this process. Using an optimized population count algorithm, the line
1211            count can be summarized cheaply for each valid block of text.
1212             Column position is more
1213            difficult to calculate. It is possible to scan backwards through the bitstream of new
1214            line characters to determine the distance (in code-units) between the position between
1215            which an error was detected and the last line feed. However, this distance may exceed
1216            than the actual character position for the reasons discussed in (2). To handle this, the
1217            CSA generates a <span class="ital">skip mask</span> bitstream by ORing together
1218            many relevant bitstreams, such as all trailing multi-code-unit and surrogate characters,
1219            and any characters that were removed during the normalization process. When an error is
1220            detected, the sum of those skipped positions is subtracted from the distance to
1221            determine the actual column number. </p>
1222<p id="idp596480"> The Markup Processor is a state-driven machine. As such, error detection within it
1223            is very similar to Xerces. However, reporting the correct line/column is a much more
1224            difficult problem. The Markup Processor parses the content stream, which is a series of
1225            tagged UTF-16 strings. Each string is normalized in accordance with the XML
1226            specification. All symbol data and unnecessary whitespace is eliminated from the stream;
1227            thus its impossible to derive the current location using only the content stream. To
1228            calculate the location, the Markup Processor borrows three additional pieces of
1229            information from the Parabix Subsystem: the line-feed, skip mask, and a <span class="ital">deletion mask stream</span>, which is a bitstream denoting the
1230            (code-unit) position of every datum that was suppressed from the source during the
1231            production of the content stream. Armed with these, it is possible to calculate the
1232            actual line/column using the same system as the Parabix Subsystem until the sum of the
1233            negated deletion mask stream is equal to the current position. </p>
1234</div>
1235</div>
1236<div class="section" id="multithread">
1237<h2 class="title" style="clear: both">Multithreading with Pipeline Parallelism</h2>
1238<p id="idp600016"> As discussed in section <a class="xref" href="#background-xerces" title="Xerces C++ Structure">section “Xerces C++ Structure”</a>, Xerces can be considered a FSM
1239         application. These are "embarrassingly
1240         sequential."<a class="xref" id="idp601168" href="javascript:showcite('cite-Asanovic-EECS-2006-183','idp601168')">Asanovic and others 2006</a> and notoriously difficult to
1241         parallelize. However, icXML is designed to organize processing into logical layers. In
1242         particular, layers within the Parabix Subsystem are designed to operate over significant
1243         segments of input data before passing their outputs on for subsequent processing. This fits
1244         well into the general model of pipeline parallelism, in which each thread is in charge of a
1245         single module or group of modules. </p>
1246<p id="idp602528"> The most straightforward division of work in icXML is to separate the Parabix Subsystem
1247         and the Markup Processor into distinct logical layers into two separate stages. The
1248         resultant application, <span class="ital">icXML-p</span>, is a course-grained
1249         software-pipeline application. In this case, the Parabix Subsystem thread
1250               <code class="code">T<sub>1</sub></code> reads 16k of XML input <code class="code">I</code> at a
1251         time and produces the content, symbol and URI streams, then stores them in a pre-allocated
1252         shared data structure <code class="code">S</code>. The Markup Processor thread
1253            <code class="code">T<sub>2</sub></code> consumes <code class="code">S</code>, performs well-formedness
1254         and grammar-based validation, and the provides parsed XML data to the application through
1255         the Xerces API. The shared data structure is implemented using a ring buffer, where every
1256         entry contains an independent set of data streams. In the examples of
1257           <a class="xref" href="#threads_timeline1" title="Thread Balance in Two-Stage Pipelines: Stage 1 Dominant">Figure 4</a>, the ring buffer has four entries. A
1258         lock-free mechanism is applied to ensure that each entry can only be read or written by one
1259         thread at the same time. In  <a class="xref" href="#threads_timeline1" title="Thread Balance in Two-Stage Pipelines: Stage 1 Dominant">Figure 4</a> the processing time of
1260               <code class="code">T<sub>1</sub></code> is longer than
1261         <code class="code">T<sub>2</sub></code>; thus <code class="code">T<sub>2</sub></code> always
1262         waits for <code class="code">T<sub>1</sub></code> to write to the shared memory. 
1263         <a class="xref" href="#threads_timeline2" title="Thread Balance in Two-Stage Pipelines: Stage 2 Dominant">Figure 5</a> illustrates the scenario in which
1264         <code class="code">T<sub>1</sub></code> is faster and must wait for
1265            <code class="code">T<sub>2</sub></code> to finish reading the shared data before it can
1266         reuse the memory space. </p>
1267<p id="idp613648">
1268        <div class="figure" id="threads_timeline1">
1269<p class="title">Figure 4: Thread Balance in Two-Stage Pipelines: Stage 1 Dominant</p>
1270<div class="figure-contents"><div class="mediaobject" id="idp615024"><img alt="png image (threads_timeline1.png)" src="threads_timeline1.png" width="500cm"></div></div>
1271</div>
1272        <div class="figure" id="threads_timeline2">
1273<p class="title">Figure 5: Thread Balance in Two-Stage Pipelines: Stage 2 Dominant</p>
1274<div class="figure-contents"><div class="mediaobject" id="idp618080"><img alt="png image (threads_timeline2.png)" src="threads_timeline2.png" width="500cm"></div></div>
1275</div>
1276      </p>
1277<p id="idp620112"> Overall, our design is intended to benefit a range of applications. Conceptually, we
1278         consider two design points. The first, the parsing performed by the Parabix Subsystem
1279         dominates at 67% of the overall cost, with the cost of application processing (including
1280         the driver logic within the Markup Processor) at 33%. The second is almost the opposite
1281         scenario, the cost of application processing dominates at 60%, while the cost of XML
1282         parsing represents an overhead of 40%. </p>
1283<p id="idp621024"> Our design is predicated on a goal of using the Parabix framework to achieve a 50% to
1284         100% improvement in the parsing engine itself. In a best case scenario, a 100% improvement
1285         of the Parabix Subsystem for the design point in which XML parsing dominates at 67% of the
1286         total application cost. In this case, the single-threaded icXML should achieve a 1.5x
1287         speedup over Xerces so that the total application cost reduces to 67% of the original.
1288         However, in icXML-p, our ideal scenario gives us two well-balanced threads each performing
1289         about 33% of the original work. In this case, Amdahl's law predicts that we could expect up
1290         to a 3x speedup at best. </p>
1291<p id="idp622144"> At the other extreme of our design range, we consider an application in which core
1292         parsing cost is 40%. Assuming the 2x speedup of the Parabix Subsystem over the
1293         corresponding Xerces core, single-threaded icXML delivers a 25% speedup. However, the most
1294         significant aspect of our two-stage multi-threaded design then becomes the ability to hide
1295         the entire latency of parsing within the serial time required by the application. In this
1296         case, we achieve an overall speedup in processing time by 1.67x. </p>
1297<p id="idp623088"> Although the structure of the Parabix Subsystem allows division of the work into
1298         several pipeline stages and has been demonstrated to be effective for four pipeline stages
1299         in a research prototype <a class="xref" id="idp623568" href="javascript:showcite('cite-HPCA2012','idp623568')">Lin and Medforth 2012</a>, our analysis here suggests that the further
1300         pipelining of work within the Parabix Subsystem is not worthwhile if the cost of
1301         application logic is little as 33% of the end-to-end cost using Xerces. To achieve benefits
1302         of further parallelization with multi-core technology, there would need to be reductions in
1303         the cost of application logic that could match reductions in core parsing cost. </p>
1304</div>
1305<div class="section" id="performance">
1306<h2 class="title" style="clear: both">Performance</h2>
1307<p id="idp625952"> We evaluate Xerces-C++ 3.1.1, icXML, icXML-p against two benchmarking applications: the
1308         Xerces C++ SAXCount sample application, and a real world GML to SVG transformation
1309         application. We investigated XML parser performance using an Intel Core i7 quad-core (Sandy
1310         Bridge) processor (3.40GHz, 4 physical cores, 8 threads (2 per core), 32+32 kB (per core)
1311         L1 cache, 256 kB (per core) L2 cache, 8 MB L3 cache) running the 64-bit version of Ubuntu
1312         12.04 (Linux). </p>
1313<p id="idp626864"> We analyzed the execution profiles of each XML parser using the performance counters
1314         found in the processor. We chose several key hardware events that provide insight into the
1315         profile of each application and indicate if the processor is doing useful work. The set of
1316         events included in our study are: processor cycles, branch instructions, branch
1317         mispredictions, and cache misses. The Performance Application Programming Interface (PAPI)
1318         Version 5.5.0 <a class="xref" id="idp627632" href="javascript:showcite('cite-papi','idp627632')">Innovative Computing Laboratory</a> toolkit was installed on the test system to facilitate the
1319         collection of hardware performance monitoring statistics. In addition, we used the Linux
1320         perf <a class="xref" id="idp628672" href="javascript:showcite('cite-perf','idp628672')">Eranian and Gouriou</a> utility to collect per core hardware events. </p>
1321<div class="section" id="idp629568">
1322<h3 class="title" style="clear: both">Xerces C++ SAXCount</h3>
1323<p id="idp630208"> Xerces comes with sample applications that demonstrate salient features of the
1324            parser. SAXCount is the simplest such application: it counts the elements, attributes
1325            and characters of a given XML file using the (event based) SAX API and prints out the
1326            totals. </p>
1327<p id="idp630912"> <a class="xref" href="#XMLdocs">Table VII</a> shows the document characteristics of the XML input files
1328            selected for the Xerces C++ SAXCount benchmark. The jaw.xml represents document-oriented
1329            XML inputs and contains the three-byte and four-byte UTF-8 sequence required for the
1330            UTF-8 encoding of Japanese characters. The remaining data files are data-oriented XML
1331            documents and consist entirely of single byte encoded ASCII characters.
1332  <div class="table-wrapper" id="XMLdocs">
1333<p class="title">Table VII</p>
1334<div class="caption"><p id="idp633248">XML Document Characteristics</p></div>
1335<table class="table" xml:id="XMLdocs">
1336<colgroup span="1">
1337<col align="left" valign="top" span="1">
1338<col align="centre" valign="top" span="1">
1339<col align="centre" valign="top" span="1">
1340<col align="centre" valign="top" span="1">
1341<col align="centre" valign="top" span="1">
1342</colgroup>
1343<tbody>
1344<tr>
1345<td>File Name           </td>
1346<td> jaw.xml            </td>
1347<td> road.gml   </td>
1348<td> po.xml     </td>
1349<td> soap.xml </td>
1350</tr>
1351<tr>
1352<td>File Type           </td>
1353<td> document           </td>
1354<td> data               </td>
1355<td> data               </td>
1356<td> data        </td>
1357</tr>
1358<tr>
1359<td>File Size (kB)              </td>
1360<td> 7343                       </td>
1361<td> 11584      </td>
1362<td> 76450              </td>
1363<td> 2717 </td>
1364</tr>
1365<tr>
1366<td>Markup Item Count   </td>
1367<td> 74882              </td>
1368<td> 280724     </td>
1369<td> 4634110    </td>
1370<td> 18004 </td>
1371</tr>
1372<tr>
1373<td>Markup Density              </td>
1374<td> 0.13                       </td>
1375<td> 0.57       </td>
1376<td> 0.76               </td>
1377<td> 0.87       </td>
1378</tr>
1379</tbody>
1380</table>
1381</div>           
1382</p>
1383<p id="idp648752"> A key predictor of the overall parsing performance of an XML file is markup
1384           density<sup class="fn-label"><a href="#idp649120" class="footnoteref" id="idp649120-ref">[2]</a></sup>. This metric has substantial influence on the
1385            performance of traditional recursive descent XML parsers because it directly corresponds
1386            to the number of state transitions that occur when parsing a document. We use a mixture
1387            of document-oriented and data-oriented XML files to analyze performance over a spectrum
1388            of markup densities. </p>
1389<p id="idp650288"> <a class="xref" href="#perf_SAX" title="SAXCount Performance Comparison">Figure 6</a> compares the performance of Xerces, icXML and pipelined icXML
1390            in terms of CPU cycles per byte for the SAXCount application. The speedup for icXML over
1391            Xerces is 1.3x to 1.8x. With two threads on the multicore machine, icXML-p can achieve
1392            speedup up to 2.7x. Xerces is substantially slowed by dense markup but icXML is less
1393            affected through a reduction in branches and the use of parallel-processing techniques.
1394            icXML-p performs better as markup-density increases because the work performed by each
1395            stage is well balanced in this application. </p>
1396<p id="idp652032">
1397        <div class="figure" id="perf_SAX">
1398<p class="title">Figure 6: SAXCount Performance Comparison</p>
1399<div class="figure-contents">
1400<div class="mediaobject" id="idp653344"><img alt="png image (perf_SAX.png)" src="perf_SAX.png" width="500cm"></div>
1401<div class="caption"></div>
1402</div>
1403</div>
1404         </p>
1405</div>
1406<div class="section" id="idp655888">
1407<h3 class="title" style="clear: both">GML2SVG</h3>
1408<p id="idp656560">       As a more substantial application of XML processing, the GML-to-SVG (GML2SVG) application
1409was chosen.   This application transforms geospatially encoded data represented using
1410an XML representation in the form of Geography Markup Language (GML) <a class="xref" id="idp657088" href="javascript:showcite('cite-lake2004geography','idp657088')">Lake and Burggraf 2004</a> 
1411into a different XML format  suitable for displayable maps:
1412Scalable Vector Graphics (SVG) format<a class="xref" id="idp657936" href="javascript:showcite('cite-lu2007advances','idp657936')">Lu and Dos Santos 2007</a>. In the GML2SVG benchmark, GML feature elements
1413and GML geometry elements tags are matched. GML coordinate data are then extracted
1414and transformed to the corresponding SVG path data encodings.
1415Equivalent SVG path elements are generated and output to the destination
1416SVG document.  The GML2SVG application is thus considered typical of a broad
1417class of XML applications that parse and extract information from
1418a known XML format for the purpose of analysis and restructuring to meet
1419the requirements of an alternative format.</p>
1420<p id="idp659424">Our GML to SVG data translations are executed on GML source data
1421modelling the city of Vancouver, British Columbia, Canada.
1422The GML source document set
1423consists of 46 distinct GML feature layers ranging in size from approximately 9 KB to 125.2 MB
1424and with an average document size of 18.6 MB. Markup density ranges from approximately 0.045 to 0.719
1425and with an average markup density of 0.519. In this performance study,
1426213.4 MB of source GML data generates 91.9 MB of target SVG data.</p>
1427<div class="figure" id="perf_GML2SVG">
1428<p class="title">Figure 7: Performance Comparison for GML2SVG</p>
1429<div class="figure-contents">
1430<div class="mediaobject" id="idp661424"><img alt="png image (Throughput.png)" src="Throughput.png" width="500cm"></div>
1431<div class="caption"></div>
1432</div>
1433</div>
1434<p id="idp663760"><a class="xref" href="#perf_GML2SVG" title="Performance Comparison for GML2SVG">Figure 7</a> compares the performance of the GML2SVG application linked against
1435the Xerces, icXML and icXML-p.   
1436On the GML workload with this application, single-thread icXML
1437achieved about a 50% acceleration over Xerces,
1438increasing throughput on our test machine from 58.3 MB/sec to 87.9 MB/sec.   
1439Using icXML-p, a further throughput increase to 111 MB/sec was recorded,
1440approximately a 2X speedup.</p>
1441<p id="idp665168">An important aspect of icXML is the replacement of much branch-laden
1442sequential code inside Xerces with straight-line SIMD code using far
1443fewer branches.  <a class="xref" href="#branchmiss_GML2SVG" title="Comparative Branch Misprediction Rate">Figure 8</a> shows the corresponding
1444improvement in branching behaviour, with a dramatic reduction in branch misses per kB.
1445It is also interesting to note that icXML-p goes even further.   
1446In essence, in using pipeline parallelism to split the instruction
1447stream onto separate cores, the branch target buffers on each core are
1448less overloaded and able to increase the successful branch prediction rate.</p>
1449<div class="figure" id="branchmiss_GML2SVG">
1450<p class="title">Figure 8: Comparative Branch Misprediction Rate</p>
1451<div class="figure-contents">
1452<div class="mediaobject" id="idp667952"><img alt="png image (BM.png)" src="BM.png" width="500cm"></div>
1453<div class="caption"></div>
1454</div>
1455</div>
1456<p id="idp670240">The behaviour of the three versions with respect to L1 cache misses per kB is shown
1457in <a class="xref" href="#cachemiss_GML2SVG" title="Comparative Cache Miss Rate">Figure 9</a>.   Improvements are shown in both instruction-
1458and data-cache performance with the improvements in instruction-cache
1459behaviour the most dramatic.   Single-threaded icXML shows substantially improved
1460performance over Xerces on both measures.   
1461Although icXML-p is slightly worse with respect to data-cache performance,
1462this is more than offset by a further dramatic reduction in instruction-cache miss rate.
1463Again partitioning the instruction stream through the pipeline parallelism model has
1464significant benefit.</p>
1465<div class="figure" id="cachemiss_GML2SVG">
1466<p class="title">Figure 9: Comparative Cache Miss Rate</p>
1467<div class="figure-contents">
1468<div class="mediaobject" id="idp673040"><img alt="png image (CM.png)" src="CM.png" width="500cm"></div>
1469<div class="caption"></div>
1470</div>
1471</div>
1472<p id="idp675328">One caveat with this study is that the GML2SVG application did not exhibit
1473a relative balance of processing between application code and Xerces library
1474code reaching the 33% figure.  This suggests that for this application and
1475possibly others, further separating the logical layers of the
1476icXML engine into different pipeline stages could well offer significant benefit.
1477This remains an area of ongoing work.</p>
1478</div>
1479</div>
1480<div class="section" id="conclusion">
1481<h2 class="title" style="clear: both">Conclusion and Future Work</h2>
1482<p id="idp677488"> This paper is the first case study documenting the significant performance benefits
1483         that may be realized through the integration of parallel bitstream technology into existing
1484         widely-used software libraries. In the case of the Xerces-C++ XML parser, the combined
1485         integration of SIMD and multicore parallelism was shown capable of dramatic producing
1486         dramatic increases in throughput and reductions in branch mispredictions and cache misses.
1487         The modified parser, going under the name icXML is designed to provide the full
1488         functionality of the original Xerces library with complete compatibility of APIs. Although
1489         substantial re-engineering was required to realize the performance potential of parallel
1490         technologies, this is an important case study demonstrating the general feasibility of
1491         these techniques. </p>
1492<p id="idp678768"> The further development of icXML to move beyond 2-stage pipeline parallelism is
1493         ongoing, with realistic prospects for four reasonably balanced stages within the library.
1494         For applications such as GML2SVG which are dominated by time spent on XML parsing, such a
1495         multistage pipelined parsing library should offer substantial benefits. </p>
1496<p id="idp679536"> The example of XML parsing may be considered prototypical of finite-state machines
1497         applications which have sometimes been considered "embarassingly
1498         sequential" and so difficult to parallelize that "nothing
1499         works." So the case study presented here should be considered an important data
1500         point in making the case that parallelization can indeed be helpful across a broad array of
1501         application types. </p>
1502<p id="idp680912"> To overcome the software engineering challenges in applying parallel bitstream
1503         technology to existing software systems, it is clear that better library and tool support
1504         is needed. The techniques used in the implementation of icXML and documented in this paper
1505         could well be generalized for applications in other contexts and automated through the
1506         creation of compiler technology specifically supporting parallel bitstream programming.
1507      </p>
1508</div>
1509<div class="bibliography" id="idp682528">
1510<h2 class="title" style="clear:both">Bibliography</h2>
1511<p class="bibliomixed" id="CameronHerdyLin2008"><a href="#idp446176">[Cameron and Herdy 2008] </a>Cameron, Robert D., Herdy, Kenneth S. and Lin, Dan. High performance XML parsing using parallel bit stream technology. CASCON'08: Proc. 2008 conference of the center for advanced studies on collaborative research. 2008 New York, NY, USA</p>
1512<p class="bibliomixed" id="papi"><a href="#idp627632">[Innovative Computing Laboratory] </a>Innovative Computing Laboratory, University of Texas. Performance Application Programming Interface.<a href="http://icl.cs.utk.edu/papi/" class="link" target="_new">http://icl.cs.utk.edu/papi/</a></p>
1513<p class="bibliomixed" id="perf"><a href="#idp628672">[Eranian and Gouriou] </a>Eranian, Stephane, Gouriou, Eric, Moseley, Tipp and Bruijn, Willem de. Linux kernel profiling with perf.<a href="https://perf.wiki.kernel.org/index.php/Tutorial" class="link" target="_new">https://perf.wiki.kernel.org/index.php/Tutorial</a></p>
1514<p class="bibliomixed" id="Cameron2008"><a href="#idp445264">[Cameron 2008] </a>Cameron, Robert D.. A case study in SIMD text processing with parallel bit streams: UTF-8 to UTF-16 transcoding. Proc. 13th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming. 2008 New York, NY, USA</p>
1515<p class="bibliomixed" id="ParaDOM2009"><a href="#idp296880">[Shah and Rao 2009] </a>Shah, Bhavik, Rao, Praveen, Moon, Bongki and Rajagopalan, Mohan. A Data Parallel Algorithm for XML DOM Parsing. Database and XML Technologies. 2009</p>
1516<p class="bibliomixed" id="XMLSSE42"><a href="#idp300032">[Lei 2008] </a>Lei, Zhai. XML Parsing Accelerator with Intel Streaming SIMD Extensions 4 (Intel SSE4). 2008<a href="Intel%20Software%20Network" class="link" target="_new">Intel Software Network</a></p>
1517<p class="bibliomixed" id="Cameron2009"><a href="#idp300944">[Cameron and Herdy 2009] </a>Cameron, Rob, Herdy, Ken and Amiri, Ehsan Amiri. Parallel Bit Stream Technology as a Foundation for XML Parsing Performance. Int'l Symposium on Processing XML Efficiently: Overcoming Limits on Space, Time, or Bandwidth. 2009</p>
1518<p class="bibliomixed" id="HilewitzLee2006"><a href="#idp527552">[Hilewitz and Lee 2006] </a>Hilewitz, Yedidya and Lee, Ruby B.. Fast Bit Compression and Expansion with Parallel Extract and Parallel Deposit Instructions. ASAP '06: Proc. IEEE 17th Int'l Conference on Application-specific Systems, Architectures and Processors. 2006 Washington, DC, USA</p>
1519<p class="bibliomixed" id="Asanovic-EECS-2006-183"><a href="#idp601168">[Asanovic and others 2006] </a>Asanovic, Krste and others. The Landscape of Parallel Computing Research: A View from Berkeley. 2006</p>
1520<p class="bibliomixed" id="GRID2006"><a href="#idp281568">[Lu and Chiu 2006] </a>Lu, Wei, Chiu, Kenneth and Pan, Yinfei. A Parallel Approach to XML Parsing. Proceedings of the 7th IEEE/ACM International Conference on Grid Computing. 2006 Washington, DC, USA</p>
1521<p class="bibliomixed" id="cameron-EuroPar2011"><a href="#idp301696">[Cameron and Amiri 2011] </a>Cameron, Robert D., Amiri, Ehsan, Herdy, Kenneth S., Lin, Dan, Shermer, Thomas C. and Popowich, Fred P.. Parallel Scanning with Bitstream Addition: An XML Case Study. Euro-Par 2011, LNCS 6853, Part II. 2011 Berlin, Heidelberg</p>
1522<p class="bibliomixed" id="HPCA2012"><a href="#idp299088">[Lin and Medforth 2012] </a>Lin, Dan, Medforth, Nigel, Herdy, Kenneth S., Shriraman, Arrvindh and Cameron, Rob. Parabix: Boosting the efficiency of text processing on commodity processors. International Symposium on High-Performance Computer Architecture. 2012 Los Alamitos, CA, USA</p>
1523<p class="bibliomixed" id="HPCC2011"><a href="#idp296048">[You and Wang 2011] </a>You, Cheng-Han and Wang, Sheng-De. A Data Parallel Approach to XML Parsing and Query. 10th IEEE International Conference on High Performance Computing and Communications. 2011 Los Alamitos, CA, USA</p>
1524<p class="bibliomixed" id="E-SCIENCE2007"><a href="#idp294480">[Pan and Zhang 2007] </a>Pan, Yinfei, Zhang, Ying, Chiu, Kenneth and Lu, Wei. Parallel XML Parsing Using Meta-DFAs. International Conference on e-Science and Grid Computing. 2007 Los Alamitos, CA, USA</p>
1525<p class="bibliomixed" id="ICWS2008"><a href="#idp297744">[Pan and Zhang 2008] </a>Pan, Yinfei, Zhang, Ying and Chiu, Kenneth. Hybrid Parallelism for XML SAX Parsing. IEEE International Conference on Web Services. 2008 Los Alamitos, CA, USA</p>
1526<p class="bibliomixed" id="IPDPS2008"><a href="#idp295232">[Pan and Zhang 2008] </a>Pan, Yinfei, Zhang, Ying and Chiu, Kenneth. Simultaneous transducers for data-parallel XML parsing. International Parallel and Distributed Processing Symposium. 2008 Los Alamitos, CA, USA</p>
1527<p class="bibliomixed" id="HackersDelight"><a href="#idp526608">[Warren 2002] </a>Warren, Henry S.. Hacker's Delight. 2002</p>
1528<p class="bibliomixed" id="lu2007advances"><a href="#idp657936">[Lu and Dos Santos 2007] </a>Lu, C.T., Dos Santos, R.F., Sripada, L.N. and Kou, Y.. Advances in GML for geospatial applications. 2007</p>
1529<p class="bibliomixed" id="lake2004geography"><a href="#idp657088">[Lake and Burggraf 2004] </a>Lake, R., Burggraf, D.S., Trninic, M. and Rae, L.. Geography mark-up language (GML) [foundation for the geo-web]. 2004</p>
1530</div>
1531<div class="footnotes">
1532<br><hr width="100" align="left">
1533<div id="FSM" class="footnote"><p><sup class="fn-label"><a href="#FSM-ref" class="footnoteref">[1]</a></sup> Herein FSM applications are considered software systems whose
1534            behaviour is defined by the inputs, current state and the events associated with
1535              transitions of states.</p></div>
1536<div id="idp649120" class="footnote"><p><sup class="fn-label"><a href="#idp649120-ref" class="footnoteref">[2]</a></sup> Markup Density: the ratio of markup bytes used to define the structure
1537             of the document vs. its file size.</p></div>
1538</div>
1539</div>
1540<div id="balisage-footer"><h3 style="font-family: serif; margin:0.25em; font-style: italic">Balisage Series on Markup Technologies</h3></div>
1541</div>
1542</body>
1543</html>
1544<div id="balisage-footer"><h3 style="font-family: serif; margin:0.25em">
1545<i>Balisage:</i> <small>The Markup Conference</small>
1546</h3></div>
1547</body>
1548</html>
Note: See TracBrowser for help on using the repository browser.