Presentation is loading. Please wait.

Presentation is loading. Please wait.

By: Cory Canter CSC 415 Programming Languages. History  Created by Alain Colmerauer, Phillipe Roussel and Robert Kowalski in 1971  Started as a natural.

Similar presentations


Presentation on theme: "By: Cory Canter CSC 415 Programming Languages. History  Created by Alain Colmerauer, Phillipe Roussel and Robert Kowalski in 1971  Started as a natural."— Presentation transcript:

1 By: Cory Canter CSC 415 Programming Languages

2 History  Created by Alain Colmerauer, Phillipe Roussel and Robert Kowalski in 1971  Started as a natural language processing project for French  Test version released in 1971, full version released in 1972

3 History  First compiler developed by artificial intelligence professor David H.D. Warren in the Warren Abstract Machine  Quickly became popular in Europe and Asia  Used in the Fifth Generation Computer Systems Initiative  Prolog continues to expand with the latest release of Visual Prolog 7.5 on July 23 rd, 2014

4 Terms  All statements comprised of terms  Term = constant, variable or structure  Constant = atom or integer  Atom = string of letters, digits and underscores beginning with a lowercase letter or a string enclosed in apostrophes  Examples of atoms: taco17, bell, dog_, ‘Apple’

5 Variables  Unlike variables in imperative languages  Variable = any string of letters, digits and underscores that begins with an uppercase letter or underscore  Binding of a value to a variable is called instantiation which occurs in the resolution process

6 Variables  Unassigned variables = uninstantiated  Instantiations are unique to each goal  Examples of Variables: _pear, Microsoft

7 Structures  Functor(parameter list)  Functor = atom and name of structure  Contain several arguments (integers, variables, atoms or other structures) divided by commas and enclosed in parentheses  Specify facts  Relationships among terms  Predicate to a query

8 Fact Statements Examples: male(gavin). female(karris). father(gavin, karris).

9 Rule Statements  consequence :- antecedent_expression.  State rules of implications between propositions  examples: tired(gavin) :- ran(gavin, maration). tired(a) :- ran(A, B).

10 Goal Statements  The system will reply to a goal with either yes or no based on the database  yes means it has proved the goal was true and no means it has proved it to be false or was unable to prove it.

11 Goal Statements examples: male(gavin). female(karris). father(gavin, karris). male(gavin). yes male(karris). no

12 Inferring  Forward Chaining  Backward Chaining  Depth-first  Breadth-first  Backtracking

13 Arithmetic  Original done with functors Example: +(4, a)  is operator example: X is Y * 20 + Z.  is does not equal = example: Sum is Sum + Number

14 Problems  Closed world problem  Negation problem  Fundamental goal

15 Readability  Easy to read with some experience  Similar to a complex math equation  Read and understood logically

16 Writability  Difficult to write in without a lot of practice  Very different from most other languages  Requires a lot of specifics to detail  Does not flow  Not near basic language structure

17 Reliability  Decently reliable  Attempting to add redundancy  Inherent reliability  Backtracking

18 Cost  Low compared to other logic languages  Moderate compared to procedural languages  Specific training cost  High maintainability  Reliable


Download ppt "By: Cory Canter CSC 415 Programming Languages. History  Created by Alain Colmerauer, Phillipe Roussel and Robert Kowalski in 1971  Started as a natural."

Similar presentations


Ads by Google