PSOA2TPTP: A Reference Translator for Interoperating PSOA RuleML with TPTP Reasoners
|
|
- Isabel James
- 6 years ago
- Views:
Transcription
1 1 / 29 PSOA2TPTP: A Reference Translator for Interoperating PSOA RuleML with TPTP Reasoners Gen Zou 1 Reuben Peter-Paul 1 Harold Boley 1,2 Alexandre Riazanov 3 1 Faculty of Computer Science, University of New Brunswick, Fredericton, Canada 2 National Research Council Canada, Information and Communications Technologies 3 Department of Computer Science & Applied Statistics University of New Brunswick, Saint John, Canada
2 2 / 29 Outline
3 3 / 29 Outline
4 Interoperation Source PSOA RuleML Integrates relational and object-oriented modeling Generalizes RIF-BLD, F-logic and POSL Uses positional-slotted object-applicative (psoa) terms General case: o # f([t 1,1... t 1,n1 ]... [t m,1... t m,nm ] p 1->v 1... p k->v k) Special cases: o # f(t 1... t n p 1->v 1... p k->v k) o # f(t 1... t n) o # f( p 1->v 1... p k->v k) o # f 4 / 29
5 PSOA Example in Presentation Syntax (PS) 5 / 29 Document( Group ( Forall?Hu?Wi?Ch?o?1 (?o # _family(_child->?ch) :- And(?o # _family(_husb->?hu _wife->?wi)?1 # _kid(?wi?ch)) ) _f1 # _family(_husb->_joe _wife->_sue) _k1 # _kid(_sue _Pete) ) )
6 Interoperation Targets 6 / 29 TPTP s full First-Order Form (TPTP-FOF) Allows arbitrary first-order formulas Syntax and semantics Syntax Semantics Syntax Semantics ~p p v 1 = v 2 v 1 = v 2 p 1 & p 2 p 1 p 2 v 1!= v 2 ( v 1 = v 2 ) p 1 p 2 p 1 p 2?[v 1,..., v n ] : p v 1,..., v n : p p 1 => p 2 p 1 p 2![v 1,..., v n ] : p v 1,..., v n : p VampirePrime Open-source TPTP reasoner derived from the high-performance Vampire reasoner
7 7 / 29 Outline
8 Components and Workflow of PSOA2TPTP ANTLR: ANother Tool for Language Recognition ASO: Abstract Syntax Object 8 / 29
9 Workflow of ANTLR-Generated Components 9 / 29 AST: Abstract Syntax Tree (condensed tree encoding of the input stream)
10 10 / 29 Outline
11 11 / 29 Outline
12 12 / 29 Parser Grammar Rewriting ANTLR-generated parser uses LL (Left-to-right scanning, Leftmost derivation) mechanism The original EBNF grammar of PSOA/PS extended with syntactic sugar is non-ll and cannot be directly used as the ANTLR parser grammar We rewrite it into an LL(1) grammar, so that it not only can be accepted by ANTLR but is also more efficient Elimination of left recursion Left factoring
13 13 / 29 Parser Grammar Rewriting Elimination of left recursion example psoa : term '#' term ('(' tuples_and_slots ')')? term '(' tuples_and_slots ')' ; term : const var psoa external_term is rewritten to term : psoa non_psoa_term ; non_psoa_term : const var external_term ; psoa : non_psoa_term psoa_rest+ ;
14 14 / 29 Parser Grammar Rewriting Left factoring example tuples_and_slots: tuple* (term '->' term)* term+ (term '->' term)* ; is rewritten to tuples_and_slots: tuple+ (term '->' term)* term+ ('->' term (term '->' term)*)? ;
15 15 / 29 Outline
16 16 / 29 Normalization Static Tupribution and Slotribution Transform composite formulas into a conjunction of elementary constructs o # f([t 1,1... t 1,n1 ]... [t m,1... t m,nm ] p 1->v 1... p k->v k) = o # f() & o # Top(t 1,1... t 1,n1 ) &...& o # Top(t m,1... t m,nm ) & o # Top(p 1->v 1) &...& o # Top(p k->v k)
17 17 / 29 Translation of Elementary Constructs Terms Constants τ psoa (_C) = lc ( low line C) Variables τ psoa (?v) = Qv ( Question mark v) Tuple terms τ psoa (o # Top(t 1... t k )) = tupterm(τ psoa (o), τ psoa (t 1 )... τ psoa (t k )) Slot terms τ psoa (o # Top(p > v)) = sloterm(τ psoa (o), τ psoa (p), τ psoa (v)) Membership terms τ psoa (o # f()) = member(τ psoa (o), τ psoa (f))
18 18 / 29 Translation of Elementary Constructs Formulas Conjunction τ psoa (And(f 1... f n )) = (τ psoa (f 1 ) &... & τ psoa (f n )) Implication τ psoa (ϕ : ψ) = (τ psoa (ψ) => τ psoa (ϕ)) Existential Quantification τ psoa (Exists?v 1...?v n f) = (? [τ psoa (?v 1 )...τ psoa (?v n )] : τ psoa (f)) Universal Quantification τ psoa (Forall?v 1...?v n f) = (! [τ psoa (?v 1 )...τ psoa (?v n )] : τ psoa (f))
19 19 / 29 Translation of Queries Use reserved answer predicate ans to obtain the bindings for query variable?v i! [τ psoa(?v 1)...τ psoa(?v n)] : (τ psoa(q) => ans("?v 1 = ",τ psoa(?v 1),..., "?v n = ",τ psoa(?v n)))
20 20 / 29 Example Input Input knowledge base Document( Group ( Forall?Hu?Wi?Ch?o?1 (?o # _family(_child->?ch) :- And(?o # _family(_husb->?hu _wife->?wi)?1 # _kid(?wi?ch)) ) _f1 # _family(_husb->_joe _wife->_sue) _k1 # _kid(_sue _Pete) ) ) Query And(_f1 # _family(_husb->_joe _wife->_sue _child->?who) _k1 # _kid(_sue?who))
21 21 / 29 Example Normalization Normalized knowledge base Document( Group ( Forall?Hu?Wi?Ch?o?1 ( And(?o # _family()?o # Top(_child->?Ch)) :- And( And(?o # _family()?o # Top(_husb->?Hu)?o # Top(_wife->?Wi)) And(?1 # _kid()?1 # Top(?Wi?Ch))) ) _f1 # _family() _f1 # Top(_husb->_Joe) _f1 # Top(_wife->_Sue) _k1 # _kid() _k1 # Top(_Sue _Pete) ) )
22 22 / 29 Example Translation TPTP generated for knowledge base fof( ax01,axiom,(! [Q1,Qo,QCh,QWi,QHu] : ( ( member(qo,lfamily) & sloterm(qo,lwife,qwi) & sloterm(qo,lhusb,qhu) & member(q1,lkid) & tupterm(q1,qwi,qch) ) => ( member(qo,lfamily) & sloterm(qo,lchild,qch) ) ))). fof( ax02,axiom, ( member(f1,lfamily) & sloterm(f1,lwife,lsue) & sloterm(lf1,lhusb,ljoe) )). fof( ax03,axiom, ( member(lk1,lkid) & tupterm(k1,lsue,lpete) )).
23 23 / 29 Example Translation and Execution TPTP generated for query fof( query,theorem,(! [QWho] : ( ( member(f1,lfamily) & sloterm(f1,lwife,lsue) & sloterm(f1,lchild,qwho) & sloterm(f1,lhusb,ljoe) & member(lk1,lkid) & tupterm(lk1,lsue,qwho) ) => ans("?who = ",QWho) ) )). VampirePrime output Proof found «ans»("?who = ", lpete)...
24 24 / 29 Outline
25 25 / 29 PSOATransRun wraps PSOA2TPTP and VampirePrime into two REST services Translation: PSOA2TPTP Execution: VampirePrime Requests are sent via HTTP POST method Inputs and outputs are JSON-encoded strings Available online (documentation and system):
26 26 / 29 Outline
27 27 / 29 Summary We have implemented a first version of the PSOA2TPTP translator using the ANTLR v3 framework Thus provide a semantics-preserving translation from PSOA RuleML to TPTP PSOATransRun wraps PSOA2TPTP and VampirePrime into REST services for convenient access
28 28 / 29 Future Work Extend PSOA2TPTP capability to handle all PSOA RuleML constructs Implement the fully-aso-based translator Develop real-world Clinical Intelligence use case and others employing PSOATransRun
29 29 / 29 References Boley, H. A RIF-Style Semantics for RuleML-Integrated Positional-Slotted, Object-Applicative Rules In Bassiliades, N., Governatori, G., Paschke, A. (eds.) RuleML Europe, vol of LNCS, pp Springer, Zou, G., Peter-Paul, R., Boley, H. and Riazanov, A. PSOA2TPTP: A Reference Translator for Interoperating PSOA RuleML with TPTP Reasoners In: Bikakis, A., Giurca, A. (eds.) RuleML 2012, vol of LNCS, pp Springer, Al Manir, M.S., Riazanov, A., Boley, H. and Baker, C.J.O. PSOA RuleML API: A Tool for Processing Abstract and Concrete Syntaxes In: Bikakis, A., Giurca, A. (eds.) RuleML 2012, vol of LNCS, pp Springer, 2012.
PSOATransRun: Translating and Running PSOA RuleML via the TPTP Interchange Language for Theorem Provers
PSOATransRun: Translating and Running PSOA RuleML via the TPTP Interchange Language for Theorem Provers Gen Zou 1, Reuben Peter-Paul 1, Harold Boley 1,2, and Alexandre Riazanov 3 1 Faculty of Computer
More informationPSOA RuleML API: A Tool for Processing Abstract and Concrete Syntaxes
: A Tool for Processing Abstract and Concrete Syntaxes Mohammad 1 Alexandre Riazanov 1 Harold Boley 2 Christopher J.O. Baker 1 1 Department of Computer Science and Applied Statistics University of New
More informationPSOA2Prolog: Object-Relational Rule Interoperation and Implementation by Translation from PSOA RuleML to ISO Prolog
1 / 33 PSOA2Prolog: Object-Relational Rule Interoperation and Implementation by Translation from PSOA RuleML to ISO Prolog The 9th International Web Rule Symposium, RuleML 2015 August 2-5, 2015 Gen Zou
More informationPSOA-to-TPTP Converter Documentation
PSOA-to-TPTP Converter Documentation Release 1.0.0 Reuben Peter-Paul, Gen Zou November 07, 2011 CONTENTS 1 Proposal for PSOA-to-TPTP Converter 1 1.1 Introduction...............................................
More informationPSOA2Prolog: Object-Relational Rule Interoperation and Implementation by Translation from PSOA RuleML to ISO Prolog
PSOA2Prolog: Object-Relational Rule Interoperation and Implementation by Translation from PSOA RuleML to ISO Prolog Gen Zou, Harold Boley Faculty of Computer Science, University of New Brunswick, Fredericton,
More informationPSOA RuleML Integration of Relational and Object-Centered Geospatial Data
PSOA RuleML Integration of Relational and Object-Centered Geospatial Data Gen Zou Faculty of Computer Science, University of New Brunswick, Fredericton, Canada gen.zou@unb.ca Abstract. In recent years,
More informationA RIF-Style Semantics for RuleML-Integrated Positional-Slotted, Object-Applicative Rules
A RIF-Style Semantics for RuleML-Integrated Positional-Slotted, Object-Applicative Rules Harold Boley Institute for Information Technology National Research Council of Canada Fredericton, NB, E3B 9W4,
More informationRIF RuleML Rosetta Ring: Round-Tripping the Dlex Subset of Datalog RuleML and RIF-Core
RIF RuleML Rosetta Ring: Round-Tripping the Dlex Subset of Datalog RuleML and RIF-Core The International RuleML Symposium on Rule Interchange and Applications Las Vegas, Nevada, USA, Nov 5-7, 2009 Harold
More informationPSOA RuleML: Integrated Object-Relational Data and Rules
PSOA RuleML: Integrated Object-Relational Data and Rules Harold Boley Faculty of Computer Science, University of New Brunswick, Fredericton, Canada harold[dt]boley[at]unb[dt]ca Abstract. Object-relational
More informationHarold Boley. Faculty of Computer Science, University of New Brunswick, Canada
PSOA RuleML: Integrated Object-Relational Data and Rules (Long version: http://www.cs.unb.ca/~boley/talks/psoaobjreldatarules-talk.pdf Search: "PSOA RuleML"; click: Contents "References"; get: 7.... Slides)
More informationThe RuleML System of Families of Languages
T. Athan 1,3 H. Boley 2 A. Paschke 3 1 Athan Services (athant.com), West Lafayette, Indiana, USA 2 Faculty of Computer Science, University of New Brunswick, Fredericton, Canada 3 AG Corporate Semantic
More informationCOP 3402 Systems Software Top Down Parsing (Recursive Descent)
COP 3402 Systems Software Top Down Parsing (Recursive Descent) Top Down Parsing 1 Outline 1. Top down parsing and LL(k) parsing 2. Recursive descent parsing 3. Example of recursive descent parsing of arithmetic
More informationAdvanced Topics in the Semantic Web: Semantic Services for Business Process Management
Advanced Topics in the Semantic Web: Semantic Services for Business Process Management - Overview - Harold Boley Semantic Web Laboratory NRC-IIT and UNB-CS Fredericton, NB, Canada Course at the University
More informationSyntax. In Text: Chapter 3
Syntax In Text: Chapter 3 1 Outline Syntax: Recognizer vs. generator BNF EBNF Chapter 3: Syntax and Semantics 2 Basic Definitions Syntax the form or structure of the expressions, statements, and program
More informationW3C Rule Interchange Format
W3C Rule Interchange Format Christian de Sainte Marie Rule interchange Rules Rules serialize de-serial. Rules Rule system 1 Data model (OWL, RDF, XML-S, XMI, ) Rule system 2 Data serialize
More informationRIF Production Rule Dialect W3C Proposed Recommendation 11 May 2010
RIF Production Rule Dialect W3C Proposed Recommendation 11 May 2010 This version: Latest version: http://www.w3.org/tr/rif-prd/ Previous version: http://www.w3.org/tr/2010/wd-rif-prd-20100211/ (color-coded
More informationCSE 413 Languages & Implementation. Hal Perkins Winter 2019 Structs, Implementing Languages (credits: Dan Grossman, CSE 341)
CSE 413 Languages & Implementation Hal Perkins Winter 2019 Structs, Implementing Languages (credits: Dan Grossman, CSE 341) 1 Goals Representing programs as data Racket structs as a better way to represent
More informationSyntax Analysis. Martin Sulzmann. Martin Sulzmann Syntax Analysis 1 / 38
Syntax Analysis Martin Sulzmann Martin Sulzmann Syntax Analysis 1 / 38 Syntax Analysis Objective Recognize individual tokens as sentences of a language (beyond regular languages). Example 1 (OK) Program
More informationLL(k) Parsing. Predictive Parsers. LL(k) Parser Structure. Sample Parse Table. LL(1) Parsing Algorithm. Push RHS in Reverse Order 10/17/2012
Predictive Parsers LL(k) Parsing Can we avoid backtracking? es, if for a given input symbol and given nonterminal, we can choose the alternative appropriately. his is possible if the first terminal of
More informationThe RuleML Family of Web Rule Languages
The RuleML Family of Web Rule Languages PPSWR 06, Budva, Montenegro, 10 June 2006 Revised, RuleML 06, Athens, GA, 11 Nov. 2006 Shortened, Vienna, SWT Course, 17 Nov. 2008 Harold Boley University of New
More informationImproving Query Plans. CS157B Chris Pollett Mar. 21, 2005.
Improving Query Plans CS157B Chris Pollett Mar. 21, 2005. Outline Parse Trees and Grammars Algebraic Laws for Improving Query Plans From Parse Trees To Logical Query Plans Syntax Analysis and Parse Trees
More informationBuilding Compilers with Phoenix
Building Compilers with Phoenix Parser Generators: ANTLR History of ANTLR ANother Tool for Language Recognition Terence Parr's dissertation: Obtaining Practical Variants of LL(k) and LR(k) for k > 1 PCCTS:
More informationRIF Production Rule Dialect W3C Editor's Draft 9 June 2009
RIF Production Rule Dialect W3C Editor's Draft 9 June 2009 This version: Latest editor's draft: http://www.w3.org/2005/rules/wg/draft/rif-prd/ Editors: Christian de Sainte Marie, ILOG Adrian Paschke, Freie
More informationGrailog 1.0: Graph-Logic Visualization of Ontologies and Rules
Grailog 1.0: Graph-Logic Visualization of Ontologies and Rules Harold Boley National Research Council, Security and Disruptive Technologies University of New Brunswick, Faculty of Computer Science Fredericton,
More informationIndex. Comma-separated values (CSV), 30 Conditional expression, 16 Continuous integration (CI), 34 35, 41 Conway s Law, 75 CurrencyPair class,
A AbstractBitmap, 199 Abstract syntax tree (AST) pattern, 116 heterogeneous, 119 homogenous, 116 119 irregular heterogeneous, 119 normalized heterogeneous, 118 Account type, 165 Android Studio, 140 142,
More informationCOP 3402 Systems Software Syntax Analysis (Parser)
COP 3402 Systems Software Syntax Analysis (Parser) Syntax Analysis 1 Outline 1. Definition of Parsing 2. Context Free Grammars 3. Ambiguous/Unambiguous Grammars Syntax Analysis 2 Lexical and Syntax Analysis
More informationHOL DEFINING HIGHER ORDER LOGIC LAST TIME ON HOL CONTENT. Slide 3. Slide 1. Slide 4. Slide 2 WHAT IS HIGHER ORDER LOGIC? 2 LAST TIME ON HOL 1
LAST TIME ON HOL Proof rules for propositional and predicate logic Safe and unsafe rules NICTA Advanced Course Forward Proof Slide 1 Theorem Proving Principles, Techniques, Applications Slide 3 The Epsilon
More informationCOMPUTATIONAL SEMANTICS WITH FUNCTIONAL PROGRAMMING JAN VAN EIJCK AND CHRISTINA UNGER. lg Cambridge UNIVERSITY PRESS
COMPUTATIONAL SEMANTICS WITH FUNCTIONAL PROGRAMMING JAN VAN EIJCK AND CHRISTINA UNGER lg Cambridge UNIVERSITY PRESS ^0 Contents Foreword page ix Preface xiii 1 Formal Study of Natural Language 1 1.1 The
More informationWellnessRules2: Supporting Social Semantic Wellness Communities with Rule Responder
WellnessRules2: Supporting Social Semantic Wellness Communities with Rule Responder Harold Boley, Taylor Osmun, Derek Smith Institute for Information Technology, National Research Council, Canada Fredericton,
More informationRIF Basic Logic Dialect W3C Editor's Draft 18 December 2008
RIF Basic Logic Dialect W3C Editor's Draft 18 December 2008 This version: Latest editor's draft: http://www.w3.org/2005/rules/wg/draft/rif-bld/ Previous version: http://www.w3.org/2005/rules/wg/draft/ed-rif-bld-20080922/
More informationSystem Description: iprover An Instantiation-Based Theorem Prover for First-Order Logic
System Description: iprover An Instantiation-Based Theorem Prover for First-Order Logic Konstantin Korovin The University of Manchester School of Computer Science korovin@cs.man.ac.uk Abstract. iprover
More informationMIDTERM EXAM (Solutions)
MIDTERM EXAM (Solutions) Total Score: 100, Max. Score: 83, Min. Score: 26, Avg. Score: 57.3 1. (10 pts.) List all major categories of programming languages, outline their definitive characteristics and
More informationChapter 3: Describing Syntax and Semantics. Introduction Formal methods of describing syntax (BNF)
Chapter 3: Describing Syntax and Semantics Introduction Formal methods of describing syntax (BNF) We can analyze syntax of a computer program on two levels: 1. Lexical level 2. Syntactic level Lexical
More informationIntegrating Positional and Slotted Knowledge on the Semantic Web
Integrating Positional and Slotted Knowledge on the Semantic Web Harold Boley Semantic Web Laboratory Institute for Information Technology e-business, National Research Council of Canada Fredericton, NB,
More informationParsing Combinators: Introduction & Tutorial
Parsing Combinators: Introduction & Tutorial Mayer Goldberg October 21, 2017 Contents 1 Synopsis 1 2 Backus-Naur Form (BNF) 2 3 Parsing Combinators 3 4 Simple constructors 4 5 The parser stack 6 6 Recursive
More informationKalliopi Kravari 1, Konstantinos Papatheodorou 2, Grigoris Antoniou 2 and Nick Bassiliades 1
Kalliopi Kravari 1, Konstantinos Papatheodorou 2, Grigoris Antoniou 2 and Nick Bassiliades 1 1 Dept. of Informatics, Aristotle University of Thessaloniki, Greece 2 Institute of Computer Science, FORTH,
More informationData Integration: Logic Query Languages
Data Integration: Logic Query Languages Jan Chomicki University at Buffalo Datalog Datalog A logic language Datalog programs consist of logical facts and rules Datalog is a subset of Prolog (no data structures)
More informationProseminar on Semantic Theory Fall 2013 Ling 720 An Algebraic Perspective on the Syntax of First Order Logic (Without Quantification) 1
An Algebraic Perspective on the Syntax of First Order Logic (Without Quantification) 1 1. Statement of the Problem, Outline of the Solution to Come (1) The Key Problem There is much to recommend an algebraic
More informationProgramming Language Syntax and Analysis
Programming Language Syntax and Analysis 2017 Kwangman Ko (http://compiler.sangji.ac.kr, kkman@sangji.ac.kr) Dept. of Computer Engineering, Sangji University Introduction Syntax the form or structure of
More informationExpressive Querying of Semantic Databases with Incremental Query Rewriting
Expressive Querying of Semantic Databases with Incremental Query Rewriting Alexandre Riazanov, UNB Saint John joint work with Marcelo A. T. Aragão, Manchester Univ. and Central Bank of Brazil AWOSS 10.2,
More informationA Review and Comparison of Rule Languages and Rule-based Inference Engines for the Semantic Web
A Review and Comparison of and -based Inference Engines for the Semantic Web Thanyalak Rattanasawad, Kanda Runapongsa Saikaew Department of Computer Engineering, Faculty of Engineering, Khon Kaen University,
More informationSyntax-Directed Translation. Lecture 14
Syntax-Directed Translation Lecture 14 (adapted from slides by R. Bodik) 9/27/2006 Prof. Hilfinger, Lecture 14 1 Motivation: parser as a translator syntax-directed translation stream of tokens parser ASTs,
More informationBetter Extensibility through Modular Syntax. Robert Grimm New York University
Better Extensibility through Modular Syntax Robert Grimm New York University Syntax Matters More complex syntactic specifications Extensions to existing programming languages Transactions, event-based
More informationIntroduction to Parsing
Introduction to Parsing The Front End Source code Scanner tokens Parser IR Errors Parser Checks the stream of words and their parts of speech (produced by the scanner) for grammatical correctness Determines
More informationTHE COMPILATION PROCESS EXAMPLE OF TOKENS AND ATTRIBUTES
THE COMPILATION PROCESS Character stream CS 403: Scanning and Parsing Stefan D. Bruda Fall 207 Token stream Parse tree Abstract syntax tree Modified intermediate form Target language Modified target language
More informationFormal Predicate Calculus. Michael Meyling
Formal Predicate Calculus Michael Meyling May 24, 2013 2 The source for this document can be found here: http://www.qedeq.org/0_04_07/doc/math/qedeq_formal_logic_v1.xml Copyright by the authors. All rights
More informationWellnessRules: The Activity Rule Responder
WellnessRules: The Activity Rule Responder Taylor Michael Osmun, Benjamin Larry Craig, and Harold Boley Institute for Information Technology National Research Council of Canada Fredericton, NB, E3B 9W4,
More informationTheorem proving. PVS theorem prover. Hoare style verification PVS. More on embeddings. What if. Abhik Roychoudhury CS 6214
Theorem proving PVS theorem prover Abhik Roychoudhury National University of Singapore Both specification and implementation can be formalized in a suitable logic. Proof rules for proving statements in
More informationDescribing Syntax and Semantics
Describing Syntax and Semantics Introduction Syntax: the form or structure of the expressions, statements, and program units Semantics: the meaning of the expressions, statements, and program units Syntax
More informationFormal Semantics. Chapter Twenty-Three Modern Programming Languages, 2nd ed. 1
Formal Semantics Chapter Twenty-Three Modern Programming Languages, 2nd ed. 1 Formal Semantics At the beginning of the book we saw formal definitions of syntax with BNF And how to make a BNF that generates
More informationComp 411 Principles of Programming Languages Lecture 7 Meta-interpreters. Corky Cartwright January 26, 2018
Comp 411 Principles of Programming Languages Lecture 7 Meta-interpreters Corky Cartwright January 26, 2018 Denotational Semantics The primary alternative to syntactic semantics is denotational semantics.
More informationCMSC 330: Organization of Programming Languages
CMSC 330: Organization of Programming Languages Context Free Grammars 1 Architecture of Compilers, Interpreters Source Analyzer Optimizer Code Generator Abstract Syntax Tree Front End Back End Compiler
More informationDecision CAMP 2014, Oct , 2014, PayPal, San Jose, CA
Decision CAMP 2014, Oct. 13 15, 2014, PayPal, San Jose, CA Introduction: Objects & Decisions RuleML decision rules are object-centered in multiple ways Decision languages configurable from desired properties
More informationRuleML 1.02: Deliberation, Reaction, and Consumer Families
RuleML 1.02: Deliberation, Reaction, and Consumer Families Tara Athan 1 Harold Boley 2 Adrian Paschke 3 1 Athan Services (athant.com), West Lafayette, Indiana, USA taraathan@gmail.com 2 Faculty of Computer
More informationJavaCC Parser. The Compilation Task. Automated? JavaCC Parser
JavaCC Parser The Compilation Task Input character stream Lexer stream Parser Abstract Syntax Tree Analyser Annotated AST Code Generator Code CC&P 2003 1 CC&P 2003 2 Automated? JavaCC Parser The initial
More informationHarvesting RDF triples
Harvesting RDF triples Joe Futrelle Natioanl Center for Supercomputing Applications 1205 W. Clark St., Urbana IL 61801, US futrelle@ncsa.uiuc.edu Abstract. Managing scientific data requires tools that
More informationStructure of Abstract Syntax trees for Colored Nets in PNML
Structure of Abstract Syntax trees for Colored Nets in PNML F. Kordon & L. Petrucci Fabrice.Kordon@lip6.fr Laure.Petrucci@lipn.univ-paris13.fr version 0.2 (draft) June 26, 2004 Abstract Formalising the
More informationAbstract Syntax Trees & Top-Down Parsing
Abstract Syntax Trees & Top-Down Parsing Review of Parsing Given a language L(G), a parser consumes a sequence of tokens s and produces a parse tree Issues: How do we recognize that s L(G)? A parse tree
More informationAbstract Syntax Trees & Top-Down Parsing
Review of Parsing Abstract Syntax Trees & Top-Down Parsing Given a language L(G), a parser consumes a sequence of tokens s and produces a parse tree Issues: How do we recognize that s L(G)? A parse tree
More informationOutline. What is semantics? Denotational semantics. Semantics of naming. What is semantics? 2 / 21
Semantics 1 / 21 Outline What is semantics? Denotational semantics Semantics of naming What is semantics? 2 / 21 What is the meaning of a program? Recall: aspects of a language syntax: the structure of
More informationReasoning and Proofing Services for Semantic Web Agents
Proceedings of the Twenty-Second International Joint Conference on Artificial Intelligence Reasoning and Proofing Services for Semantic Web Agents Kalliopi Kravari 1, Konstantinos Papatheodorou 2, Grigoris
More information15-819M: Data, Code, Decisions
15-819M: Data, Code, Decisions 08: First-Order Logic André Platzer aplatzer@cs.cmu.edu Carnegie Mellon University, Pittsburgh, PA André Platzer (CMU) 15-819M/08: Data, Code, Decisions 1 / 40 Outline 1
More informationFusion of Event Stream and Background Knowledge for Semantic-Enabled Complex Event Processing
Fusion of Event Stream and Background Knowledge for Semantic-Enabled Complex Event Processing Challenge Paper Kia Teymourian, Malte Rohde, Ahmad Hasan, and Adrian Paschke Freie Universität Berlin Institute
More informationRIF Framework for Logic Dialects W3C Candidate Recommendation 1 October 2009
RIF Framework for Logic Dialects W3C Candidate Recommendation 1 October 2009 This version: Latest version: http://www.w3.org/tr/rif-fld/ Previous version: http://www.w3.org/tr/2009/wd-rif-fld-20090703/
More informationAbstract Syntax Trees & Top-Down Parsing
Review of Parsing Abstract Syntax Trees & Top-Down Parsing Given a language L(G), a parser consumes a sequence of tokens s and produces a parse tree Issues: How do we recognize that s L(G)? A parse tree
More informationCS415 Compilers. Syntax Analysis. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University
CS415 Compilers Syntax Analysis These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University Limits of Regular Languages Advantages of Regular Expressions
More informationCMSC 330: Organization of Programming Languages
CMSC 330: Organization of Programming Languages Context Free Grammars 1 Architecture of Compilers, Interpreters Source Analyzer Optimizer Code Generator Abstract Syntax Tree Front End Back End Compiler
More informationLogic Programming with Satisfiability
Under consideration for publication in Theory and Practice of Logic Programming 1 Logic Programming with Satisfiability MICHAEL CODISH Department of Computer Science, Ben-Gurion University, Israel (e-mail:
More informationDerivations vs Parses. Example. Parse Tree. Ambiguity. Different Parse Trees. Context Free Grammars 9/18/2012
Derivations vs Parses Grammar is used to derive string or construct parser Context ree Grammars A derivation is a sequence of applications of rules Starting from the start symbol S......... (sentence)
More informationData Abstraction. An Abstraction for Inductive Data Types. Philip W. L. Fong.
Data Abstraction An Abstraction for Inductive Data Types Philip W. L. Fong pwlfong@cs.uregina.ca Department of Computer Science University of Regina Regina, Saskatchewan, Canada Introduction This lecture
More informationChapter 2 & 3: Representations & Reasoning Systems (2.2)
Chapter 2 & 3: A Representation & Reasoning System & Using Definite Knowledge Representations & Reasoning Systems (RRS) (2.2) Simplifying Assumptions of the Initial RRS (2.3) Datalog (2.4) Semantics (2.5)
More informationUNIT I Programming Language Syntax and semantics. Kainjan Sanghavi
UNIT I Programming Language Syntax and semantics B y Kainjan Sanghavi Contents Language Definition Syntax Abstract and Concrete Syntax Concept of binding Language Definition Should enable a person or computer
More informationTheoretical Part. Chapter one:- - What are the Phases of compiler? Answer:
Theoretical Part Chapter one:- - What are the Phases of compiler? Six phases Scanner Parser Semantic Analyzer Source code optimizer Code generator Target Code Optimizer Three auxiliary components Literal
More informationCS 403: Scanning and Parsing
CS 403: Scanning and Parsing Stefan D. Bruda Fall 2017 THE COMPILATION PROCESS Character stream Scanner (lexical analysis) Token stream Parser (syntax analysis) Parse tree Semantic analysis Abstract syntax
More informationEDAN65: Compilers, Lecture 04 Grammar transformations: Eliminating ambiguities, adapting to LL parsing. Görel Hedin Revised:
EDAN65: Compilers, Lecture 04 Grammar transformations: Eliminating ambiguities, adapting to LL parsing Görel Hedin Revised: 2017-09-04 This lecture Regular expressions Context-free grammar Attribute grammar
More informationThe DR-Prolog Tool Suite for Defeasible Reasoning and Proof Explanation in the Semantic Web
The DR-Prolog Tool Suite for Defeasible Reasoning and Proof Explanation in the Semantic Web Antonis Bikakis 1,2, Constantinos Papatheodorou 2, and Grigoris Antoniou 1,2 1 Institute of Computer Science,
More informationCMSC 330: Organization of Programming Languages. Context Free Grammars
CMSC 330: Organization of Programming Languages Context Free Grammars 1 Architecture of Compilers, Interpreters Source Analyzer Optimizer Code Generator Abstract Syntax Tree Front End Back End Compiler
More informationLOGIC AND DISCRETE MATHEMATICS
LOGIC AND DISCRETE MATHEMATICS A Computer Science Perspective WINFRIED KARL GRASSMANN Department of Computer Science University of Saskatchewan JEAN-PAUL TREMBLAY Department of Computer Science University
More informationarxiv: v1 [cs.pl] 30 Apr 2012
New developments in parsing Mizar Czesław Bylinski 1 and Jesse Alama 2 arxiv:1205.0170v1 [cs.pl] 30 Apr 2012 Center for Artificial Intelligence New University of Lisbon Portugal j.alama@fct.unl.pt Abstract.
More informationDatabase Languages and their Compilers
Database Languages and their Compilers Prof. Dr. Torsten Grust Database Systems Research Group U Tübingen Winter 2010 2010 T. Grust Database Languages and their Compilers 4 Query Normalization Finally,
More informationTDDD55- Compilers and Interpreters Lesson 3
TDDD55- Compilers and Interpreters Lesson 3 Zeinab Ganjei (zeinab.ganjei@liu.se) Department of Computer and Information Science Linköping University 1. Grammars and Top-Down Parsing Some grammar rules
More informationFormal Methods in Software Engineering 1
Logic Review First Order Logic Propositional Logic Summary Formal Methods in Software Engineering 1 Logic From Merriam-Webster Online, Logic is the science of the formal principles of reasoning. Mathematical
More informationFOL RuleML: Release, Use, and Outlook
FOL RuleML: Release, Use, and Outlook Harold Boley, Presenter NRC IIT e-business Joint Work with Benjamin Grosof and Said Tabet as part of the RuleML Initiative and Joint Committee DAML PI Meeting, San
More informationSyntax and Grammars 1 / 21
Syntax and Grammars 1 / 21 Outline What is a language? Abstract syntax and grammars Abstract syntax vs. concrete syntax Encoding grammars as Haskell data types What is a language? 2 / 21 What is a language?
More informationCourse Overview. Introduction (Chapter 1) Compiler Frontend: Today. Compiler Backend:
Course Overview Introduction (Chapter 1) Compiler Frontend: Today Lexical Analysis & Parsing (Chapter 2,3,4) Semantic Analysis (Chapter 5) Activation Records (Chapter 6) Translation to Intermediate Code
More informationCMSC 330: Organization of Programming Languages. Context Free Grammars
CMSC 330: Organization of Programming Languages Context Free Grammars 1 Architecture of Compilers, Interpreters Source Analyzer Optimizer Code Generator Abstract Syntax Tree Front End Back End Compiler
More informationMulti-agent and Semantic Web Systems: RDF Data Structures
Multi-agent and Semantic Web Systems: RDF Data Structures Fiona McNeill School of Informatics 31st January 2013 Fiona McNeill Multi-agent Semantic Web Systems: RDF Data Structures 31st January 2013 0/25
More informationThe Substitution Model
The Substitution Model Prof. Clarkson Fall 2017 Today s music: Substitute by The Who Review Previously in 3110: simple interpreter for expression language abstract syntax tree (AST) evaluation based on
More informationJASMINT: Language to User-Friendly AST with Emphasis on Transpilation. By: John Bradbury. Advisor: John Clements. Computer Science Department
JASMINT: Language to User-Friendly AST with Emphasis on Transpilation By: John Bradbury Advisor: John Clements Computer Science Department College of Engineering California Polytechnic State University,
More informationIntegrating Positional and Slotted Knowledge on the Semantic Web
Integrating Positional and Slotted Knowledge on the Semantic Web HAROLD BOLEY, NRC IIT Semantic Web Laboratory http://www.cs.unb.ca/~boley/ NRC/UNB Fredericton, 30 Sept. 2004 Human-Oriented POSL Machine-Oriented
More informationConstructive Coherent Translation of Propositional Logic
Constructive Coherent Translation of Propositional Logic JRFisher@cpp.edu (started: 2009, latest: January 18, 2016) Abstract Propositional theories are translated to coherent logic rules using what are
More informationCMSC 330: Organization of Programming Languages. Context Free Grammars
CMSC 330: Organization of Programming Languages Context Free Grammars 1 Architecture of Compilers, Interpreters Source Analyzer Optimizer Code Generator Abstract Syntax Tree Front End Back End Compiler
More informationA Bottom-up Strategy for Query Decomposition
A Bottom-up Strategy for Query Decomposition Le Thi Thu Thuy, Doan Dai Duong, Virendrakumar C. Bhavsar and Harold Boley Faculty of Computer Science, University of New Brunswick Fredericton, New Brunswick,
More informationFoundations of Databases
Foundations of Databases Relational Query Languages with Negation Free University of Bozen Bolzano, 2009 Werner Nutt (Slides adapted from Thomas Eiter and Leonid Libkin) Foundations of Databases 1 Queries
More informationCMPS 277 Principles of Database Systems. Lecture #4
CMPS 277 Principles of Database Systems http://www.soe.classes.edu/cmps277/winter10 Lecture #4 1 First-Order Logic Question: What is First-Order Logic? Answer: Informally, First-Order Logic = Propositional
More informationHarvesting RDF Triples
Harvesting RDF Triples Joe Futrelle National Center for Supercomputing Applications 1205 W. Clark St., Urbana IL 61801, US futrelle@uiuc.edu Abstract. Managing scientific data requires tools that can track
More informationRuleML 1.0. of Web Rules. Harold Boley, Adrian Paschke, and Omair Shafiq
RuleML 1.0 The Overarching Specification of Web Rules Harold Boley, Adrian Paschke, and Omair Shafiq NRC, FUB, and UoC Introduction Web Rules use various formats and packaging But semantics are often compatible
More informationSpoofax: An Extensible, Interactive Development Environment for Program Transformation with Stratego/XT
Spoofax: An Extensible, Interactive Development Environment for Program Transformation with Stratego/XT Karl Trygve Kalleberg 1 Department of Informatics, University of Bergen, P.O. Box 7800, N-5020 BERGEN,
More informationChapter 4. Abstract Syntax
Chapter 4 Abstract Syntax Outline compiler must do more than recognize whether a sentence belongs to the language of a grammar it must do something useful with that sentence. The semantic actions of a
More informationTable-Driven Top-Down Parsers
Table-Driven Top-Down Parsers Recursive descent parsers have many attractive features. They are actual pieces of code that can be read by programmers and extended. This makes it fairly easy to understand
More information