-+ - 1 -PathLP26/09/2011 - Student: Igal Khitron. Advisors: Mira Balaban, Michael Kifer, Stony Brook University, NY, USA. Computer Science Department,

Slides:



Advertisements
Similar presentations
Artificial Intelligence: Natural Language and Prolog
Advertisements

Semantics Static semantics Dynamic semantics attribute grammars
Introduction to Prolog, cont’d Lecturer: Xinming (Simon) Ou CIS 505: Programming Languages Fall 2010 Kansas State University 1.
C O N T E X T - F R E E LANGUAGES ( use a grammar to describe a language) 1.
PathLP – Path-based Logic Programming Mira Balaban, Igal Khitron Computer Science Department Ben-Gurion University Mini-project-course Fall
CHAPTER 1: AN OVERVIEW OF COMPUTERS AND LOGIC. Objectives 2  Understand computer components and operations  Describe the steps involved in the programming.
1 Ontology Language Comparisons doug foxvog 16 September 2004.
CS 355 – Programming Languages
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 330 Programming Language Structures Ch.2: Syntax and Semantics Fall 2005.
© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming The software development method algorithms.
Comp 205: Comparative Programming Languages Semantics of Imperative Programming Languages denotational semantics operational semantics logical semantics.
General Computer Science for Engineers CISC 106 Lecture 21 Dr. John Cavazos Computer and Information Sciences 04/10/2009.
Proof System HY-566. Proof layer Next layer of SW is logic and proof layers. – allow the user to state any logical principles, – computer can to infer.
Programming Language Semantics Mooly SagivEran Yahav Schrirber 317Open space html://
Programming Languages Structure
Semantics with Applications Mooly Sagiv Schrirber html:// Textbooks:Winskel The.
Functional programming: LISP Originally developed for symbolic computing First interactive, interpreted language Dynamic typing: values have types, variables.
Programming Logic and Design, Introductory, Fourth Edition1 Understanding Computer Components and Operations (continued) A program must be free of syntax.
PRE-PROGRAMMING PHASE
New Mexico Computer Science For All More Looping in NetLogo Maureen Psaila-Dombrowski.
Python Mini-Course University of Oklahoma Department of Psychology Day 1 – Lesson 2 Fundamentals of Programming Languages 4/5/09 Python Mini-Course: Day.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 7 Mälardalen University 2010.
Formal Models of Computation Part II The Logic Model
(1.1) COEN 171 Programming Languages Winter 2000 Ron Danielson.
CIS Computer Programming Logic
Created by, Author Name, School Name—State FLUENCY WITH INFORMATION TECNOLOGY Skills, Concepts, and Capabilities.
Hello World 2 What does all that mean?.
Chapter 1 Introduction Dr. Frank Lee. 1.1 Why Study Compiler? To write more efficient code in a high-level language To provide solid foundation in parsing.
CISC 471 First Exam Review Game Questions. Overview 1 Draw the standard phases of a compiler for compiling a high level language to machine code, showing.
Interpretation Environments and Evaluation. CS 354 Spring Translation Stages Lexical analysis (scanning) Parsing –Recognizing –Building parse tree.
Property of Jack Wilson, Cerritos College1 CIS Computer Programming Logic Programming Concepts Overview prepared by Jack Wilson Cerritos College.
CS 153: Concepts of Compiler Design September 16 Class Meeting Department of Computer Science San Jose State University Fall 2015 Instructor: Ron Mak
Formal Semantics of Programming Languages 虞慧群 Topic 1: Introduction.
Review, Pseudocode, Flow Charting, and Storyboarding.
3.2 Semantics. 2 Semantics Attribute Grammars The Meanings of Programs: Semantics Sebesta Chapter 3.
Syntax and Semantics CIS 331 Syntax: the form or structure of the expressions, statements, and program units. Semantics: the meaning of the expressions,
Milos Hauskrecht (PDF) Hieu D. Vu (PPT) LISP PROGARMMING LANGUAGE.
How to Program? -- Part 1 Part 1: Problem Solving –Analyze a problem –Decide what steps need to be taken to solve it. –Take into consideration any special.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
Types and Programming Languages Lecture 11 Simon Gay Department of Computing Science University of Glasgow 2006/07.
Grammar Set of variables Set of terminal symbols Start variable Set of Production rules.
C Sc 132 Computing Theory Professor Meiliu Lu Computer Science Department.
Done By :- -Nesreen Basem -Sara nabil -Rawan Prolog Program.
1 Authorization Sec PAL: A Decentralized Authorization Language.
CS 404Ahmed Ezzat 1 CS 404 Introduction to Compiler Design Lecture 1 Ahmed Ezzat.
Programming Languages Concepts Chapter 1: Programming Languages Concepts Lecture # 4.
Java Programming Fifth Edition Chapter 1 Creating Your First Java Classes.
CS 154 Formal Languages and Computability March 22 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
Functional Programming
CS 153: Concepts of Compiler Design September 14 Class Meeting
Why Study Automata Theory and Formal Languages?
Why Study Automata? What the Course is About Administrivia
Programming Languages
Chapter 1 Introduction.
Lexical and Syntax Analysis
CS 326 Programming Languages, Concepts and Implementation
Research topics: Mira Balaban
Representation, Syntax, Paradigms, Types
CS 326 Programming Languages, Concepts and Implementation
Chapter 1 Introduction.
Chapter 2 – Getting Started
Use of Mathematics using Technology (Maltlab)
Programming Languages 2nd edition Tucker and Noonan
Representation, Syntax, Paradigms, Types
SSEA Computer Science: Track A
Representation, Syntax, Paradigms, Types
Functional Programming and Haskell
COMPILER CONSTRUCTION
COP 4620 / 5625 Programming Language Translation / Compiler Writing Fall 2003 Lecture 2, 09/04/2003 Prof. Roy Levow.
Functional Programming and Haskell
Presentation transcript:

