A uniform programming language for implementing XML standards

Size: px
Start display at page:

Download "A uniform programming language for implementing XML standards"

Transcription

1 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

2 Motivation Different data transformation languages: XML database querying: XQuery(XPath) Web publishing: XSLT(XPath) transformation composition: XProc(XPath) JSON: web services:???(jsonpath)

3 Motivation Many competing standars, even withing a single technology (XML). (Semi-)formal specifications of existing languages are hunderds of pages long. When developing a new implementation (e.g., streaming), one needs to support many front-ends.

4 Motivation Solution: X-Fun purely functional programming language support for logical path query (*Path) lean formal semantics uniform core language for other (XML) languages

5 Outline Preliminaries X-Fun Compiling other languages to X-Fun Implementation and Experiments

6 Data values, data trees An abstraction over different kinds of trees. parameters Char finite set of characters k N label size data value a word over Char (String = Char ) label a tuple of data values (l = String k ) data tree a tree over l (t ::= l(t 1,..., t n ))

7 Data values, data trees For XML Char all unicode characters k = 4 labels: ("element", v 1, v 2, nil) ("comment", nil, nil, v 3 ) ("document", nil, nil, nil) ("attribute", v 1, v 2, v 3 ) ("processing-instruction", v 1, nil, v 3 ) ("text", v 1, nil, nil)

8 Outline Preliminaries X-Fun Compiling other languages to X-Fun Implementation and Experiments

9 Example <addresses > <address > <name>pavel Labath </name> < com</ > </ address > <address > <name>joachim Niehren </name> </ address >... </ addresses > translate <ol > < l i > <p> Pavel Labath </p> </ l i > < l i > <p> Joachim Niehren </p> </ l i >... </ ol >

10 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 f o r each c h i l d node x labeled phone : 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 : f o r each descendant node x labeled address : c a l l convert_address ( x )

11 Example: transformation in X-Fun fun book : node tree { l e t convert_address = fun x : node tree { l e t name = evalpath [node] ( "$x / c h i l d : : name / t e x t ( ) " ) maketree ( ( " element ", " l i ", n i l, n i l ), maketree ( ( " element ", " p ", n i l, n i l ), map node tree ( subtree, name) ) ) } in in } maketree ( ( " element ", " o l ", n i l, n i l ), map node tree ( convert_ address, evalpath [node] ( "$bookroot / descendant : : address " ) ) )

12 X-Fun features types node, tree, number, bool, char lists: [T ], tuples: T 1... T n functions: T 1 T 2 unions: T 1 T 2 path expressions as values of type path = [char node] computable at runtime "$x/a" syntactic sugar for x :: / :: a :: nil Builtin path expression evaluator evalpath : path [node string] Pattern matching with match expressions.

13 X-Fun Syntax Expressions E ::= x c E 1 :: E 2 (E 1,..., E n ), n 2 Patterns P ::= x : T!(E) P 1 :: P 2 (P 1,..., P n ), n 2 fun x:t 1 T 2 { E } E 1 (E 2 ) match E { P 1 E 1,..., P n E n } try E 1 catch(x) E 2 raise(e)

14 Outline Preliminaries X-Fun Compiling other languages to X-Fun XSLT Implementation and Experiments

15 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 = " * " mode= "m" / > </B> </ x s l : template >

16 XSLT: translation q = fun x : node [ tree ] { maketree ( ( " element ", "C", n i l, n i l ), p ( x ) ) : : n i l } p = fun x : node [ tree ] { maketree ( ( " element ", "B", n i l, n i l ), concat ( map (m, evalpath ( "$x / * " ) ) ) ) : : n i l } m = fun x : node [ tree ] { i f evalpath ( "$x [ s e l f : : a ] " ) n i l then q ( x ) else i f evalpath ( "$x [ s e l f : : b ] " ) n i l then p ( x ) else n i l }

17 XQuery: example f o r $b in / s i t e / open_auctions / open_auction r e t u r n <increase >{ $b / bidder [ 1 ] / increase / t e x t ( ) } </ increase > translate map ( fun b : node tree { maketree ( ( " element ", " increase ", n i l, n i l ), map ( subtree, evalpath ( "$b / bidder [ 1 ] / increase / t e x t ( ) " ) ) ) }, evalpath ( "$x / s i t e / open_auctions / open_auction " ) )

