A Functional Language for Hyperstreaming XSLT

Size: px
Start display at page:

Download "A Functional Language for Hyperstreaming XSLT"

Transcription

1 A Functional Language for Hyperstreaming XSLT Pavel Labath 1, Joachim Niehren 2 1 Commenius University, Bratislava, Slovakia 2 Inria Lille, France May 2013

2 Motivation some types of tree transformations cannot be streamed at all with bounded memory practical example: given a book, produce a copy of the book with table of contents added Current approach of the XSLT working group is to restrict streaming support to a smaller fragment, where the situation above does not occur. Our approach: generalize the single input stream single output stream model output will be a collection of streams (a shredded stream) that can later be plugged together to form a simple stream

3 Outline Shredded trees X-Fun Compiler of XSLT to X-Fun Evaluation of X-Fun programs Implementation and Experiments

4 Trees, Hedges, Nested words trees, hedges (forests) over alphabet Σ nested word linearization of a tree/hedge a e.g., linearization of b c d is <a><b><c/><d/></b></a>

5 Shredded hedges, Shredded nested words a shredded hedge h = (h 0, (y i, h i ) n i=1 over Σ consists of variables y i, an ordinary root hedge h 0 over Σ {y 1,... y n }, and ordinary hedges h i over Σ {y i+1,..., y n } shredded nested word w = (w 0, (y i, w i ) n i=1 ) to convert a shredded hedge into an ordinary one, gradually substitute variables y i by corresponding hedges. unshred(h) = h 0 [h 1 /y 1 ] [h n /y n ] unshred(w) = w 0 [w 1 /y 1 ] [w n /y n ]

6 Example: A shredded nested word h = (h 0, (y 1, h 1 ), (y 2, h 2 ), (y 3, h 3 )) h 0 = <A><B>y 1 </B>y 2 </A> h 1 = <C>y 3 </C> h 2 = <D/> h 3 = <E/>

7 Outline Shredded trees X-Fun Compiler of XSLT to X-Fun Evaluation of X-Fun programs Implementation and Experiments

8 Example <addresses > <address > <name>jemal Antidze </name> < com</ > <phone> </ phone> <phone> <secret/> </ address >... </ addresses > translate <ol > < l i > <p> Jemal Antidze </ p> <p> Phone: <p/ > </ l i >... </ ol > </ phone>

9 Example: transformation algorithm f u n c t i o n convert_address ( x ) name = t e x t of the name c h i l d of x output node l i : output node p : output name for each c h i l d node x labeled phone and w i t h o u t a s e c r e t c h i l d : output node p : output t e x t Phone : output the t e x t of x main f u n c t i o n : output node o l : for each descendant node x labeled address : c a l l convert_address ( x )

10 Example: transformation in X-Fun l e t convert_address ( x ) = l e t name = for x in x / c h i l d : : name do t e x t ( x ) in t r e e ( l i, t r e e ( p, name) for x in x / c h i l d : : phone [ not ( c h i l d : : s e c r e t ) ] do t r e e ( p, Phone : t e x t ( x ) ) end end in t r e e ( ol, for x in r o o t / descendant : : address do convert_address ( x ) end ) end

11 X-Fun Syntax A ::= y (hedge variable) subtree(x) tree(l, A) T A 1 A n let D in A q(x, A 1,..., A n ) for x in x/p do A (V node (A) {x }) case N of F 1 A 1... F n A n compose x : A in A shred(a, T )

12 X-Fun features ability to construct shredded output ability to reprocess constructed output X-Fun programs can have three types of variables node variables (x) range over nodes of the input tree hedge variables (y) can contain parts of constructed output function variables q for functions at most one active node variable in every block

13 Relationship to TL [Maneth et al., 2005] a TL program is a Walking Macro Tree Transducer T = (Q, Σ,, q 0, R) rules R are of the form q(x 1 F, y 1,... y m ) A, where A is defined recursively as A ::= ε a(a) AA y j q(x 2 x 1 /P, A,..., A)

14 TL: semantics x/p = sequence of nodes in the input tree selected by (XPath) expression P when starting from node x. evaluation of q(x 2 x 1 /P, A 1,..., A m ): let x 1 /P = v 1,... v n. for each node v i : let q(x 1 F, y 1,..., y m ) A i be the first rule, such that v i F. replace q(x 2 x 1 /P, A 1,..., A m ) by A 1 [A 1/y 1, A m /y m ] A n[a 1 /y 1, A m /y m ]

15 TL: translation to X-Fun q(x 1 F 1 ) a(q(x2 x1/p)) q(x 1 F 2 ) b() translate q ( x ) = case x of F1 t r e e ( a, for x in x / P do q ( x ) ) F2 t r e e ( b, ε ) end

16 Outline Shredded trees X-Fun Compiler of XSLT to X-Fun Evaluation of X-Fun programs Implementation and Experiments

17 XSLT XSLT is a popular language for transforming XML documents our compiler can handle a large fragment of XSLT and enables us to automatically stream many existing transformations this also fascilitates comparison of X-Fun with already existing streaming implementations

18 XSLT: example < x s l : template name="q " match ="b " mode="m" > <C>< x s l : c a l l template name="p "/ > </C> </ x s l : template > < x s l : template name="p " match ="a " mode="m" > <B>< x s l : apply templates s e l e c t =" c h i l d : : * " mode="m"/ > </B> </ x s l : template > translate q ( x ) = t r e e (C, p ( x ) ) p ( x ) = t r e e (B, for x in x / c h i l d : : * do m( x ) ) m( x ) = case x in [ s e l f : : a ] p ( x ) [ s e l f : : b ] q ( x )

19 Outline Shredded trees X-Fun Compiler of XSLT to X-Fun Evaluation of X-Fun programs XPath streaming machine Functional engine Implementation and Experiments

20 XPath streaming machine (XSM) When processing an input tree, we shall create one XSM for every XPath expression and filter in the X-Fun program the machines will read the entire tree and evaluate the expression/filter the machines will operate synchronously possibility to quickly discard input

21 XPath streaming machine (XSM) has two input streams and a single output stream input stream 1: input nested word w input stream 2: word from {0, 1} of the same length as w value 1 in a given position signals the machine to start evaluating the expression or filter from the current node

22 XPath streaming machine output stream contains tuples (x, z, S) for XPath expressions and (x, S) for filters x - starting node of the expression or filter z - target node of the XPath expression S {select, reject, alive} whether the node got selected, rejected, or the result is not yet known

23 XSM for filter [self::a/child::b] input 1 <a> <a> <b> </b> </a> </a> $ XSM Output: input $

24 XSM for filter [self::a/child::b] input 1 <a> <a> <b> </b> </a> </a> $ XSM Output: input $

25 XSM for filter [self::a/child::b] input 1 <a> <a> <b> </b> </a> </a> $ XSM Output: (v 1, alive) input $

26 XSM for filter [self::a/child::b] input 1 <a> <a> <b> </b> </a> </a> $ XSM Output: (v 1, alive) input $

27 XSM for filter [self::a/child::b] input 1 <a> <a> <b> </b> </a> </a> $ XSM input $ Output: (v 1, alive) (v 2, alive)

28 XSM for filter [self::a/child::b] input 1 <a> <a> <b> </b> </a> </a> $ XSM input $ Output: (v 1, alive) (v 2, alive) (v 2, select)

29 XSM for filter [self::a/child::b] input 1 <a> <a> <b> </b> </a> </a> $ XSM input $ Output: (v 1, alive) (v 2, alive) (v 2, select)

30 XSM for filter [self::a/child::b] input 1 <a> <a> <b> </b> </a> </a> $ XSM input $ Output: (v 1, alive) (v 2, alive) (v 2, select)

31 XSM for filter [self::a/child::b] input 1 <a> <a> <b> </b> </a> </a> $ XSM input $ Output: (v 1, alive) (v 2, alive) (v 2, select)

32 XSM for filter [self::a/child::b] input 1 <a> <a> <b> </b> </a> </a> $ XSM input $ Output: (v 1, alive) (v 2, alive) (v 2, select)

33 XSM for filter [self::a/child::b] input 1 <a> <a> <b> </b> </a> </a> $ XSM input $ Output: (v 1, alive) (v 2, alive) (v 2, select)

34 XSM for filter [self::a/child::b] input 1 <a> <a> <b> </b> </a> </a> $ XSM input $ Output: (v 1, alive) (v 2, alive) (v 2, select) (v 1, reject)

35 XSM for filter [self::a/child::b] input 1 <a> <a> <b> </b> </a> </a> $ XSM input $ Output: (v 1, alive) (v 2, alive) (v 2, select) (v 1, reject)

36 Functional engine coordinates XSM sub-machines and drives them almost synchronously computes the second input stream for the sub-machines buffers parts of the input, if needed (for evaluating subtree(x) expressions) produces output by gradually unfolding/rewriting the program tree completed prefix is immediately flushed to the output

37 Speculative execution if we are unsure if we will need an output fragment, we need to compute it even if it may turn out to be redundant if an XSM for a path expression returns alive, we must start evaluating the loop body immediately same holds for filter expressions in case statements we evaluate all potential branches until we are sure which one is selected if a path XSM returns (, v, alive), we may need to start evaluating loop body even before we reach the loop in the main program evaluation tree

38 Implementation functional prototype implemented in Java supported fragment already exceeds the streamable fragment of Saxon some features still under construction we used FXP library ( with slight interface modifications, as an implementation of XSM XSLT compiler uses QuiXPath library ( for translation from XPath to FXP

39 Experiments experiments show that our unoptimized implementation is comparable to Saxon operating in streaming mode time ratio is between 2 and 6 in favor of Saxon ratio is slightly worse when comparing to Saxon operating in memory however, here we perform much better from memory usage point of view

40 Conclusion we have introduced a functional language X-Fun language combines streaming with arbitrary document navigation immediate practical aplications through translation from XSLT Outlook general for loops translation from XQuery, XProc support a larger fragment of XPath expressions...

41 Thank you

A uniform programming language for implementing XML standards

A uniform programming language for implementing XML standards A uniform programming language for implementing XML standards Pavel Labath 1, Joachim Niehren 2 1 Commenius University, Bratislava, Slovakia 2 Inria Lille, France Sofsem 2015 Motivation Different data

More information

Projection for Nested Word Automata Speeds up XPath Evaluation on XML Streams

Projection for Nested Word Automata Speeds up XPath Evaluation on XML Streams Projection for Nested Word Automata Speeds up XPath Evaluation on XML Streams Tom Sebastian, Joachim Niehren To cite this version: Tom Sebastian, Joachim Niehren. Projection for Nested Word Automata Speeds

More information

Containment for XPath Fragments under DTD Constraints

Containment for XPath Fragments under DTD Constraints Containment for XPath Fragments under DTD Constraints Peter Wood School of Computer Science and Information Systems Birkbeck College University of London United Kingdom email: ptw@dcs.bbk.ac.uk 1 Outline

More information

FluXQuery: An Optimizing XQuery Processor

FluXQuery: An Optimizing XQuery Processor FluXQuery: An Optimizing XQuery Processor for Streaming XML Data Report by Cătălin Hriţcu (catalin.hritcu@gmail.com) International Max Planck Research School for Computer Science 1 Introduction While for

More information

Safety Properties for Querying XML Streams

Safety Properties for Querying XML Streams Safety Properties for Querying XML Streams Olivier Gauwin University of Mons joint work with: J. Niehren, S. Tison, M. Benedikt and G. Puppis Workshop on Timed and Infinite Systems Warwick March 30th,

More information

Automatic Verification of Parameterized Data Structures

Automatic Verification of Parameterized Data Structures Automatic Verification of Parameterized Data Structures Jyotirmoy V. Deshmukh, E. Allen Emerson and Prateek Gupta The University of Texas at Austin The University of Texas at Austin 1 Outline Motivation

More information

Streamable Fragments of Forward XPath

Streamable Fragments of Forward XPath Streamable Fragments of Forward XPath Olivier Gauwin, Joachim Niehren To cite this version: Olivier Gauwin, Joachim Niehren. Streamable Fragments of Forward XPath. 16th International Conference on Implementation

More information

Semantics and Verification

Semantics and Verification Semantics and Verification Lecture 2 informal introduction to CCS syntax of CCS semantics of CCS 1 / 12 Sequential Fragment Parallelism and Renaming CCS Basics (Sequential Fragment) Nil (or 0) process

More information

XML Security Views. Queries, Updates, and Schema. Benoît Groz. University of Lille, Mostrare INRIA. PhD defense, October 2012

XML Security Views. Queries, Updates, and Schema. Benoît Groz. University of Lille, Mostrare INRIA. PhD defense, October 2012 XML Security Views Queries, Updates, and Schema Benoît Groz University of Lille, Mostrare INRIA PhD defense, October 2012 Benoît Groz (Mostrare) XML Security Views PhD defense, October 2012 1 / 45 Talk

More information

A Learning Algorithm for Top-Down XML Transformations

A Learning Algorithm for Top-Down XML Transformations A Learning Algorithm for Top-Down XML Transformations Aurélien Lemay University of Lille Mostrare project, INRIA & LIFL Sebastian Maneth NICTA and UNSW Sydney, Australia Joachim Niehren INRIA Lille Mostrare

More information

Query Reasoning on Data Trees with Counting

Query Reasoning on Data Trees with Counting Query Reasoning on Data Trees with Counting Everardo Bárcenas 1,2, Edgard Benítez-Guerrero 2, and Jesús Lavalle 3,4 1 CONACYT 2 Universidad Veracruzana 3 Benemérita Universidad Autónoma de Puebla 4 Instituto

More information

Structure. Background. them to their higher order equivalents. functionals in Standard ML source code and converts

Structure. Background. them to their higher order equivalents. functionals in Standard ML source code and converts Introduction 3 Background functionals factor out common behaviour map applies a function to every element of a list fun map [ ] = [ ] map f ( x : : xs ) = f x : : map f xs filter keeps only those elements

More information

Evaluating Complex Queries against XML Streams with Polynomial Combined Complexity

Evaluating Complex Queries against XML Streams with Polynomial Combined Complexity INSTITUT FÜR INFORMATIK Lehr- und Forschungseinheit für Programmier- und Modellierungssprachen Oettingenstraße 67, D 80538 München Evaluating Complex Queries against XML Streams with Polynomial Combined

More information

Synthesizing transformations from XML schema mappings

Synthesizing transformations from XML schema mappings Synthesizing transformations from XML schema mappings Claire David University Paris-Est Marne Claire.David@univ-mlv.fr Piotr Hofman University of Warsaw ph209519@mimuw.edu.pl Michał Pilipczuk University

More information

Satisfiability of Downward XPath with Data Equality Tests

Satisfiability of Downward XPath with Data Equality Tests Satisfiability of Downward XPath with Data Equality Tests Diego Figueira LSV, ENS Cachan, CNRS, INRIA Saclay, France ABSTRACT In this work we investigate the satisfiability problem for the logic XPath(,,

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION "Winter" 2018 http://cseweb.ucsd.edu/classes/wi18/cse105-ab/ Today's learning goals Sipser Section 1.1 Construct finite automata using algorithms from closure arguments Determine

More information

CISC 4090: Theory of Computation Chapter 1 Regular Languages. Section 1.1: Finite Automata. What is a computer? Finite automata

CISC 4090: Theory of Computation Chapter 1 Regular Languages. Section 1.1: Finite Automata. What is a computer? Finite automata CISC 4090: Theory of Computation Chapter Regular Languages Xiaolan Zhang, adapted from slides by Prof. Werschulz Section.: Finite Automata Fordham University Department of Computer and Information Sciences

More information

Complex Systems Design & Distributed Calculus and Coordination

Complex Systems Design & Distributed Calculus and Coordination Complex Systems Design & Distributed Calculus and Coordination Concurrency and Process Algebras: Theory and Practice Francesco Tiezzi University of Camerino francesco.tiezzi@unicam.it A.A. 2014/2015 F.

More information

Alternating register automata on finite data words and trees DIEGO FIGUEIRA

Alternating register automata on finite data words and trees DIEGO FIGUEIRA Logical Methods in Computer Science Vol. 8 (1:22) 2012, pp. 1 43 www.lmcs-online.org Submitted Nov. 5, 2010 Published Mar. 10, 2012 Alternating register automata on finite data words and trees DIEGO FIGUEIRA

More information

Finite Universes. L is a fixed-length language if it has length n for some

Finite Universes. L is a fixed-length language if it has length n for some Finite Universes Finite Universes When the universe is finite (e.g., the interval 0, 2 1 ), all objects can be encoded by words of the same length. A language L has length n 0 if L =, or every word of

More information

Deciding XPath Containment with MSO

Deciding XPath Containment with MSO Deciding XPath Containment with MSO Pierre Genevès and Nabil Layaïda INRIA Rhône-Alpes, 655 avenue de l Europe, 38330 Montbonnot, France Abstract XPath is the standard language for addressing parts of

More information

Fig. 2 Tree structure of r the best of our knowledge, there is no study on detecting XSLT rules affected by a schema update. On the other hand, there

Fig. 2 Tree structure of r the best of our knowledge, there is no study on detecting XSLT rules affected by a schema update. On the other hand, there An Algorithm for Detecting XSLT Rules Affected by Schema Updates Yang Wu 1,a) Nobutaka Suzuki 2,b) Abstract: Schemas of XML documents are continuously updated according to changes in the real world. Moreover,

More information

EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization

EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Discrete Systems Lecture: Automata, State machines, Circuits Stavros Tripakis University of California, Berkeley Stavros

More information

Forward-XPath and extended register automata on data-trees (with Appendix)

Forward-XPath and extended register automata on data-trees (with Appendix) Forward-XPath and extended register automata on data-trees (with Appendix) Diego Figueira INRIA, LSV, ENS Cachan, France ABSTRACT We consider a fragment of XPath named forward-xpath, which contains all

More information

A Simplified Approach for Testing Real-Time Systems Based on Action Refinement

A Simplified Approach for Testing Real-Time Systems Based on Action Refinement A Simplified Approach for Testing Real-Time Systems Based on Action Refinement Saddek Bensalem, Moez Krichen, Lotfi Majdoub, Riadh Robbana, Stavros Tripakis Verimag Laboratory, Centre Equation 2, avenue

More information

Chapter Five: Nondeterministic Finite Automata

Chapter Five: Nondeterministic Finite Automata Chapter Five: Nondeterministic Finite Automata From DFA to NFA A DFA has exactly one transition from every state on every symbol in the alphabet. By relaxing this requirement we get a related but more

More information

Query-based Learning of XPath Expressions

Query-based Learning of XPath Expressions Query-based Learning of XPath Expressions Julien Carme, Michal Ceresna, and Max Goebel Database and Artificial Intelligence Group Vienna University of Technology Abstract. XML is data format for storing

More information

Speculative Parallelism in Cilk++

Speculative Parallelism in Cilk++ Speculative Parallelism in Cilk++ Ruben Perez & Gregory Malecha MIT May 11, 2010 Ruben Perez & Gregory Malecha (MIT) Speculative Parallelism in Cilk++ May 11, 2010 1 / 33 Parallelizing Embarrassingly Parallel

More information

Introduction to Theory of Computing

Introduction to Theory of Computing CSCI 2670, Fall 2012 Introduction to Theory of Computing Department of Computer Science University of Georgia Athens, GA 30602 Instructor: Liming Cai www.cs.uga.edu/ cai 0 Lecture Note 3 Context-Free Languages

More information

Integer Programming. Wolfram Wiesemann. December 6, 2007

Integer Programming. Wolfram Wiesemann. December 6, 2007 Integer Programming Wolfram Wiesemann December 6, 2007 Contents of this Lecture Revision: Mixed Integer Programming Problems Branch & Bound Algorithms: The Big Picture Solving MIP s: Complete Enumeration

More information

Operational Semantics

Operational Semantics Operational Semantics Semantics and applications to verification Xavier Rival École Normale Supérieure Xavier Rival Operational Semantics 1 / 50 Program of this first lecture Operational semantics Mathematical

More information

Certain Query Answering on Compressed String Patterns: From Streams to Hyperstreams

Certain Query Answering on Compressed String Patterns: From Streams to Hyperstreams Certain Query Answering on Compressed String Patterns: From Streams to Hyperstreams Iovka Boneva, Joachim Niehren, Momar Sakho To cite this version: Iovka Boneva, Joachim Niehren, Momar Sakho. Certain

More information

Proofs, Strings, and Finite Automata. CS154 Chris Pollett Feb 5, 2007.

Proofs, Strings, and Finite Automata. CS154 Chris Pollett Feb 5, 2007. Proofs, Strings, and Finite Automata CS154 Chris Pollett Feb 5, 2007. Outline Proofs and Proof Strategies Strings Finding proofs Example: For every graph G, the sum of the degrees of all the nodes in G

More information

Logical Characterization of Weighted Pebble Walking Automata

Logical Characterization of Weighted Pebble Walking Automata Logical Characterization of Weighted Pebble Walking Automata Benjamin Monmege Université libre de Bruxelles, Belgium Benedikt Bollig and Paul Gastin (LSV, ENS Cachan, France) Marc Zeitoun (LaBRI, Bordeaux

More information

Compilers. Lexical analysis. Yannis Smaragdakis, U. Athens (original slides by Sam

Compilers. Lexical analysis. Yannis Smaragdakis, U. Athens (original slides by Sam Compilers Lecture 3 Lexical analysis Yannis Smaragdakis, U. Athens (original slides by Sam Guyer@Tufts) Big picture Source code Front End IR Back End Machine code Errors Front end responsibilities Check

More information

Closure under the Regular Operations

Closure under the Regular Operations Closure under the Regular Operations Application of NFA Now we use the NFA to show that collection of regular languages is closed under regular operations union, concatenation, and star Earlier we have

More information

Reasoning about XML with Temporal Logics and Automata

Reasoning about XML with Temporal Logics and Automata Reasoning about XML with Temporal Logics and Automata Leonid Libkin 1 and Cristina Sirangelo 1,2 1 University of Edinburgh 2 LSV, ENS Cachan, INRIA Abstract. We show that problems arising in static analysis

More information

What You Must Remember When Processing Data Words

What You Must Remember When Processing Data Words What You Must Remember When Processing Data Words Michael Benedikt, Clemens Ley, and Gabriele Puppis Oxford University Computing Laboratory, Park Rd, Oxford OX13QD UK Abstract. We provide a Myhill-Nerode-like

More information

A Learning Algorithm for Top-Down XML Transformations

A Learning Algorithm for Top-Down XML Transformations A Learning Algorithm for Top-Down XML Transformations Aurélien Lemay, Sebastian Maneth, Joachim Niehren To cite this version: Aurélien Lemay, Sebastian Maneth, Joachim Niehren. A Learning Algorithm for

More information

Model Checking. Temporal Logic. Fifth International Symposium in Programming, volume. of concurrent systems in CESAR. In Proceedings of the

Model Checking. Temporal Logic. Fifth International Symposium in Programming, volume. of concurrent systems in CESAR. In Proceedings of the Sérgio Campos, Edmund Why? Advantages: No proofs Fast Counter-examples No problem with partial specifications can easily express many concurrency properties Main Disadvantage: State Explosion Problem Too

More information

XPath Query Satisfiability and Containment under DTD Constraints

XPath Query Satisfiability and Containment under DTD Constraints XPath Query Satisfiability and Containment under DTD Constraints A Dissertation Submitted to Birkbeck, University of London in Partial Fulfillment of the Requirements for the Degree of Doctor of Philosophy

More information

Dependable Cardinality Forecasts for XQuery

Dependable Cardinality Forecasts for XQuery c Systems Group Department of Computer Science ETH Zürich August 26, 2008 Dependable Cardinality Forecasts for XQuery Jens Teubner, ETH (formerly IBM Research) Torsten Grust, U Tübingen (formerly TUM)

More information

COSE312: Compilers. Lecture 17 Intermediate Representation (2)

COSE312: Compilers. Lecture 17 Intermediate Representation (2) COSE312: Compilers Lecture 17 Intermediate Representation (2) Hakjoo Oh 2017 Spring Hakjoo Oh COSE312 2017 Spring, Lecture 17 May 31, 2017 1 / 19 Common Intermediate Representations Three-address code

More information

arxiv: v5 [cs.fl] 21 Feb 2012

arxiv: v5 [cs.fl] 21 Feb 2012 Streaming Tree Transducers Rajeev Alur and Loris D Antoni University of Pennsylvania February 23, 2012 arxiv:1104.2599v5 [cs.fl] 21 Feb 2012 Abstract Theory of tree transducers provides a foundation for

More information

Theory of Computation

Theory of Computation Theory of Computation Dr. Sarmad Abbasi Dr. Sarmad Abbasi () Theory of Computation 1 / 38 Lecture 21: Overview Big-Oh notation. Little-o notation. Time Complexity Classes Non-deterministic TMs The Class

More information

Computational Models Lecture 8 1

Computational Models Lecture 8 1 Computational Models Lecture 8 1 Handout Mode Ronitt Rubinfeld and Iftach Haitner. Tel Aviv University. April 18/ May 2, 2016 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice

More information

Computational Models Lecture 8 1

Computational Models Lecture 8 1 Computational Models Lecture 8 1 Handout Mode Nachum Dershowitz & Yishay Mansour. Tel Aviv University. May 17 22, 2017 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION Spring 2017 http://cseweb.ucsd.edu/classes/sp17/cse105-ab/ Today's learning goals Sipser Ch 1.1, 1.2 Distinguish between an NFA and a DFA Define nondeterminism and why it

More information

Lambda Calculus! Gunnar Gotshalks! LC-1

Lambda Calculus! Gunnar Gotshalks! LC-1 Lambda Calculus! LC-1 λ Calculus History! Developed by Alonzo Church during mid 1930 s! One fundamental goal was to describe what can be computed.! Full definition of λ-calculus is equivalent in power

More information

Decision Problems of Tree Transducers with Origin

Decision Problems of Tree Transducers with Origin Decision Problems of Tree Transducers with Origin Emmanuel Filiot 1, Sebastian Maneth 2, Pierre-Alain Reynier 3, and Jean-Marc Talbot 3 1 Université Libre de Bruxelles 2 University of Edinburgh 3 Aix-Marseille

More information

Theory of Computation (IV) Yijia Chen Fudan University

Theory of Computation (IV) Yijia Chen Fudan University Theory of Computation (IV) Yijia Chen Fudan University Review language regular context-free machine DFA/ NFA PDA syntax regular expression context-free grammar Pushdown automata Definition A pushdown automaton

More information

Model Theory of XPath on Data Trees. Part II: Binary Bisimulation and Definability

Model Theory of XPath on Data Trees. Part II: Binary Bisimulation and Definability Model Theory of XPath on Data Trees. Part II: Binary Bisimulation and Definability Sergio Abriola María Emilia Descotte Santiago Figueira University of Buenos Aires Abstract We study the expressive power

More information

How to Recognise Different Tree Patterns from quite a Long Way Away

How to Recognise Different Tree Patterns from quite a Long Way Away How to Recognise Different Tree Patterns from quite a Long Way Away Jan Hidders Philippe Michiels Jérôme Siméon Roel Vercammen Abstract Tree patterns are one of the main abstractions used to access XML

More information

Logics and automata over in nite alphabets

Logics and automata over in nite alphabets Logics and automata over in nite alphabets Anca Muscholl LIAFA, Univ. Paris 7 & CNRS Joint work with: Miko!aj Bojańczyk (Warsaw, Paris), Claire David (Paris), Thomas Schwentick (Dortmund) and Luc Segou

More information

Computational Models Lecture 8 1

Computational Models Lecture 8 1 Computational Models Lecture 8 1 Handout Mode Ronitt Rubinfeld and Iftach Haitner. Tel Aviv University. May 11/13, 2015 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice

More information

Transitive Closure Logic, Nested Tree Walking Automata, and XPath

Transitive Closure Logic, Nested Tree Walking Automata, and XPath Transitive Closure Logic, Nested Tree Walking Automata, and XPath Balder ten Cate ISLA, Universiteit van Amsterdam and Luc Segoufin INRIA, ENS-Cachan We study FO(MTC), first-order logic with monadic transitive

More information

COM364 Automata Theory Lecture Note 2 - Nondeterminism

COM364 Automata Theory Lecture Note 2 - Nondeterminism COM364 Automata Theory Lecture Note 2 - Nondeterminism Kurtuluş Küllü March 2018 The FA we saw until now were deterministic FA (DFA) in the sense that for each state and input symbol there was exactly

More information

An Operational Semantics for the Dataflow Algebra. A. J. Cowling

An Operational Semantics for the Dataflow Algebra. A. J. Cowling Verification and Testing Research Group, Department of Computer Science, University of Sheffield, Regent Court, 211, Portobello Street, Sheffield, S1 4DP, United Kingdom Email: A.Cowling @ dcs.shef.ac.uk

More information

Frequent Pattern Mining: Exercises

Frequent Pattern Mining: Exercises Frequent Pattern Mining: Exercises Christian Borgelt School of Computer Science tto-von-guericke-university of Magdeburg Universitätsplatz 2, 39106 Magdeburg, Germany christian@borgelt.net http://www.borgelt.net/

More information

Hoare Logic: Reasoning About Imperative Programs

Hoare Logic: Reasoning About Imperative Programs Hoare Logic: Reasoning About Imperative Programs COMP1600 / COMP6260 Dirk Pattinson Australian National University Semester 2, 2018 Programming Paradigms Functional. (Haskell, SML, OCaml,... ) main paradigm:

More information

CHAPTER 5. Interactive Turing Machines

CHAPTER 5. Interactive Turing Machines CHAPTER 5 Interactive Turing Machines The interactive Turing machine, which was introduced by Van Leeuwen and Wiedermann[28, 30], is an extension of the classical Turing machine model. It attempts to model

More information

Forward-XPath and extended register automata

Forward-XPath and extended register automata Forward-XPath and extended register automata Diego Figueira To cite this version: Diego Figueira. Forward-XPath and extended register automata. International Conference on Database Theory (ICDT), Mar 2010,

More information

Deterministic Finite Automaton (DFA)

Deterministic Finite Automaton (DFA) 1 Lecture Overview Deterministic Finite Automata (DFA) o accepting a string o defining a language Nondeterministic Finite Automata (NFA) o converting to DFA (subset construction) o constructed from a regular

More information

Streaming Tree Transducers

Streaming Tree Transducers 1 Streaming Tree Transducers RAJEEV ALUR, University of Pennsylvania LORIS D ANTONI, University of Wisconsin-Madison The theory of tree transducers provides a foundation for understanding expressiveness

More information

Blocking Synchronization: Streams Vijay Saraswat (Dec 10, 2012)

Blocking Synchronization: Streams Vijay Saraswat (Dec 10, 2012) 1 Streams Blocking Synchronization: Streams Vijay Saraswat (Dec 10, 2012) Streams provide a very simple abstraction for determinate parallel computation. The intuition for streams is already present in

More information

Certain Query Answering on Compressed String Patterns: From Streams to Hyperstreams

Certain Query Answering on Compressed String Patterns: From Streams to Hyperstreams Certain Query Answering on Compressed String Patterns: From Streams to Hyperstreams Iovka Boneva, Joachim Niehren, Momar Sakho To cite this version: Iovka Boneva, Joachim Niehren, Momar Sakho. Certain

More information

N-Synchronous Kahn Networks A Relaxed Model of Synchrony for Real-Time Systems

N-Synchronous Kahn Networks A Relaxed Model of Synchrony for Real-Time Systems N-Synchronous Kahn Networks A Relaxed Model of Synchrony for Real-Time Systems Albert Cohen 1, Marc Duranton 2, Christine Eisenbeis 1, Claire Pagetti 1,4, Florence Plateau 3 and Marc Pouzet 3 POPL, Charleston

More information

SPARQL Extensions and Outlook

SPARQL Extensions and Outlook SPARQL Extensions and Outlook Axel Polleres 1 1 DERI Galway, National University of Ireland, Galway axel.polleres@deri.org European Semantic Web Conference 2007 A. Polleres SPARQL Extensions and Outlook

More information

Languages. Languages. An Example Grammar. Grammars. Suppose we have an alphabet V. Then we can write:

Languages. Languages. An Example Grammar. Grammars. Suppose we have an alphabet V. Then we can write: Languages A language is a set (usually infinite) of strings, also known as sentences Each string consists of a sequence of symbols taken from some alphabet An alphabet, V, is a finite set of symbols, e.g.

More information

Syntax Analysis Part I

Syntax Analysis Part I 1 Syntax Analysis Part I Chapter 4 COP5621 Compiler Construction Copyright Robert van Engelen, Florida State University, 2007-2013 2 Position of a Parser in the Compiler Model Source Program Lexical Analyzer

More information

Chapter 5. Finite Automata

Chapter 5. Finite Automata Chapter 5 Finite Automata 5.1 Finite State Automata Capable of recognizing numerous symbol patterns, the class of regular languages Suitable for pattern-recognition type applications, such as the lexical

More information

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Dynamic Programming II Date: 10/12/17

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Dynamic Programming II Date: 10/12/17 601.433/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Dynamic Programming II Date: 10/12/17 12.1 Introduction Today we re going to do a couple more examples of dynamic programming. While

More information

Queries, Modalities, Relations, Trees, XPath Lecture VII Core XPath and beyond

Queries, Modalities, Relations, Trees, XPath Lecture VII Core XPath and beyond Queries, Modalities, Relations, Trees, XPath Lecture VII Core XPath and beyond Tadeusz Litak Department of Computer Science University of Leicester July 2010: draft Tadeusz Litak Lecture VII: CXPath and

More information

Syntactic Analysis. Top-Down Parsing

Syntactic Analysis. Top-Down Parsing Syntactic Analysis Top-Down Parsing Copyright 2015, Pedro C. Diniz, all rights reserved. Students enrolled in Compilers class at University of Southern California (USC) have explicit permission to make

More information

Quantified Boolean Formulas Part 1

Quantified Boolean Formulas Part 1 Quantified Boolean Formulas Part 1 Uwe Egly Knowledge-Based Systems Group Institute of Information Systems Vienna University of Technology Results of the SAT 2009 application benchmarks for leading solvers

More information

Advanced Automata Theory 10 Transducers and Rational Relations

Advanced Automata Theory 10 Transducers and Rational Relations Advanced Automata Theory 10 Transducers and Rational Relations Frank Stephan Department of Computer Science Department of Mathematics National University of Singapore fstephan@comp.nus.edu.sg Advanced

More information

Complexity Theory Part I

Complexity Theory Part I Complexity Theory Part I Outline for Today Recap from Last Time Reviewing Verifiers Nondeterministic Turing Machines What does nondeterminism mean in the context of TMs? And just how powerful are NTMs?

More information

Exam: Synchronous Grammars

Exam: Synchronous Grammars Exam: ynchronous Grammars Duration: 3 hours Written documents are allowed. The numbers in front of questions are indicative of hardness or duration. ynchronous grammars consist of pairs of grammars whose

More information

September 11, Second Part of Regular Expressions Equivalence with Finite Aut

September 11, Second Part of Regular Expressions Equivalence with Finite Aut Second Part of Regular Expressions Equivalence with Finite Automata September 11, 2013 Lemma 1.60 If a language is regular then it is specified by a regular expression Proof idea: For a given regular language

More information

Designing 1-tape Deterministic Turing Machines

Designing 1-tape Deterministic Turing Machines MCS-265: The Theory of Computation Handout #T1 San Skulrattanakulchai Gustavus Adolphus College April 5, 2011 Designing 1-tape Deterministic Turing Machines A TM corresponds to a computer program. We will

More information

Yoshiharu Kojima 1,2

Yoshiharu Kojima 1,2 Reachability Problems for Controlled Rewriting Systems Yoshiharu Kojima 1,2 joint work with Masahiko Sakai 1 and Florent Jacquemard 3 1 Nagoya University 2 Research Fellow of JSPS 3 INRIA Sacray, LSV AJSW2010,

More information

Finite Automata. Seungjin Choi

Finite Automata. Seungjin Choi Finite Automata Seungjin Choi Department of Computer Science and Engineering Pohang University of Science and Technology 77 Cheongam-ro, Nam-gu, Pohang 37673, Korea seungjin@postech.ac.kr 1 / 28 Outline

More information

Intelligent Agents. Formal Characteristics of Planning. Ute Schmid. Cognitive Systems, Applied Computer Science, Bamberg University

Intelligent Agents. Formal Characteristics of Planning. Ute Schmid. Cognitive Systems, Applied Computer Science, Bamberg University Intelligent Agents Formal Characteristics of Planning Ute Schmid Cognitive Systems, Applied Computer Science, Bamberg University Extensions to the slides for chapter 3 of Dana Nau with contributions by

More information

Synthesis weakness of standard approach. Rational Synthesis

Synthesis weakness of standard approach. Rational Synthesis 1 Synthesis weakness of standard approach Rational Synthesis 3 Overview Introduction to formal verification Reactive systems Verification Synthesis Introduction to Formal Verification of Reactive Systems

More information

Journal of Applied Logic

Journal of Applied Logic Journal of Applied Logic 8 (2010) 210 232 Contents lists available at ScienceDirect Journal of Applied Logic www.elsevier.com/locate/jal Reasoning about XML with temporal logics and automata Leonid Libkin

More information

Sapienza universita di Roma Dipartimento di Informatica e Sistemistica. User guide WSCE-Lite Web Service Composition Engine v 0.1.

Sapienza universita di Roma Dipartimento di Informatica e Sistemistica. User guide WSCE-Lite Web Service Composition Engine v 0.1. Sapienza universita di Roma Dipartimento di Informatica e Sistemistica User guide WSCE-Lite Web Service Composition Engine v 0.1 Valerio Colaianni Contents 1 Installation 5 1.1 Installing TLV..........................

More information

Introduction to Temporal Logic. The purpose of temporal logics is to specify properties of dynamic systems. These can be either

Introduction to Temporal Logic. The purpose of temporal logics is to specify properties of dynamic systems. These can be either Introduction to Temporal Logic The purpose of temporal logics is to specify properties of dynamic systems. These can be either Desired properites. Often liveness properties like In every infinite run action

More information

Information Flow Inference for ML

Information Flow Inference for ML Information Flow Inference for ML Vincent Simonet INRIA Rocquencourt Projet Cristal MIMOSA September 27, 2001 Information flow account number bank applet order vendor account H order L bank H vendor L

More information

Computational Models: Class 5

Computational Models: Class 5 Computational Models: Class 5 Benny Chor School of Computer Science Tel Aviv University March 27, 2019 Based on slides by Maurice Herlihy, Brown University, and modifications by Iftach Haitner and Yishay

More information

Introduction to Computers & Programming

Introduction to Computers & Programming 16.070 Introduction to Computers & Programming Theory of computation: What is a computer? FSM, Automata Prof. Kristina Lundqvist Dept. of Aero/Astro, MIT Models of Computation What is a computer? If you

More information

1. Problem I calculated these out by hand. It was tedious, but kind of fun, in a a computer should really be doing this sort of way.

1. Problem I calculated these out by hand. It was tedious, but kind of fun, in a a computer should really be doing this sort of way. . Problem 5.2-. I calculated these out by hand. It was tedious, but kind of fun, in a a computer should really be doing this sort of way. 2 655 95 45 243 77 33 33 93 86 5 36 8 3 5 2 4 2 2 2 4 2 2 4 4 2

More information

The State Explosion Problem

The State Explosion Problem The State Explosion Problem Martin Kot August 16, 2003 1 Introduction One from main approaches to checking correctness of a concurrent system are state space methods. They are suitable for automatic analysis

More information

(b). Identify all basic blocks in your three address code. B1: 1; B2: 2; B3: 3,4,5,6; B4: 7,8,9; B5: 10; B6: 11; B7: 12,13,14; B8: 15;

(b). Identify all basic blocks in your three address code. B1: 1; B2: 2; B3: 3,4,5,6; B4: 7,8,9; B5: 10; B6: 11; B7: 12,13,14; B8: 15; (a). Translate the program into three address code as defined in Section 6.2, dragon book. (1) i := 2 (2) if i > n goto (7) (3) a[i] := TRUE (4) t2 := i+1 (5) i := t2 (6) goto (2) (7) count := 0 (8) s

More information

Symmetric Network Computation

Symmetric Network Computation Symmetric Network Computation and the Finite-State Symmetric Graph Automaton (FSSGA) Model David Pritchard, with Santosh Vempala Theory of Distributed Systems Group at MIT, July 7 2006 David Pritchard

More information

Earliest Query Answering for Deterministic Nested Word Automata

Earliest Query Answering for Deterministic Nested Word Automata Earliest Query Answering for Deterministic Nested Word Automata Olivier Gauwin, Joachim Niehren, Sophie Tison To cite this version: Olivier Gauwin, Joachim Niehren, Sophie Tison. Earliest Query Answering

More information

Process Algebras and Concurrent Systems

Process Algebras and Concurrent Systems Process Algebras and Concurrent Systems Rocco De Nicola Dipartimento di Sistemi ed Informatica Università di Firenze Process Algebras and Concurrent Systems August 2006 R. De Nicola (DSI-UNIFI) Process

More information

On the Study of Tree Pattern Matching Algorithms and Applications

On the Study of Tree Pattern Matching Algorithms and Applications On the Study of Tree Pattern Matching Algorithms and Applications by Fei Ma B.Sc., Simon Fraser University, 2004 A THESIS SUBMITTED IN PARTIAL FULFILMENT OF THE REQUIREMENTS FOR THE DEGREE OF Master of

More information

Computational Models - Lecture 1 1

Computational Models - Lecture 1 1 Computational Models - Lecture 1 1 Handout Mode Ronitt Rubinfeld and Iftach Haitner. Tel Aviv University. February 29/ March 02, 2016 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames

More information

A Decision Procedure for XPath Containment

A Decision Procedure for XPath Containment A Decision Procedure for XPath Containment Pierre Genevès, Nabil Layaïda To cite this version: Pierre Genevès, Nabil Layaïda. A Decision Procedure for XPath Containment. [Research Report] RR-5867, INRIA.

More information

Theoretical Computer Science

Theoretical Computer Science Theoretical Computer Science Zdeněk Sawa Department of Computer Science, FEI, Technical University of Ostrava 17. listopadu 15, Ostrava-Poruba 708 33 Czech republic September 22, 2017 Z. Sawa (TU Ostrava)

More information