Done By :- -Nesreen Basem -Sara nabil -Rawan Prolog Program.

Slides:



Advertisements
Similar presentations
© Johan Bos Logic Programming About the course –Taught in English –Tuesday: mostly theory –Thursday: practical work [lab] Teaching material –Learn Prolog.
Advertisements

Computer Science CPSC 322 Lecture 25 Top Down Proof Procedure (Ch 5.2.2)
Software Development Languages and Environments. Programming languages High level languages are problem orientated contain many English words are easier.
Computational Models The exam. Models of computation. –The Turing machine. –The Von Neumann machine. –The calculus. –The predicate calculus. Turing.
1. An Overview of Prolog.
Artificial Intelligence Inference in first-order logic Fall 2008 professor: Luigi Ceccaroni.
Answer Set Programming Overview Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma de Guadalajara
CSE 425: Logic Programming I Logic and Programs Most programs use Boolean expressions over data Logic statements can express program semantics –I.e., axiomatic.
Introduction to Prolog What is Prolog? Application Areas of Prolog How does Prolog work? (Syntax of Prolog) Program Structure.
C. Varela; Adapted w/permission from S. Haridi and P. Van Roy1 Declarative Computation Model Defining practical programming languages Carlos Varela RPI.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
CPSC 322 Introduction to Artificial Intelligence September 20, 2004.
Overview of Programming Paradigms
© Patrick Blackburn, Johan Bos & Kristina Striegnitz Logic Programming About the course –Taught in English –Tuesday: mostly theory –Thursday: practical.
1 CILOG User Manual Bayesian Networks Seminar Sep 7th, 2006.
CHA2555 Week2: Knowledge Representation, Logic and Prolog Lee McCluskey First term:
1/25 Pointer Logic Changki PSWLAB Pointer Logic Daniel Kroening and Ofer Strichman Decision Procedure.
Computer Science and Software Engineering behind Blogging platforms and software Team ASU 101 for CS/CSE students.
Programming Languages
Languages and Environments Higher Computing Unit 2 – Software Development.
DEDUCTIVE DATABASE.
1 Software Development Topic 2 Software Development Languages and Environments.
PROLOG KAIST Gunwoo Park 1. What’s Prolog? 2  General purpose logic programming language  Declarative, which means that the program logic is.
Formal Models of Computation Part II The Logic Model
CSC 270 – Survey of Programming Languages Prolog Lecture 1 – Facts, Rules, and Queries.
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
Programming languages1 Programming paradigms Families of programming languages.
Higher Grade Computing Studies 2. Languages and Environments Higher Computing Software Development S. McCrossan 1 Classification of Languages 1. Procedural.
ProLog PROgramming in LOGic. Description of Prolog Prolog stands for PROgramming in LOGic. It is a nonprocedural and declarative language.
Expert System Development Tools Sean Lydon Daniel Nelson Emily Schwarz.
Logic Programming Module 2AIT202 Website Lecturer: Dave Sharp Room: AG15
ITEC 380 Organization of programming languages Lecture 7 – Prolog.
Artificial Intelligence Programming in Prolog Lecture 1: An Introduction 23/09/04.
Slide 1 Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs Jim Little UBC CS 322 – CSP October 20, 2014.
Programming Languages. A Logic Programming Language: Prolog This lesson describes the basic structures and functions of the logic programming language:
CS4026 Formal Models of Computation Part II The Logic Model Lecture 2 – Prolog: History and Introduction.
Prolog Kyle Marcotte. Outline What is Prolog? Origins of Prolog (History) Basic Tutorial TEST!!! (sort of…actually not really at all) My example Why Prolog?
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,
The AI War LISP and Prolog Basic Concepts of Logic Programming
Logical and Functional Programming
Introduction to Prolog. Outline What is Prolog? Prolog basics Prolog Demo Syntax: –Atoms and Variables –Complex Terms –Facts & Queries –Rules Examples.
Introduction to Prolog © Patrick Blackburn, Johan Bos & Kristina Striegnitz.
CSE 3302 Programming Languages Chengkai Li Spring 2008 Logic Programming: Prolog Lecture 21 – Prolog, Spring CSE3302 Programming Languages, UT-Arlington.
COMP307 Artificial Intelligence Xiaoying Gao Victoria University of Wellington Lecture 2:1 
Invitation to Computer Science, Java Version, Second Edition 1 Logic Programming Logic programming  Various facts are asserted to be true  On the basis.
Knowledge Based Information System
1-1 1 Introduction  Programming linguistics: concepts and paradigms syntax, semantics, and pragmatics language processors.  Historical development of.
Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 10: Tools.
Knowledge Engineering. Review- Expert System 3 Knowledge Engineering The process of building an expert system: 1.The knowledge engineer establishes a.
Logic Programming Logic programming Candidates should be familiar with the concept of logic programming for declaring logical relationships.
Software Design and Development Languages and Environments Computing Science.
Artificial Intelligence Knowledge Representation.
PROLOG “Programmation en Logique”
CPS120 Introduction to Computer Science High Level Language: Paradigms.
Programming Language History and Evolution
By P. S. Suryateja Asst. Professor, CSE Vishnu Institute of Technology
Why study programming languages?
PROGRAMMING LANGUAGES
CHAPTER 1 Introduction BIC 3337 EXPERT SYSTEM.
An Introduction to Programming
Problem Solving Techniques
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
KNOWLEDGE REPRESENTATION
Introduction to Prolog
Overview of Programming Paradigms
An Introduction to Programming
Chapter 2: Prolog (Introduction and Basic Concepts)
Representations & Reasoning Systems (RRS) (2.2)
PROLOG.
Presentation transcript:

