Lisp and Prolog Background Thank you to Prof. Roosen-Runge for the - - PowerPoint PPT Presentation

lisp and prolog background
SMART_READER_LITE
LIVE PREVIEW

Lisp and Prolog Background Thank you to Prof. Roosen-Runge for the - - PowerPoint PPT Presentation

Lisp and Prolog Background Thank you to Prof. Roosen-Runge for the slides on background and history. Edited by Gunnar Gotshalks BH2-1 Lisp History Lisp--invented ( about 1958 ) by the logician and AI researcher John McCarthy Widely


slide-1
SLIDE 1

BH2-1

Edited by Gunnar Gotshalks

Lisp and Prolog Background

Thank you to Prof. Roosen-Runge for the slides on background and history.

slide-2
SLIDE 2

BH2-2

Edited by Gunnar Gotshalks

Lisp History

  • Lisp--invented (about 1958) by the logician

and AI researcher John McCarthy

  • Widely used in for applications in AI every

since

  • Used in industry

» To develop expert systems & other AI

applications

» For Rapid Application Development (RAD)

slide-3
SLIDE 3

BH2-3

Edited by Gunnar Gotshalks

Lisp Use

  • Lisp is used as an embedded language
  • Found inside applications like Emacs (MLisp)

and AutoCAD (AutoLisp).

» Emacs supports Lisp as a language for

developing programs

» As well as embedded language for controlling

and customizing the editor itself

slide-4
SLIDE 4

BH2-4

Edited by Gunnar Gotshalks

Lisp availability

  • On all major and many minor platforms.
  • Numerous free- and shareware versions.
  • Standard: Common Lisp
slide-5
SLIDE 5

BH2-5

Edited by Gunnar Gotshalks

Prolog history

  • Prolog invented (≈1972)

by the AI researcher Alan Colmeraurer

» Used at York in the

Student Information System to check applications for input errors

» Early ideas developed

at University of Montreal; then University of Marseilles

  • Widely used to develop

expert systems & other AI applications including natural language processing

slide-6
SLIDE 6

BH2-6

Edited by Gunnar Gotshalks

Prolog Use & Availability

  • Prolog rumored to be embedded in MS Office
  • On all major and many minor platforms
  • Several free and shareware versions
  • Standard: ‘Edinburgh-style’
slide-7
SLIDE 7

BH2-7

Edited by Gunnar Gotshalks

Survival Value

McCarthy's Lisp Newell's IPL (Information Processing Language)

» Both men pioneers

in AI and computer science

» Both proposed

languages at about the same time for symbolic computing to be used in AI research

versus

slide-8
SLIDE 8

BH2-8

Edited by Gunnar Gotshalks

And the winner is ? McCarthy? Newell? Why?

slide-9
SLIDE 9

BH2-9

Edited by Gunnar Gotshalks

& the winner is ...

⇒Newell modeled IPL

  • n the assembler

language for an early computer instead of timeless logic

→ This made his language very

  • perational

→ Couldn't be understood in

mathematical terms.

→ Wasn't accepted as a notation

for AI programs.

  • Value of ‘high-level’ over ‘low-level’ language wasn’t

so clearly recognized in the early days.

  • Newell made what turned out to be a fatal error for his

language

slide-10
SLIDE 10

BH2-10

Edited by Gunnar Gotshalks

Low- and High-level – 1

  • Lisp became the ‘assembler language’ –

lower-level – for AI programmers

» Used to build higher-level systems » Wilensky Chapters 21 & 22 give the basis for

Prolog!

  • Common Lisp = union of the techniques and

tools people have found useful.

slide-11
SLIDE 11

BH2-11

Edited by Gunnar Gotshalks

Low- and High-level – 2

Prolog is a higher-level language for

knowledge-based programming

» More powerful, not necessarily as efficient » More compact » More understandable programs.

slide-12
SLIDE 12

BH2-12

Edited by Gunnar Gotshalks

Pure Lisp

  • Denotational, functional rather than
  • perational

» No states: just a mapping

between arguments and result

  • r, from input to output.
  • ‘Pure’ Lisp is all we will have time to discuss

in this course

» It's what makes Lisp distinctive

slide-13
SLIDE 13

BH2-13

Edited by Gunnar Gotshalks

Pure Prolog

  • ‘Pure’ Prolog: denotational & declarative
  • Just 1 state

» A ‘knowledge’ base = database for facts

  • This turned out to be a very big advance!
slide-14
SLIDE 14

BH2-14

Edited by Gunnar Gotshalks

Lisp vs. Prolog?

Which AI language an AI researcher uses often

depends on where they studied.

  • At Edinburgh, almost

all Prolog

  • At MIT and Stanford,

almost all Lisp

  • MIT has used a dialect
  • f Lisp called Scheme

in their first year programming course for many years.

slide-15
SLIDE 15

BH2-15

Edited by Gunnar Gotshalks

At York

  • We have been more a ‘Prolog shop’ than a

‘Lisp shop’ in this department.

  • Prof. Stachniak teaches a 4th year course on

Logic Programming which includes a more advanced look at Prolog.

slide-16
SLIDE 16

BH2-16

Edited by Gunnar Gotshalks

Other Choices

  • There are many denotational, functional languages
  • ther than Lisp

» ML is popular in British and some European

universities – American universities tend to use Lisp

  • No strong competitors to Prolog at present, mainly

variants, extensions, and dialects.

  • Objected-oriented add-ons available for both

languages

slide-17
SLIDE 17

BH2-17

Edited by Gunnar Gotshalks

Lisp in ‘Production’ Work

  • Programmers tend to use operational features

– This is not good; it is the fault of poor software- development tools – There are claims that 90% of function calls in Lisp programs are to assignment functions – like setq and rplaca!

  • Assignment changes state and is sure sign of

an operational description

– Compare the palindrome programs