CSE 341, S. Tanimoto Lisp 1 - 1 LISP LISP = LISt Processing Intended for processing symbolic information Implementations from noncommercial sites: GNU.

Slides:



Advertisements
Similar presentations
CS 63 LISP Philip Greenspun's Tenth* Rule of Programming:
Advertisements

C-LISP. LISP 2 Lisp was invented by John McCarthy in 1958 while he was at the Massachusetts Institute of Technology (MIT).John McCarthyMassachusetts Institute.
1 Scheme and Functional Programming Aaron Bloomfield CS 415 Fall 2005.
Scheme in Scheme. Why implement Scheme in Scheme  Implementing a language is a good way to learn more about programming languages  Interpreters are.
Peter Seibel Practical Common Lisp Peter Seibel
Introduction to Artificial Intelligence Lisp Ruth Bergman Fall 2002.
CSE S. Tanimoto Explicit Function Application 1 Explicit Application of Functions, Functional Arguments and Explicit Evaluation Implicit and explicit.
Common Lisp Derek Debruin Mark Larue Vinh Doan. Problem Domains There was a need in the early 1960s to define a programming language whose computational.
ISBN Lecture 01 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Lecture 01 Topics Motivation Programming.
Common Lisp! John Paxton Montana State University Summer 2003.
CSE S. Tanimoto Introduction 1 LISP Lisp is worth learning for the profound enlightenment experience you will have when you finally get it; that.
CSE S. Tanimoto Introduction 1 CSE 341 Programming Languages Autumn 2001 Instructor: Steve Tanimoto Teaching assistants:
Presentation topic : LISP Amir Shahzad MCS 3 MCC
Allegro CL Certification Program Lisp Programming Series Level I Session Overview of Common Lisp.
What is R By: Wase Siddiqui. Introduction R is a programming language which is used for statistical computing and graphics. “R is a language and environment.
3A-1 1 Introduction to Smalltalk History of Smalltalk The philosophy of Smalltalk:  “...we have a universe of well-behaved objects that courteously ask.
COMPUTER PROGRAMMING I SUMMER 2011 Programming Languages.
LISP – Not just a Speech Impediment Jim Lowe. Brief History of LISP Initial development begins at the Dartmouth Summer Research Project in 1956 by Dr.
Basic Lisp CIS 479/579 Bruce R. Maxim UM-Dearborn.
CS 355 – PROGRAMMING LANGUAGES Dr. X. Common LISP A combination of many of the features of the popular dialects of LISP around in the early 1980s A large.
TUTORIAL 1 CSCI3230 ( First Term) By Tony YI 1.
Copyright © 2007 Addison-Wesley. All rights reserved.1-1 Reasons for Studying Concepts of Programming Languages Increased ability to express ideas Improved.
CS 326 Programming Languages, Concepts and Implementation Instructor: Mircea Nicolescu Lecture 5.
Programming Language 1. Programming language A programming language is a machine-readable artificial language designed to express computations that can.
CSE (c) S. Tanimoto, 2002 AI Techniques 1 Where and When Do Symbols Refer to Values and Functions? Scope and Extent of Bindings Bindings Scope Extent.
CS 105: LISP GRG 424 MW 1:00-2:00pm About Me Jacob Schrum: call me Jacob BS in Computer Science, Math and German at Southwestern University Currently.
CS 331 Lisp/Scheme 1 Lisp/Scheme Ruth Rutter Functional and Logic Programming Team P-Phunck.
Milos Hauskrecht (PDF) Hieu D. Vu (PPT) LISP PROGARMMING LANGUAGE.
CSE S. Tanimoto More-Concepts - 1 More Programming Language Concepts Currying Lazy Evaluation Polymorphism.
Programming Languages
Lisp "List Processing". Lisp history John McCarthy developed the basics behind Lisp during the 1956 Dartmouth Summer Research Project on Artificial Intelligence.
CSE 341, S. Tanimoto Lisp Explicit Application of Functions and Functional Arguments In Lisp, functions can be passed as arguments to other functions.
History of Lisp And Functional Programming Languages Scotty Smith.
LISP LISt Processing. History & Overview b b One of the oldest high level programming languages. b b First developed in 1958 by John McCarthy. b b Later.
CSE S. Tanimoto Java Introduction 1 Java A Programming Language for Web-based Computing.
Being Productive With Emacs Part 2
Functional Programming
CS 3304 Comparative Languages
PROGRAMMING LANGUAGES
CS 326 Programming Languages, Concepts and Implementation
LISP LISt Processing.
CSE S. Tanimoto Introduction
Programming Languages
Lisp Tutorial Click on Xlisp icon – you enter the interpreter
CSE 341 Programming Languages Autumn 2001
CSE 341 Programming Languages Autumn 2003
LISP LISP = LISt Processing
CSE 341 Programming Languages Autumn 2002
Bindings, Scope, and Extent
CSE S. Tanimoto Introduction
CSE S. Tanimoto Explicit Function Application
CSE S. Tanimoto Introduction
Explicit Application of Procedures, and Explicit Evaluation
Functional Programming Concepts
Lisp: Using Functions as Data
CSE S. Tanimoto Introduction
CSE S. Tanimoto Introduction
Functional Programming Concepts
Defining Macros in Lisp
CSE 341 Programming Languages Autumn 2003
CSE (c) S. Tanimoto, 2002 Introducing Lisp
Defining Functions with DEFUN
LISP LISt Processing.
Abstraction and Repetition
Lisp: Using Functions as Data
Bindings, Scope, and Extent
LISP LISt Processing.
Modern Programming Languages Lecture 18 Fakhar Lodhi
Functional Programming Concepts
Bindings, Scope, and Extent
Presentation transcript:

