Aaron Bloomfield CS 415 Fall 2005

Slides:



Advertisements
Similar presentations
Chapt.2 Machine Architecture Impact of languages –Support – faster, more secure Primitive Operations –e.g. nested subroutine calls »Subroutines implemented.
Advertisements

1 Scheme and Functional Programming Aaron Bloomfield CS 415 Fall 2005.
CS0007: Introduction to Computer Programming Console Output, Variables, Literals, and Introduction to Type.
CS 331 Programming LanguagesDate: 4/21/08 Object Oriented Programming Group Featuring: James Webber II Topics Include: OOPSmalltalk.
13. A bit of Smalltalk. © Oscar Nierstrasz 2 Roadmap  The origins of Smalltalk  What is Smalltalk?  Syntax in a nutshell  Seaside — web development.
Principles of Object-oriented Programming Programming Language Paradigms August 26, 2002.
Lecturers: Hesam Setareh Salar Moarref 1 Fall 2009 – Programming languages.
1 CS101 Introduction to Computing Lecture 19 Programming Languages.
Smalltalk Andy Ko Johnvic Dualan Aaron Israel John John Llenteng Jehrom Christian De Vera Carlo Alvarez Michael John Butuyan.
© The McGraw-Hill Companies, 2006 Chapter 1 The first step.
High-Level Programming Languages: C++
3A-1 1 Introduction to Smalltalk History of Smalltalk The philosophy of Smalltalk:  “...we have a universe of well-behaved objects that courteously ask.
Adapted from Prof. Necula UCB CS 1641 Overview of COOL ICOM 4029 Lecture 2 ICOM 4029 Fall 2008.
Discussion of Assignment 9 1 CSE 2312 Computer Organization and Assembly Language Programming Vassilis Athitsos University of Texas at Arlington.
CS101 Introduction to Computing Lecture Programming Languages.
Chapter 34 Java Technology for Active Web Documents methods used to provide continuous Web updates to browser – Server push – Active documents.
1 Names, Scopes and Bindings Aaron Bloomfield CS 415 Fall
1 Introduction Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
CS 11 java track: lecture 1 Administrivia need a CS cluster account cgi-bin/sysadmin/account_request.cgi need to know UNIX
Visual C++ Programming: Concepts and Projects
Smalltalk for Unix & W i n d o w s Dennis Smith Cherniak Software Development Corporation.
Smalltalk (and Squeak) Aida Dungan and Rick Shreve.
Chapter 12 Support for Object oriented Programming.
Squeak and Botkit-Port Jeff Forbes Joel Miller. Introduction ● Squeak is a pure OO language ● Based off of SmallTalk-80 – Designed at Xerox PARC by Alan.
Alan Kay: LCC 2700: Intro to Computational Media Spring 2005.
Smalltalk Mark Colangelo CMSC-631, Fall December 2002.
Introduction to Perl. What is Perl Perl is an interpreted language. This means you run it through an interpreter, not a compiler. Similar to shell script.
Programming Language Concepts (CIS 635) Elsa L Gunter 4303 GITC NJIT,
Programming Language Theory 2014, 1 Chapter 1 :: Introduction Origin : Michael L. Scott School of Computer & Information Engineering,
Review A program is… a set of instructions that tell a computer what to do. Programs can also be called… software. Hardware refers to… the physical components.
Programming 2 Intro to Java Machine code Assembly languages Fortran Basic Pascal Scheme CC++ Java LISP Smalltalk Smalltalk-80.
BlueJ X ICSE Syllabus. Board Pattern THEORY (100 marks) PRACTICAL (100 marks) PROJECT (50 marks) ASSIGNMENTS (50 marks)
Computer Software vs. Hardware. Topic: Java in the Computer World.
IS 350 Course Introduction. Slide 2 Objectives Identify the steps performed in the software development life cycle Describe selected tools used to design.
Programming Language History and Evolution
Chapter 1. Introduction.
Functional Programming
Applications Active Web Documents Active Web Documents.
Information and Computer Sciences University of Hawaii, Manoa
Zuse’s Plankalkül – 1945 Never implemented Problems Zuse Solved
Chapter 4: Threads.
LCC 2700: Intro to Computational Media
Topics Introduction Hardware and Software How Computers Store Data
Sections Basic Concepts of Programming
Key Ideas from day 1 slides
Compiler Construction (CS-636)
Class 22: Inheritance CS150: Computer Science University of Virginia
Console and GUI Programs
Revision Lecture
CS101 Introduction to Computing Lecture 19 Programming Languages
Variables, Expressions, and IO
Java programming lecture one
Application Development Theory
Programming Language Concepts (CIS 635)
Ada – 1983 History’s largest design effort
Java Programming Language
Programming Languages
CSE3302 Programming Languages (new notes)
History of Object-Oriented Programming
Creating Computer Programs
Introduction to Smalltalk
강의 내용 및 방법 접근방법 리포트 시험 Lambda Calculus, Proof of Correctness
School of Computer & Information Engineering,
Let’s Talk about… Smalltalk.
Computer Programming-1 CSC 111
ICOM 4029 Fall 2003 Lecture 2 (Adapted from Prof. Necula UCB CS 164)
Creating Computer Programs
Introduction to Smalltalk
CSE 3302 Programming Languages
Presentation transcript:

