Fundamentals of Functional Programming Languages

Slides:



Advertisements
Similar presentations
Functional Programming Languages Session 12
Advertisements

1 Copyright © 1998 by Addison Wesley Longman, Inc. Chapter 14 Functional Programming Languages - The design of the imperative languages is based directly.
Lambda Calculus and Lisp PZ03J. Lambda Calculus The lambda calculus is a model for functional programming like Turing machines are models for imperative.
CS 355 – PROGRAMMING LANGUAGES Dr. X. Apply-to-all A functional form that takes a single function as a parameter and yields a list of values obtained.
Chapter 5: Elementary Data Types Properties of types and objects –Data objects, variables and constants –Data types –Declarations –Type checking –Assignment.
1 Functional programming Languages And a brief introduction to Lisp and Scheme.
Functional Programming Languages
1 Chapter 7: Expressions Expressions are the fundamental means of specifying computations in a programming language To understand expression evaluation,
ISBN Chapter 1 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Motivation Programming Domains.
Chapter 15 Functional Programming Languages. Copyright © 2007 Addison-Wesley. All rights reserved. 1–2 Introduction Design of imperative languages is.
ISBN Chapter 15 Functional Programming Languages Mathematical Functions Fundamentals of Functional Programming Languages Introduction to.
Chapter 2: Impact of Machine Architectures What is the Relationship Between Programs, Programming Languages, and Computers.
ISBN Chapter 15 Functional Programming Languages.
ISBN Chapter 1 Topics Motivation Programming Domains Language Evaluation Criteria Influences on Language Design Language Categories Language.
ISBN Chapter 15 Functional Programming Languages.
Dr. Muhammed Al-Mulhem ICS An Introduction to Functional Programming.
The College of Saint Rose CIS 433 – Programming Languages David Goldschmidt, Ph.D. from Concepts of Programming Languages, 9th edition by Robert W. Sebesta,
1 Functional Programming In Text: Chapter Chapter 2: Evolution of the Major Programming Languages Outline Functional programming (FP) basics A bit.
 The design of the imperative languages is based directly on the von Neumann architecture  Efficiency is the primary concern  Low-level specifications:
ISBN Chapter 15 Functional Programming Languages.
ISBN Chapter 15 Functional Programming Languages.
1 Programming Languages and Paradigms Functional Programming.
Chapter 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
LISP John McCarthy and Marvin Minsky formed MIT’s AI Project in Suggested reading: John McCarthy’s home page
CHAPTER 15 & 16 Functional & Logic Programming Languages.
ISBN Chapter 15 Functional Programming Languages.
CS 363 Comparative Programming Languages Functional Languages: Scheme.
ISBN Chapter 15 Functional Programming Languages.
ISBN Chapter 15 Functional Programming Languages.
ISBN Chapter 15 Functional Programming Languages.
1 Chapter 15 © 2002 by Addison Wesley Longman, Inc Introduction - The design of the imperative languages is based directly on the von Neumann architecture.
ISBN Chapter 15 Functional Programming Languages.
3.2 Semantics. 2 Semantics Attribute Grammars The Meanings of Programs: Semantics Sebesta Chapter 3.
8-1 Compilers Compiler A program that translates a high-level language program into machine code High-level languages provide a richer set of instructions.
1-1 An Introduction to Functional Programming Sept
1 Scheme (Section 11.2) CSCI 431 Programming Languages Fall 2003.
1 FP Foundations, Scheme In Text: Chapter Chapter 14: FP Foundations, Scheme Mathematical Functions Def: A mathematical function is a mapping of.
Functional Programming Part 1. Organization of Programming Languages-Cheng Big Picture u What we’ve learned so far: Imperative Programming Languages 
ISBN Chapter 15 Functional Programming Languages.
Functional Programming. Some Functional Languages Lisp Scheme - a dialect of Lisp Haskell Miranda.
CSE 425: Functional Programming I Programs as Functions Some programs act like mathematical functions –Associate a set of input values from the function’s.
Comparative Programming Languages Functional programming with Lisp/Scheme.
Ch Ch jcmt CSE 3302 Programming Languages CSE3302 Programming Languages (n-n-n-notes) Summer 2003 Dr. Carter Tiernan.
ISBN Chapter 15 Functional Programming Languages.
Functional Programming
Functional Programming
Functional Programming Languages
Functional Programming Languages
Chapter 15 :Functional Programming Languages
Functional Programming Languages
Functional Programming
History of Computing – Lisp
Expressions and Assignment
Functional Programming
Functional Programming Languages
Chapter 15 Functional Programming Languages
College of Computer Science and Engineering
FP Foundations, Scheme In Text: Chapter 14.
Functional Programming Languages
Abstraction and Repetition
Functional Programming Languages
Chapter 7 Expressions and Assignment Statements.
Abstraction and Repetition
Functional Programming and Haskell
15.2 Mathematical Functions
PRESENTED BY ADNAN M. UZAIR NOMAN
Chapter 15 Functional Programming 6/1/2019.
Functional Programming Languages
Functional Programming and Haskell
Presentation transcript:

Fundamentals of Functional Programming Languages The objective of the design of a FPL is to mimic mathematical functions to the greatest extent possible The basic process of computation is fundamentally different in a FPL than in an imperative language In an imperative language, operations are done and the results are stored in variables for later use Management of variables is a constant concern and source of complexity for imperative programming In an FPL, variables are not necessary, as is the case in mathematics 11/9/2018

Fundamentals of Functional Programming Languages (cont.) A purely functional programming language does not use variables or assignment statement, thus freeing the programmer from concerns about the memory Repetition must be done by recursion rather than by iteration. Programs are function definitions and function application specifications, and execution consists of evaluating the function applications. 11/9/2018

Fundamentals of Functional Programming Languages (cont.) A functional language provides: a set of primitive functions, a set of functional forms to construct complex functions, a function application operation, and some structure or structure for data representation These structs are used to represent the parameters and values computed by functions. 11/9/2018

LISP Data Types and Structures Data object types: originally only atoms and lists List form: parenthesized collections of sublists and/or atoms e.g., (A B (C D) E) Originally, LISP was a typeless language LISP lists are stored internally as single-linked lists (page 672) 11/9/2018

LISP Interpretation Lambda notation is used to specify functions and function definitions. Function applications and data have the same form. e.g., If the list (A B C) is interpreted as data it is a simple list of three atoms, A, B, and C If it is interpreted as a function application, it means that the function named A is applied to the two parameters, B and C The first LISP interpreter appeared only as a demonstration of the universality of the computational capabilities of the notation 11/9/2018