CSE 341, S. Tanimoto Lisp LISP LISP = LISt Processing Intended for processing symbolic information Implementations from noncommercial sites: GNU Common Lisp (GCL) - U of Texas mods to Kyoto Common Lisp CLISP -- developed in Germany. Available implementations from Allegro Common Lisp for Windows, Web edition. Allegro Common Lisp for Linux

CSE 341, S. Tanimoto Lisp LISP: Our Objectives Motivation and History Interactive programming Functional programming List manipulation with recursive functions Polymorphism Language extensibility via macro definitions Language evolution to support multiple paradigms Lisp look and feel Lisp on the Web

CSE 341, S. Tanimoto Lisp History of Lisp (continued) John McCarthy, developed the ideas during the Dartmouth Summer Research Project on Artificial Intelligence, First implementation on the IBM 704 John McCarthy published “Recursive functions of symbolic expressions and their computation by machine” in Communications of the Association for Computing Machinery in 1960.

CSE 341, S. Tanimoto Lisp History of Lisp (continued) 1970s: advanced dialects -- MacLisp, InterLisp; Lisp machines (Symbolics, Inc.; Lisp Machines, Inc.; Xerox; Texas Instruments) Late 1970s: Scheme, Portable Standard Lisp, XLISP Common Lisp. Use of Lisp as internal scripting languages: Gnu Emacs, AutoCAD CLOS = Common Lisp Object System ANSI Standard Lisp.

CSE 341, S. Tanimoto Lisp Interacting with Lisp Interaction takes place in a Lisp Listener Window. Lisp runs an endless loop for interacting with the user: READ EVAL PRINT

CSE 341, S. Tanimoto Lisp Interacting with Lisp (continued) > (+ 3 5) 8 > (* 2.5 (+ 2 2)) 10.0 > (setq x 5) 5 > (sqrt x) > (* x x) 25

CSE 341, S. Tanimoto Lisp Defining a function > (* 5 5 5) 125 > (defun cube (n) (* n n n)) CUBE > (cube 2) 8 > (cube )

CSE 341, S. Tanimoto Lisp Symbolic Values Symbols are like identifiers, but they are commonly used as values as well as variables. > (setq x ’pizza) PIZZA > x PIZZA > (setq pizza ’pepperoni) PEPPERONI > pizza PEPPERONI > (eval x) PEPPERONI

CSE 341, S. Tanimoto Lisp More on Evaluation of Symbols > (setq x ’y) Y > (setq y ’z) Z > (setq z ’x) X > x Y > (eval x) Z > (eval (eval x)) X

CSE 341, S. Tanimoto Lisp Values of Symbols A symbol without a value in the current context is said to be “unbound”. The value of a symbol can be any Lisp object, including a number, another symbol, a functional object, a list, and array, etc. A symbol can have several local (“lexical”) values and one global value. However, symbols belong to “packages”, and two different packages can have symbols with the same name.