Done By :- -Nesreen Basem -Sara nabil -Rawan Prolog Program

][ Introduction ][ - Prolog stands for PROgramming in LOGic,, It is a logic language that is particularly used by programs that use non-numeric objects,, For this reason it is a frequently used language in ”AI”,, where manipulation of symbols is a common task,, Prolog differs from the most common programming’s languages because it is declarative language..

][ ][ ][ History of Prolog ][ First Prolog interpreter by :- Colmerauer & Roussel

][ ][ ][ History of Prolog ][ Implementation of DEC10 compiler by Warren

][ ][ ][ History of Prolog ][ Definite Clause Grammars implementation by Pereira & Warren

][ ][ ][ History of Prolog ][ Prolog grows in popularity especially in Europe & Japan

][ ][ ][ History of Prolog ][ Prolog used to program natural language interface in International Space Station by NASA

][ What is Prolog ?! ][ - Prolog is an extraordinary programming language,, it is classified as a Declarative language.. - The basic concepts it releases on are the “Knowledge Base" & the “Mechanism”,, it uses to obtain results and answer user’s queries.. - Prolog has NO for, while, repeat loops,, It uses the recursion techniques to substitute all these mentioned..

][ Basic idea of Prolog ][ - Describe the situation of interest.. - Ask a question.. -- Prolog logically deduces new facts about the situation we described.. - Prolog gives us its deductions back as answers..

][ Prolog programs can be interpreted in 2 ways ][ 1- declaratively :- -Tell the computer what problem we want to solved.. Such as [ Prolog,, ML,, LISP ] programs.. 2- procedurally :- -Tell the computer how to solve the problem.. Such as [ C++,, Java,, Pascal ] programs..

][ Kind’s of Prolog ][ 1- SWI prolog. 2- NB prolog. 3- YAP prolog. 4- GNU prolog. 5- XPCE prolog. 6- EZY prolog.

][ ][ ][ Prolog Advantages ][ 1- It’s a Logical Programming language.. 2- It is easy to read and write programs which build structures.. 3- It is easy to build tables and databases while a program is running..

][ ][ ][ Prolog Disadvantages ][ 1- Limited sphere of usefulness.. 2- Not a “pure” logical language.. 3- It don’t have the fancy graphics the youngsters are raving about.. 4- It won’t make you popular with the ladies..

][ Prolog Syntax ][ - What exactly are facts, rules & queries built out of ?! Terms Simple Terms Variables Numbers Terms Simple TermsComplex Terms ConstantsVariables NumbersAtoms

][ Example ][ happy(yolanda). listens2music(mia). listens2music(yolanda):- happy(yolanda). playsAirGuitar(mia):- listens2music(mia). playsAirGuitar(yolanda):- listens2music(yolanda).

][ Cont. ][ happy(yolanda). listens2music(mia). listens2music(yolanda):- happy(yolanda). playsAirGuitar(mia):- listens2music(mia). playsAirGuitar(yolanda):- listens2music(yolanda). fact

][ Cont. ][ happy(yolanda). listens2music(mia). listens2music(yolanda):- happy(yolanda). playsAirGuitar(mia):- listens2music(mia). playsAirGuitar(yolanda):- listens2music(yolanda). fact

][ Cont. ][ happy(yolanda). listens2music(mia). listens2music(yolanda):- happy(yolanda). playsAirGuitar(mia):- listens2music(mia). playsAirGuitar(yolanda):- listens2music(yolanda). fact rule

][ Cont. ][ happy(yolanda). listens2music(mia). listens2music(yolanda):- happy(yolanda). playsAirGuitar(mia):- listens2music(mia). playsAirGuitar(yolanda):- listens2music(yolanda). fact rule

][ Cont. ][ happy(yolanda). listens2music(mia). listens2music(yolanda):- happy(yolanda). playsAirGuitar(mia):- listens2music(mia). playsAirGuitar(yolanda):- listens2music(yolanda). fact rule head body

][ Cont. ][ happy(yolanda). listens2music(mia). listens2music(yolanda):- happy(yolanda). playsAirGuitar(mia):- listens2music(mia). playsAirGuitar(yolanda):- listens2music(yolanda). ?-

][ Cont. ][ happy(yolanda). listens2music(mia). listens2music(yolanda):- happy(yolanda). playsAirGuitar(mia):- listens2music(mia). playsAirGuitar(yolanda):- listens2music(yolanda). ?-playsAirGuitar(mia). yes ?-

][ Cont. ][ happy(yolanda). listens2music(mia). listens2music(yolanda):- happy(yolanda). playsAirGuitar(mia):- listens2music(mia). playsAirGuitar(yolanda):- listens2music(yolanda). ?-playsAirGuitar(mia). yes ?-playsAirGuitar(maya). no

][ Cont. ][ happy(yolanda). listens2music(mia). listens2music(yolanda):- happy(yolanda). playsAirGuitar(mia):- listens2music(mia). playsAirGuitar(yolanda):- listens2music(yolanda). ?-

][ Cont. ][ happy(yolanda). listens2music(mia). listens2music(yolanda):- happy(yolanda). playsAirGuitar(mia):- listens2music(mia). playsAirGuitar(yolanda):- listens2music(yolanda). ?-happy(yolanda). yes ?-

][ Cont. ][ happy(yolanda). listens2music(mia). listens2music(yolanda):- happy(yolanda). playsAirGuitar(mia):- listens2music(mia). playsAirGuitar(yolanda):- listens2music(yolanda). ?-happy(yolanda). yes ?-sad(mia). no

][ Cont. ][ happy(yolanda). listens2music(mia). listens2music(yolanda):- happy(yolanda). playsAirGuitar(mia):- listens2music(mia). playsAirGuitar(yolanda):- listens2music(yolanda). ?-happy(yolanda). yes ?-sad(mia). ERROR: predicate sad/1 not defined.

Thank you all for listen =)