Aaron Bloomfield CS 415 Fall 2005 Smalltalk Aaron Bloomfield CS 415 Fall 2005

Evolution of Smalltalk Alan Kay – grad student at Utah Dynabook Xerox PARC. Influenced by Lisp, Simula, Ivan Sutherland’s Sketchpad, LOGO, Dewey, Montessori, Piaget Alan Kay at Utah in late 60s

Smalltalk Interpreted Everything is an object Dynamically & Strongly Typed Rich programming environment Window-oriented display management Mouse, Menus Example of a pure Object-Oriented Language

Smalltalk and Squeak Smalltalk – commercial product Squeak – free version, used for education Smalltalk-80 was developed at Xerox (PARC in the 1970s. ) -VM written in assembly Apple obtained a license in 1980. A team at (Apple developed Squeak in 1996), and have made it available free under license. Squeak – VM is written in smalltalk, highly portable implementation of Smalltalk-80 (current developers are at Disney – Alan Kay is still part of that. but it is free and anyone can modify it.) Folks – Mark Guzdial at GA Tech

Bindings x <- 3 x <- x + 1 In Squeak, write <-as underscore OR := X is bound to 4

Objects and Messages Everything is an Object Everything is done by sending messages to objects x * 2 Sends the message *2 to the object x.

Other Examples 3 + 2 * 5 25 is answer (use parenthesis if you want 13) Precedence is left to right within same message type. Unary-> binary-> keyword (new) (math ops) (newAt:) [This example uses all binary operators.] Parenthesis override UNDERSCORE is the <- assignment in Squeak Alt-P to execute “this is a comment” Transcript show: ‘Hello World’

Inheritance Superclass Subclass Object Overriding No multiple Inheritance Object is the class that everything inherits from If you create a new class it will be a subclass of Object. Simulation is the mode of programming

Implementation Mostly written in Smalltalk Main loop: true whileTrue: [Display put: user run] Class - userTask run || Keyboard read eval print (Compiler, debugger, decompiler, editor, file system = 97% of code.) Even activation records are smalltalk objects. Smalltalk-80 – VM – written in assembly (except for Squeak – written in Smalltalk, with an translator into C) Infinite loop – executes stuff in block. Sends the run mesg to user task.

Virtual Machine Storage Manager Interpreter Primitive Subroutines Interpreter – operates on an intermediate language (the operations of the smalltalk virtual machine) Prim. Subroutines – collection of methods that for performance reasons are impelemented in assembly. (I/O, integer arithemtic)

Storage Manager Collects and manages free space Handles requests to: Create new objects Fetch class of an object Fetch and store fields of an object Uses reference counting

Concurrency Easy to implement Handy for simulations Each activation record is a Smalltalk object sched map: [:Task | Task run] If sched is a set of tasks, then map will map the block [] to sched. [] needs to be something that will take a task and send it the run message. Like map in Scheme