SlideServe
Menu
Préférences
© SlideServe · v2026

Lisp

mschiller avatar
11 diapositives · 166 Views · Jan 06, 2020

Lisp. " List Processing ". Lisp history. John McCarthy developed the basics behind Lisp during the 1956 Dartmouth Summer Research Project on Artificial Intelligence He intended it as an algebraic LIS t P rocessing ( hence the name ) language for artificial intelligence work

Lisp - slide 1
01 / 11Lisp
1 / 17

Télécharger la présentation

Lisp
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Lisp "List Processing"

  2. Lisp history • John McCarthy developed the basics behind Lisp during the 1956 Dartmouth Summer Research Project on Artificial Intelligence • He intended it as an algebraic LISt Processing (hence the name) language for artificial intelligence work • He showed how, given a handful of simple operators and anotation for functions, you can build a whole programming language.

  3. Design Goals • Formalism for developing a theory of computation • Programming language for numerical and logical problems • Symbolic manipulation of expressions and sentences

  4. Characteristics • LISP was one of the earliest high-level programming languages and introduced many ideas such as garbage collection, recursive functions, symbolic expressions, and dynamic type-checking • Interest in symbolic computation influenced design • Use of simple machine model • Attention to theoretical considerations Recursive function theory, Lambda calculus

  5. Distinctive Characteristics • Not C, C++, Java: a chance to think differently • LISt Processing: the ancestor of all functional languages • Lisp is good at handling lists of things, and the abstraction level is higher than C/C++ normally allows you to get to.

  6. Relative Speedsof 5 language

  7. Description of Lisp • LISP is usually used as an interpreted language. • The interpreter runs what is known as a read- evaluates-print loop.

  8. Description of Lisp • The two most important kinds of objects in LISP for you to know about are atoms and lists. • Atoms are represented as sequences of characters of reasonable length. Such as :34 or join. • Lists are recursively constructed from atoms Such as: (a john 34 c3po). • The interpreter treats any list as containing the name of a function followed by the arguments to the function. Such as: (+ 2 13 45).

  9. Defining Lisp Function • Use defun to define your own functions in LISP. (defun <name><parameter-list><body>) • Example: >(defun square (x) (* x x)) SQUARE >(square 2) 4

  10. Example Code • reverse : Format: (reverse <list>) • Reverse returns a list that contains all the elements of <list> in reversed order. • Example: > (reverse '(picard riker worf crusher)) (CRUSHER WORF RIKER PICARD) > (reverse (reverse '(picard riker worf crusher))) (PICARD RIKER WORF CRUSHER)

  11. Resources • http://faqs.org/faqs/lisp-faq/part2/section-13.html • http://www.cc.gatech.edu/data_files/classes/cs6390/slides/lisp.pdf • http://web.syr.edu/~aalarifi/Common%20Lisp.pdf • http://norvig.com/python-lisp.html