18 XProc A support library of XProc steps implemented in X-Fun E.g., p:wrap-sequence is implemented as: fun ( seq, wrapper ) : node string node { rootnode ( maketree ( ( " element ", wrapper, n i l, n i l " ), map ( subtree, seq ) ) ) }

19 XProc: Example Then translating an XProc pipeline is easy: <p : s p l i t sequence name= " s p l i t " t e s t = " / / b " > <p : i n p u t p o r t = " source " s e l e c t = " / / a " / > </p : s p l i t sequence> <p : wrap sequence wrapper= " sequence " / > translate l e t i n p u t 1 = map ( rootnode, evalpath ( "$source / / a " ) ) in l e t matched, notmatched = s p l i t ( input1, fun x : node bool { evalpath ( "$x / / b " ) n i l } ) in wrap ( matched, " sequence " )

20 Implementation Functional prototype implemented in Java. Using standard java interface for evaluating XPath expressions. XSLT and XQuery compiler support the translation of the entire XMark benchmark (and more)

21 Experiments XQuery and XSLT (comparing against Saxon) On queries without joins our implementation is on par or up to 20% slower. On queries with joins up to 2 times slower. XProc (comparing against XML Calabash) From 2 to 8 times faster on tested inputs. Caveat: Testing not exhaustive due to lack of a testsuite and a XProc X-Fun compiler implementation (evaluated tests were manually translated).

22 Conclusion we have introduced a functional language X-Fun core language for different XML transformation langauges and more efficient implementation with minimal effort Outlook XProc compiler Streaming implementations of X-Fun

23 Thank you

A Functional Language for Hyperstreaming XSLT

A Functional Language for Hyperstreaming XSLT A Functional Language for Hyperstreaming XSLT Pavel Labath 1, Joachim Niehren 2 1 Commenius University, Bratislava, Slovakia 2 Inria Lille, France May 2013 Motivation some types of tree transformations

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

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

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

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

Peter Wood. Department of Computer Science and Information Systems Birkbeck, University of London Automata and Formal Languages

Peter Wood. Department of Computer Science and Information Systems Birkbeck, University of London Automata and Formal Languages and and Department of Computer Science and Information Systems Birkbeck, University of London ptw@dcs.bbk.ac.uk Outline and Doing and analysing problems/languages computability/solvability/decidability

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

Type Based XML Projection

Type Based XML Projection Type Based XML Projection VLDB 2006, Seoul, Korea Véronique Benzaken Giuseppe Castagna Dario Colazzo Kim Nguy ên : Équipe Bases de Données, LRI, Université Paris-Sud 11, Orsay, France : Équipe Langage,

More information

On Reasoning on Time and Location on the Web

On Reasoning on Time and Location on the Web On Reasoning on Time and Location on the Web François Bry, Bernhard Lorenz, Hans Jürgen Ohlbach, Stephanie Spranger Institute for Computer Science, University of Munich PPSWR, Dec. 08, 2003 Mumbai 1 Temporal

More information

QSQL: Incorporating Logic-based Retrieval Conditions into SQL

QSQL: Incorporating Logic-based Retrieval Conditions into SQL QSQL: Incorporating Logic-based Retrieval Conditions into SQL Sebastian Lehrack and Ingo Schmitt Brandenburg University of Technology Cottbus Institute of Computer Science Chair of Database and Information

More information

XReason: A Semantic Approach that Reasons with Patterns to Answer XML Keyword Queries

XReason: A Semantic Approach that Reasons with Patterns to Answer XML Keyword Queries XReason: A Semantic Aroach that Reasons with Patterns to Answer XML Keyword Queries Cem Aksoy 1, Aggeliki Dimitriou 2, Dimitri Theodoratos 1, Xiaoying Wu 3 1 New Jersey Institute of Technology, Newark,

More information

Materialized views for P2P XML warehousing

Materialized views for P2P XML warehousing Ioana Manolescu 1 Spyros Zoupanos 1 1 GEMO/IASI group, INRIA Saclay Île-de-France July 2009 Dataring project meeting, Nantes 1 / 31 1 Introduction Outline 2 Algebraic query rewriting Tree pattern dialect

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

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

DESCRIPTION LOGICS. Paula Severi. October 12, University of Leicester

DESCRIPTION LOGICS. Paula Severi. October 12, University of Leicester DESCRIPTION LOGICS Paula Severi University of Leicester October 12, 2009 Description Logics Outline Introduction: main principle, why the name description logic, application to semantic web. Syntax and

More information

CVO103: Programming Languages. Lecture 2 Inductive Definitions (2)

CVO103: Programming Languages. Lecture 2 Inductive Definitions (2) CVO103: Programming Languages Lecture 2 Inductive Definitions (2) Hakjoo Oh 2018 Spring Hakjoo Oh CVO103 2018 Spring, Lecture 2 March 13, 2018 1 / 20 Contents More examples of inductive definitions natural

More information

ITI Introduction to Computing II

ITI Introduction to Computing II (with contributions from R. Holte) School of Electrical Engineering and Computer Science University of Ottawa Version of January 11, 2015 Please don t print these lecture notes unless you really need to!

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

Roy L. Crole. Operational Semantics Abstract Machines and Correctness. University of Leicester, UK

Roy L. Crole. Operational Semantics Abstract Machines and Correctness. University of Leicester, UK Midlands Graduate School, University of Birmingham, April 2008 1 Operational Semantics Abstract Machines and Correctness Roy L. Crole University of Leicester, UK Midlands Graduate School, University of

More information

Pruning Nested XQuery Queries

Pruning Nested XQuery Queries Pruning Nested XQuery Queries Bilel Gueni, Talel Abdessalem, Bogdan Cautis,Emmanuel Waller Telecom ParisTech LTCI UMR CNRS 5141 46, rue Barrault-Paris, 75013 France First.Last@enst.fr Université de Paris-Sud

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

CSC 4181Compiler Construction. Context-Free Grammars Using grammars in parsers. Parsing Process. Context-Free Grammar

CSC 4181Compiler Construction. Context-Free Grammars Using grammars in parsers. Parsing Process. Context-Free Grammar CSC 4181Compiler Construction Context-ree Grammars Using grammars in parsers CG 1 Parsing Process Call the scanner to get tokens Build a parse tree from the stream of tokens A parse tree shows the syntactic

More information

Sound and Efficient Language-Integrated Query

Sound and Efficient Language-Integrated Query Sound and Efficient Language-Integrated Query Maintaining the ORDER Oleg Kiselyov Tatsuya Katsushima Tohoku University, Japan APLAS 2017 November, 2017 2 Outline Motivation Core SQUR Core SQUR with Ranking

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

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

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

What is this course about?

What is this course about? What is this course about? Examining the power of an abstract machine What can this box of tricks do? What is this course about? Examining the power of an abstract machine Domains of discourse: automata

More information

TASM: Top-k Approximate Subtree Matching

TASM: Top-k Approximate Subtree Matching TASM: Top-k Approximate Subtree Matching Nikolaus Augsten 1 Denilson Barbosa 2 Michael Böhlen 3 Themis Palpanas 4 1 Free University of Bozen-Bolzano, Italy augsten@inf.unibz.it 2 University of Alberta,

More information

Towards a Declarative Query and Transformation Language for XML and Semistructured Data: Simulation Unification

Towards a Declarative Query and Transformation Language for XML and Semistructured Data: Simulation Unification Towards a Declarative Query and Transformation Language for XML and Semistructured Data: Simulation Unification François Bry and Sebastian Schaffert http://www.pms.informatik.uni-muenchen.de Institut für

More information

Nunchaku: Flexible Model Finding for Higher-Order Logic

Nunchaku: Flexible Model Finding for Higher-Order Logic Nunchaku: Flexible Model Finding for Higher-Order Logic Simon Cruanes, Jasmin Blanchette, Andrew Reynolds Veridis, Inria Nancy https://cedeela.fr/~simon/ April 7th, 2016 1 / 21 Summary Introduction Nunchaku

More information

ITI Introduction to Computing II

ITI Introduction to Computing II (with contributions from R. Holte) School of Electrical Engineering and Computer Science University of Ottawa Version of January 9, 2019 Please don t print these lecture notes unless you really need to!

More information

Compact Representation for Answer Sets of n-ary Regular Queries

Compact Representation for Answer Sets of n-ary Regular Queries Compact Representation for Answer Sets of n-ary Regular Queries Kazuhiro Inaba 1 and Haruo Hosoya 1 The University of Tokyo, {kinaba,hahosoya}@is.s.u-tokyo.ac.jp Abstract. An n-ary query over trees takes

More information

Cylindrical Algebraic Decomposition in Coq

Cylindrical Algebraic Decomposition in Coq Cylindrical Algebraic Decomposition in Coq MAP 2010 - Logroño 13-16 November 2010 Assia Mahboubi INRIA Microsoft Research Joint Centre (France) INRIA Saclay Île-de-France École Polytechnique, Palaiseau

More information

P Q1 Q2 Q3 Q4 Q5 Tot (60) (20) (20) (20) (60) (20) (200) You are allotted a maximum of 4 hours to complete this exam.

P Q1 Q2 Q3 Q4 Q5 Tot (60) (20) (20) (20) (60) (20) (200) You are allotted a maximum of 4 hours to complete this exam. Exam INFO-H-417 Database System Architecture 13 January 2014 Name: ULB Student ID: P Q1 Q2 Q3 Q4 Q5 Tot (60 (20 (20 (20 (60 (20 (200 Exam modalities You are allotted a maximum of 4 hours to complete this

More information

Material Covered on the Final

Material Covered on the Final Material Covered on the Final On the final exam, you are responsible for: Anything covered in class, except for stories about my good friend Ken Kennedy All lecture material after the midterm ( below the

More information

Lexical Analysis: DFA Minimization & Wrap Up

Lexical Analysis: DFA Minimization & Wrap Up Lexical Analysis: DFA Minimization & Wrap Up Automating Scanner Construction PREVIOUSLY RE NFA (Thompson s construction) Build an NFA for each term Combine them with -moves NFA DFA (subset construction)

More information

Regular n-ary Queries in Trees and Variable Independence

Regular n-ary Queries in Trees and Variable Independence Regular n-ary Queries in Trees and Variable Independence Emmanuel Filiot Sophie Tison Laboratoire d Informatique Fondamentale de Lille (LIFL) INRIA Lille Nord-Europe, Mostrare Project IFIP TCS, 2008 E.Filiot

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

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

Incomplete Information in RDF

Incomplete Information in RDF Incomplete Information in RDF Charalampos Nikolaou and Manolis Koubarakis charnik@di.uoa.gr koubarak@di.uoa.gr Department of Informatics and Telecommunications National and Kapodistrian University of Athens

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

Principles of Program Analysis: A Sampler of Approaches

Principles of Program Analysis: A Sampler of Approaches Principles of Program Analysis: A Sampler of Approaches Transparencies based on Chapter 1 of the book: Flemming Nielson, Hanne Riis Nielson and Chris Hankin: Principles of Program Analysis Springer Verlag

More information

The power of Tarski s relation algebra on trees

The power of Tarski s relation algebra on trees The power of Tarski s relation algebra on trees Jelle Hellings 1, Yuqing Wu 2, Marc Gyssens 1, and Dirk Van Gucht 3 1 Hasselt University, Martelarenlaan 42, 3500, Hasselt, Belgium 2 Pomona College, 185

More information

SXPath - Extending XPath towards Spatial Querying on Web Documents

SXPath - Extending XPath towards Spatial Querying on Web Documents Introduction - Extending XPath towards Spatial Querying on Web Documents Ermelinda Oro 1 Massimo Ruffolo 1 Steffen Staab 2 1 Institute of High Performance Computing and Networking of CNR (ICAR-CNR) University

More information

Propositional Logic. Testing, Quality Assurance, and Maintenance Winter Prof. Arie Gurfinkel

Propositional Logic. Testing, Quality Assurance, and Maintenance Winter Prof. Arie Gurfinkel Propositional Logic Testing, Quality Assurance, and Maintenance Winter 2018 Prof. Arie Gurfinkel References Chpater 1 of Logic for Computer Scientists http://www.springerlink.com/content/978-0-8176-4762-9/

More information

Learning n-ary Node Selecting Tree Transducers from Completely Annotated Examples

Learning n-ary Node Selecting Tree Transducers from Completely Annotated Examples Learning n-ary Node Selecting Tree Transducers from Completely Annotated Examples Aurélien Lemay, Joachim Niehren, Rémi Gilleron To cite this version: Aurélien Lemay, Joachim Niehren, Rémi Gilleron. Learning

More information

Mapping Maintenance in XML P2P Databases

Mapping Maintenance in XML P2P Databases Mapping Maintenance in XML P2P Databases Dario Colazzo LRI - Université Paris Sud Carlo Sartiani Dipartimento di Informatica - Università di Pisa Motivating Example (1/3) P i sab i b = b i b[ (Au t hor

More information

Suppose h maps number and variables to ɛ, and opening parenthesis to 0 and closing parenthesis

Suppose h maps number and variables to ɛ, and opening parenthesis to 0 and closing parenthesis 1 Introduction Parenthesis Matching Problem Describe the set of arithmetic expressions with correctly matched parenthesis. Arithmetic expressions with correctly matched parenthesis cannot be described

More information

Complexity 1: Motivation. Outline. Dusko Pavlovic. Introductions. Algorithms. Introductions. Complexity 1: Motivation. Contact.

Complexity 1: Motivation. Outline. Dusko Pavlovic. Introductions. Algorithms. Introductions. Complexity 1: Motivation. Contact. Outline Complexity Theory Part 1: Defining complexity Complexity of algorithms RHUL Spring 2012 Outline Contact Defining complexity email: dusko.pavlovic@rhul.ac.uk phone: (01784 44 30 81) Complexity of

More information

Outline. Overview. Syntax Semantics. Introduction Hilbert Calculus Natural Deduction. 1 Introduction. 2 Language: Syntax and Semantics

Outline. Overview. Syntax Semantics. Introduction Hilbert Calculus Natural Deduction. 1 Introduction. 2 Language: Syntax and Semantics Introduction Arnd Poetzsch-Heffter Software Technology Group Fachbereich Informatik Technische Universität Kaiserslautern Sommersemester 2010 Arnd Poetzsch-Heffter ( Software Technology Group Fachbereich

More information

Tree Signatures and Unordered XML Pattern Matching

Tree Signatures and Unordered XML Pattern Matching Tree Signatures and Unordered XML Pattern Matching Pavel Zezula Masaryk University of Brno, Czech Republic and Federica Mandreoli, Riccardo Martoglia University of Modena and Reggio Emilia, Italy Overview

More information

A Universal Calculus for Stream Processing Languages

A Universal Calculus for Stream Processing Languages 1 A Universal Calculus for Stream Processing Languages Robert Soulé, Martin Hirzel, Robert Grimm, Buğra Gedik, Henrique Andrade, Vibhore Kumar, and Kun-Lung Wu New York University and IBM Research 2 Stream

More information

CS Lecture 19: Logic To Truth through Proof. Prof. Clarkson Fall Today s music: Theme from Sherlock

CS Lecture 19: Logic To Truth through Proof. Prof. Clarkson Fall Today s music: Theme from Sherlock CS 3110 Lecture 19: Logic To Truth through Proof Prof. Clarkson Fall 2014 Today s music: Theme from Sherlock Review Current topic: How to reason about correctness of code Last week: informal arguments

More information

A Dichotomy. in in Probabilistic Databases. Joint work with Robert Fink. for Non-Repeating Queries with Negation Queries with Negation

A Dichotomy. in in Probabilistic Databases. Joint work with Robert Fink. for Non-Repeating Queries with Negation Queries with Negation Dichotomy for Non-Repeating Queries with Negation Queries with Negation in in Probabilistic Databases Robert Dan Olteanu Fink and Dan Olteanu Joint work with Robert Fink Uncertainty in Computation Simons

More information

Computer Science Introductory Course MSc - Introduction to Java

Computer Science Introductory Course MSc - Introduction to Java Computer Science Introductory Course MSc - Introduction to Java Lecture 1: Diving into java Pablo Oliveira ENST Outline 1 Introduction 2 Primitive types 3 Operators 4 5 Control Flow

More information

Executing the formal semantics of the Accellera Property Specification Language

Executing the formal semantics of the Accellera Property Specification Language Executing the PSL semantics 1/17 Executing the formal semantics of the Accellera Property Specification Language joint work with Joe Hurd & Konrad Slind Standard practice: generate tools from formal syntax

More information

Formal Methods Lecture 8. (B. Pierce's slides for the book Types and Programming Languages )

Formal Methods Lecture 8. (B. Pierce's slides for the book Types and Programming Languages ) Formal Methods Lecture 8 (B. Pierce's slides for the book Types and Programming Languages ) Erasure and Typability Erasure We can transform terms in λ to terms of the untyped lambda-calculus simply by

More information

Simply Typed Lambda Calculus

Simply Typed Lambda Calculus Simply Typed Lambda Calculus Language (ver1) Lambda calculus with boolean values t ::= x variable x : T.t abstraction tt application true false boolean values if ttt conditional expression Values v ::=

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

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

DReX: A Declarative Language for Efficiently Evaluating Regular String Transformations

DReX: A Declarative Language for Efficiently Evaluating Regular String Transformations DReX: A Declarative Language for Efficiently Evaluating Regular String Transformations Rajeev Alur Loris D Antoni Mukund Raghothaman POPL 2015 1 DReX is a DSL for String Transformations align-bibtex...

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

Extending the Lambda Calculus: An Eager Functional Language

Extending the Lambda Calculus: An Eager Functional Language Syntax of the basic constructs: Extending the Lambda Calculus: An Eager Functional Language canonical forms z cfm ::= intcfm boolcfm funcfm tuplecfm altcfm intcfm ::= 0 1-1... boolcfm ::= boolconst funcfm

More information

Logic-Based XPath Optimization

Logic-Based XPath Optimization Logic-Based XPath Optimization Pierre Genevès, Jean-Yves Vion-Dury To cite this version: Pierre Genevès, Jean-Yves Vion-Dury. Logic-Based XPath Optimization. Proceedings of the 24 ACM symposium on Document

More information

T Reactive Systems: Temporal Logic LTL

T Reactive Systems: Temporal Logic LTL Tik-79.186 Reactive Systems 1 T-79.186 Reactive Systems: Temporal Logic LTL Spring 2005, Lecture 4 January 31, 2005 Tik-79.186 Reactive Systems 2 Temporal Logics Temporal logics are currently the most

More information

Propositional Logic: Part II - Syntax & Proofs 0-0

Propositional Logic: Part II - Syntax & Proofs 0-0 Propositional Logic: Part II - Syntax & Proofs 0-0 Outline Syntax of Propositional Formulas Motivating Proofs Syntactic Entailment and Proofs Proof Rules for Natural Deduction Axioms, theories and theorems

More information

A Modular Rewriting Semantics for CML

A Modular Rewriting Semantics for CML A Modular Rewriting Semantics for CML Fabricio Chalub Barbosa do Rosário frosario@ic.uff.br 19 de março de 2004 0-0 Outline A closer look at MSOS Mapping MSOS to MRS Executing and model checking CML programs

More information

XPath Formal Semantics and Beyond: a Coq based approach

XPath Formal Semantics and Beyond: a Coq based approach XPath Formal Semantics and Beyond: a Coq based approach Pierre Genevès 1 and Jean-Yves Vion-Dury 1,2 1 WAM Project, INRIA Rhône-Alpes 2 Xerox Research Centre Europe Abstract. XPath was introduced as the

More information

Supplementary Material

Supplementary Material Supplementary Material Contents 1 Keywords of GQL 2 2 The GQL grammar 3 3 THE GQL user guide 4 3.1 The environment........................................... 4 3.2 GQL projects.............................................

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

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

Aalto University 2) University of Oxford

Aalto University 2) University of Oxford RFID-Based Logistics Monitoring with Semantics-Driven Event Processing Mikko Rinne 1), Monika Solanki 2) and Esko Nuutila 1) 23rd of June 2016 DEBS 2016 1) Aalto University 2) University of Oxford Scenario:

More information

Ordering, Indexing, and Searching Semantic Data: A Terminology Aware Index Structure

Ordering, Indexing, and Searching Semantic Data: A Terminology Aware Index Structure Ordering, Indexing, and Searching Semantic Data: A Terminology Aware Index Structure by Jeffrey Pound A thesis presented to the University of Waterloo in fulfillment of the thesis requirement for the degree

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

CFLs and Regular Languages. CFLs and Regular Languages. CFLs and Regular Languages. Will show that all Regular Languages are CFLs. Union.

CFLs and Regular Languages. CFLs and Regular Languages. CFLs and Regular Languages. Will show that all Regular Languages are CFLs. Union. We can show that every RL is also a CFL Since a regular grammar is certainly context free. We can also show by only using Regular Expressions and Context Free Grammars That is what we will do in this half.

More information

Timo Latvala. February 4, 2004

Timo Latvala. February 4, 2004 Reactive Systems: Temporal Logic LT L Timo Latvala February 4, 2004 Reactive Systems: Temporal Logic LT L 8-1 Temporal Logics Temporal logics are currently the most widely used specification formalism

More information

Compiling Techniques

Compiling Techniques Lecture 3: Introduction to 22 September 2017 Reminder Action Create an account and subscribe to the course on piazza. Coursework Starts this afternoon (14.10-16.00) Coursework description is updated regularly;

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

CS256/Spring 2008 Lecture #11 Zohar Manna. Beyond Temporal Logics

CS256/Spring 2008 Lecture #11 Zohar Manna. Beyond Temporal Logics CS256/Spring 2008 Lecture #11 Zohar Manna Beyond Temporal Logics Temporal logic expresses properties of infinite sequences of states, but there are interesting properties that cannot be expressed, e.g.,

More information

Static Checkers For Tree Structures and Heaps

Static Checkers For Tree Structures and Heaps Static Checkers For Tree Structures and Heaps Final Year Project Report Matthew Hague Supervisors: Dr. Philippa Gardner and Dr. Cristiano Calcagno Second Marker: Dr. Nobuko Yoshida

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

Bringing machine learning & compositional semantics together: central concepts

Bringing machine learning & compositional semantics together: central concepts Bringing machine learning & compositional semantics together: central concepts https://githubcom/cgpotts/annualreview-complearning Chris Potts Stanford Linguistics CS 244U: Natural language understanding

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

Model Checking for Propositions CS477 Formal Software Dev Methods

Model Checking for Propositions CS477 Formal Software Dev Methods S477 Formal Software Dev Methods Elsa L Gunter 2112 S, UIU egunter@illinois.edu http://courses.engr.illinois.edu/cs477 Slides based in part on previous lectures by Mahesh Vishwanathan, and by Gul gha January

More information

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta CSE 2001: Introduction to Theory of Computation Fall 2012 Suprakash Datta datta@cse.yorku.ca Office: CSEB 3043 Phone: 416-736-2100 ext 77875 Course page: http://www.cs.yorku.ca/course/2001 9/6/2012 CSE

More information

Algorithm for Enumerating All Maximal Frequent Tree Patterns among Words in Tree-Structured Documents and Its Application

Algorithm for Enumerating All Maximal Frequent Tree Patterns among Words in Tree-Structured Documents and Its Application Algorithm for Enumerating All Maximal Frequent Tree Patterns among Words in Tree-Structured Documents and Its Application Tomoyuki Uchida and Kayo Kawamoto Faculty of Information Sciences, Hiroshima City

More information

Proof techniques (section 2.1)

Proof techniques (section 2.1) CHAPTER 1 Proof techniques (section 2.1) What we have seen so far: 1.1. Theorems and Informal proofs Argument: P 1 P n Q Syntax: how it's written Semantic: meaning in a given interpretation Valid argument:

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

Alan Bundy. Automated Reasoning LTL Model Checking

Alan Bundy. Automated Reasoning LTL Model Checking Automated Reasoning LTL Model Checking Alan Bundy Lecture 9, page 1 Introduction So far we have looked at theorem proving Powerful, especially where good sets of rewrite rules or decision procedures have

More information

Fuzzy Propositional Logic for the Knowledge Representation

Fuzzy Propositional Logic for the Knowledge Representation Fuzzy Propositional Logic for the Knowledge Representation Alexander Savinov Institute of Mathematics Academy of Sciences Academiei 5 277028 Kishinev Moldova (CIS) Phone: (373+2) 73-81-30 EMAIL: 23LSII@MATH.MOLDOVA.SU

More information

An Approach to Backward Chaining in Xcerpt

An Approach to Backward Chaining in Xcerpt INSTITUT FÜR INFORMATIK Lehr- und Forschungseinheit für Programmier- und Modellierungssprachen Oettingenstraße 67 D 80538 München An Approach to Backward Chaining in Xcerpt Andreas Schroeder Projektarbeit

More information

COSE312: Compilers. Lecture 2 Lexical Analysis (1)

COSE312: Compilers. Lecture 2 Lexical Analysis (1) COSE312: Compilers Lecture 2 Lexical Analysis (1) Hakjoo Oh 2017 Spring Hakjoo Oh COSE312 2017 Spring, Lecture 2 March 12, 2017 1 / 15 Lexical Analysis ex) Given a C program float match0 (char *s) /* find

More information

Theory of Computation

Theory of Computation Theory of Computation (Feodor F. Dragan) Department of Computer Science Kent State University Spring, 2018 Theory of Computation, Feodor F. Dragan, Kent State University 1 Before we go into details, what

More information

Inferring a Relax NG Schema from XML Documents

Inferring a Relax NG Schema from XML Documents Inferring a Relax NG Schema from XML Documents Guen-Hae Kim* Sang-Ki Ko Yo-Sub Han Department of Computer Science Yonsei University 10th International Conference on Language and Automata Theory and Application

More information

Chapter 0 Introduction. Fourth Academic Year/ Elective Course Electrical Engineering Department College of Engineering University of Salahaddin

Chapter 0 Introduction. Fourth Academic Year/ Elective Course Electrical Engineering Department College of Engineering University of Salahaddin Chapter 0 Introduction Fourth Academic Year/ Elective Course Electrical Engineering Department College of Engineering University of Salahaddin October 2014 Automata Theory 2 of 22 Automata theory deals

More information

Mechanized Operational Semantics

Mechanized Operational Semantics Mechanized Operational Semantics J Strother Moore Department of Computer Sciences University of Texas at Austin Marktoberdorf Summer School 2008 (Lecture 5: Boyer-Moore Fast String Searching) 1 The Problem

More information

Introducing GIS analysis

Introducing GIS analysis 1 Introducing GIS analysis GIS analysis lets you see patterns and relationships in your geographic data. The results of your analysis will give you insight into a place, help you focus your actions, or

More information

KLMLean 2.0: a Theorem Prover for KLM Logics of Nonmonotonic Reasoning

KLMLean 2.0: a Theorem Prover for KLM Logics of Nonmonotonic Reasoning KLMLean 2.0: a Theorem Prover for KLM Logics of Nonmonotonic Reasoning Laura Giordano*, Valentina Gliozzi, and Gian Luca Pozzato * Dip. di Informatica - Univ. del Piemonte Orientale A. Avogadro - Alessandria

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

Research Collection. JSONiq on Spark. Master Thesis. ETH Library. Author(s): Irimescu, Stefan. Publication Date: 2018

Research Collection. JSONiq on Spark. Master Thesis. ETH Library. Author(s): Irimescu, Stefan. Publication Date: 2018 Research Collection Master Thesis JSONiq on Spark Author(s): Irimescu, Stefan Publication Date: 2018 Permanent Link: https://doi.org/10.3929/ethz-b-000272416 Rights / License: In Copyright - Non-Commercial

More information