PathLP26/09/ Student: Igal Khitron. Advisors: Mira Balaban, Michael Kifer, Stony Brook University, NY, USA. Computer Science Department, Ben-Gurion University of the Negev. Path oriented Logic Programming Language

PathLP26/09/2011 Models as program abstractions, could be huge. Ability to write a model as a programming code. To run queries about this code. To find an exact place and description of error. To fix and just recompile the code. MOTIVATION

PathLP26/09/2011 New Programming Language. Model terms (intersection, closure, disjoint, singleton). The language will support many types of models. F-OML – F-LOGIC (Kifer and Lausen, 1989) based Object Modeling Language. Top layer of PathLP (only PathLP syntax). Logic PathLP as a regular Logic programming language. SOLUTION

PathLP26/09/2011 Path Expression as the main structure. John.spouse.brother[?x -3.a.8[collect(4, 5, ?y, ?_, ‘^^p’(3, a))] John brother spouse sun brother spouse sister sun ?y Susan friend, Susan.friend sun ?y PATHLP SYNTAX ?y ?x Mary ?x ].sun[?y].

PathLP26/09/2011 Type path expression. person!spouse[person]{0..2} Membership. Bob:male. Subtype. female::person. Logic equality. Fact. John.spouse[Mary]. Rule. ?x.sonOf[?y] :- ?x.childOf[?y], ?x:male. Query: ?- ?x:person, ?x.ageof(2003)[?age], ?age>20. PATHLP SYNTAX – CONT’D

PathLP26/09/2011 Describe forbidden states. !- ?x.prop1[?y], ?y > 10. System stability check process. All deviations are printed. Cardinality constraints. {3..*} CONSTRAINTS

PathLP26/09/2011 Prolog as Logic language platform. Problem: reasoning order. Tabling prolog. Memoization. Infinite loops avoidance. Left Recursion. XSB (David Warren and others, including Kifer). 3-valued logic (true, undefined, false). Prolog as ultimate compiler language – DCG. IMPLEMENTATION 12 minregularfib(46) tabledfib(92) linearfib(92) 0.06 millisec 0.01 millisec

PathLP26/09/2011 Grammar as pure programming code. delimiter --> "\n"; "\t"; " ". Non context free grammar. digit(X) --> [Y], {X is Y - 48, X >= 0, X =< 9}. stateS(neg_num(X)) --> "-", stateS(nonneg_num(Y)), {X is -Y}. stateS(nonneg_num(X)) --> digit(Y), stateS(nonneg_num(Z)), {X is Y * 10 + Z}. stateS(nonneg_num(X)) --> digit(X). Pushdown automata support. DCG – DEFINITE CLAUSE GRAMMAR | ?- stateS(X,"-12e+4", Y). X = neg_num(-12) Y = [101,43,52] delimiter -> “\n” | “\t” | “ “ digit -> [0-9] S -> neg_num | nonneg_num neg_num -> ‘-’ nonneg_num nonneg_num -> digit+

PathLP26/09/2011 Interpreter ActionShell FULL LINUX KDE WORKING ENVIRONMENT

PathLP26/09/2011 ?- file(?x).inode[?i], file(?y).inode[?i], ?x < ?y. !- ?x:filetype, ?x.name[?name], \ \+ ?x.fullpath[[?name|?]]. ?x:int :- ?x >= 0. filetype!size[int]{1..1}. 'regular file'::plain. 'regular empty file'::plain. plain::filetype. 'symbolic link'::filetype. Regular checks. Huge test case. University CS Linux file system part (O:) – 200,000 facts (about 15 for each file). Name, size, permissions... Path and last change as lists. Type expressions, rules, constraints and queries about the file system correctness. RUNTIMEACTION 8 minutes≈Compilation 0.1 seconds ≈Reload 0.8 seconds ≈Stability & queries – O(n) 10 seconds <Stability & queries – O(n 3 ) TESTS

PathLP26/09/2011 All Prolog and XSB abilities. Linux executables. Multifile. Full preprocessor: #define, #include, #if, #ifdef, #eval, #exec... Improved list library. Difference and infinite lists can be treated. Special _size property - counts all outgoing edges of the same kind. Command line program (with history) and multiply arguments. PROJECT FEATURES

PathLP26/09/2011 This works, but it’s not enough. We’re going to develop the PathLP. (For example, module spaces or libraries support.) We’ll start with F-OML building. We’ll rest on our laurels. PathLP domain: pathlp.sf.net.pathlp.sf.net Project site: SUMMARY

MENU 12. Summary. 11. Features. 10. Tests. 9. KDE. 8. DCG. 7. Implementation. 6. Constraints. 5. Syntax Syntax Solution. 2. Motivation. 1. Title.