? CSE 655 Course Introduction - PowerPoint PPT Presentation

1 / 33
About This Presentation
Title:

? CSE 655 Course Introduction

Description:

CSE 655 Su'09. 3. Grand View of ... Astrology/astronomy seasons, relationship to stars ... (flow charts, design methodologies, UML, automatic documentation) ... – PowerPoint PPT presentation

Number of Views:74
Avg rating:3.0/5.0
Slides: 34
Provided by: bobma5
Category:

less

Transcript and Presenter's Notes

Title: ? CSE 655 Course Introduction


1
  • ? CSE 655 Course Introduction
  • Basics of Programming Languages ?

2
Grand Overview ofProgramming Languages
  • Dr. Bob Mathis

3
Grand View of Programming Languages
  • Invention of languages one of most fundamental
    developments in human pre-history
  • Invention of written language lead to history
  • What was original purpose of written language?
  • Commerce, tax notes/receipts
  • Government decrees, kings stories came later
  • Mathematics/computation
  • Commerce, taxes, surveying land ownership
  • Astrology/astronomy seasons, relationship to
    stars
  • Construction pyramids are very large projects
  • Written computational project plans
  • Directions for others to help in the work

4
Languages, Mathematics, Programming
  • Abstraction where and how we reason,then try
    to apply to real world problem
  • S no longer snake, it represents the sound
  • 5 can mean apples or oranges even thoughthey are
    so different incomparable
  • When these all say basically the same thing37
    37 37 add(3,7) iadd_to_3(7) i3, i7
  • Objects and functions x.f(a) or f(x,a)
  • Sameness in two different versions of a program
  • Associativity, communativity, refactoring,
    reorganizing, moving things, interchanging what
    can you do and what not?

5
How Programs Written
  • Programming paradigms
  • Early computational models
  • Manually calculated spreadsheet
  • Describing a pattern of computation
  • How you organize a complicated process
  • Plan and then delegate the work
  • Make a table of a function FORTRAN
  • Report writing program - COBOL
  • Loop over relevant stuff in DB or file
  • Do computations along the way
  • Write a calculated line (multiple physical) at a
    time
  • At the end of the loop, write out summaries

6
Naming and Dependencies
  • Rather than refer to specific memory
    locationsgive them names and let the computer
    system assign them and keep track of them
  • But this may introduce dependencies
  • A program that might work for different types
    gets all tied up with them during compilation
  • Various approaches for more flexibility during
    the program construction process (generics in
    Ada, templates in C, parameterized types in
    Java)
  • Approaches for flexibility during execution
    factories and abstract factories.
  • Naming
  • Symbol tables, Binding, Scope, Naming, JNDI,
    Registry

7
Composition Programming Style
  • Function composition ? program composition
  • Construction with components (functions calling
    functions, development by successive refinement)
  • Levels of Separation for Flexibility
  • Constructors, Factories, Abstract factories
  • Containers to Hold Components
  • In an operating system, task control block is the
    external connection for the container
  • OS had allocated some memory space, loader puts
    the code there, TCB is interface between the OS
    and the program
  • JavaBeans, J2EE Enterprise Java Beans
  • Primitive Operations
  • Why should methods directly manipulate the
    internal representation versus calling sister
    methods to do it?

8
Modular Development Reasoning
  • If program built from components, should be able
    to reason similarly that is, if pieces are
    correct and theyre correctly combined, then the
    result is correct (still a research topic).
  • Specifications dont tell everything or enough.
  • Syntax signature number and types of
    arguments
  • Pre- and post-conditions (constraints on values)
  • There is more about side-effects, timing,
    security, interactions
  • Other uses that might not have been predicted
    (and no tests for)

9
Modular Development Reasoning
  • Programming with interfaces
  • Part of Ada in early 80s, partially in C/C
  • OMGs CORBA had IDL (Interface Description
    Language) forconnecting things in diff.
    programming languages
  • Essential in Java and C
  • Programming by contract
  • Adding some logical conditions as in Eiffel and
    Resolve
  • Assertions in Java
  • Trying to build in compiler checkable conditions,
    more than justrun-time exceptions

10
Programming Patterns
  • Step up from programming language constructs
  • Common things that people do in programs
  • Supported better or worse in different languages
  • Loops, decision structures, subprograms
  • Most languages have these
  • Random jumping around (assembly language)
  • Most languages discourage (almost prevent) this
  • Singleton (example pattern)
  • If doesnt exist, create one
  • If exists, reference the same single instance
  • Factory (extension of constructor)
  • Iterator (loop / iterate over a
    structurewithout low-level knowledge of how it
    was built)

11
Patterns Classic Example Programs
  • Copying a file from input to output
  • Making a table of a formula in Fortran
  • Recursive data structure manipulation in Lisp
  • VB components
  • Examples like Java pet store for J2EE
  • Some automated in newer tools like spreadsheet
  • Some patterns built into new programming tools
  • Variables in Java beans, attributes in C
    (get/set)

12
Programming With Components
  • Software component is much more than just the
    source code
  • Documentation
  • Design information (JavaBean attributes)
  • Deployment information (for Enterprise Java
    Beans)
  • Object at execution time
  • Object at program design / construction time

13
Programming Languages
  • Big issue
  • Describe problems
  • Describe constructive solutions
  • How to solve problems?
  • Reuse previous solutions?
  • New environments bring ? new problems and
    (hopefully) ? new solutions
  • If description was good enough,could a solution
    be automatic?

14
History of Programming Languages
  • The past is prologue. US National Archives
  • History important
  • Future is even more important
  • How can we presume to teach you to program ina
    language that hasnt even been thought of yet?
  • Transition described in terms currently known
  • Future will be built on current technology
  • For example,
  • C in terms of C
  • Java in terms of C
  • But thats misleading
  • Mix of syntax and concepts from various languages

15
Evolution of Major Programming Languages
Algol
Fortran
Cobol
SCATRAN
PL/I
Algol68
Simula
C
Basic
Pascal
Lisp
Ada
C
Scheme
C
Java
16
Other Programming Languages
  • Assembly languages (machine dependent)
  • Operating system shells (DOS, bash)
  • SQL (database queries)
  • HTML, XML, SGML (text / data markup)
  • XSLT XML translation
  • JavaScript (ECMAScript)
  • PHP, Ruby, Perl
  • Editing (TECO, EMACS, SNOBOL)
  • APL, MUMPS
  • Modeling UML

17
History of Programming Languages 1978 Conference
  • FORTRAN (Formula Translator)
  • ALGOL (International Algorithmic Language)
  • LISP (List Processing) (Lots of Irritating Silly
    Parentheses)
  • COBOL (Common Business Oriented
    Language) (Committee Originated Baloney)
  • APT (Automatically Programmed Tools)
  • JOVIAL (Jules' Own Version of the International
    Algebraic Language)
  • GPSS (General Purpose Simulation System)
  • SIMULA
  • JOSS (Johnniac Open-Shop System)
  • BASIC (Beginner's All-purpose Symbolic
    Instruction Code)
  • PL/I (Programming Language Roman One I
  • SNOBOL (StriNg Oriented symBOlic Language)
  • APL (A Programming Language)

18
The Ultimate Theory / Approach
  • The Holy Grail of programming is the
    construction of reusable, modular components.
    Ideally, you'd like to take them off the shelf,
    customize them, and plug them together to
    construct an application, with a bare minimum of
    additional coding and additional compilation.
  • -- from a Sun web site

19
Component Orientation
  • Components (emphasis of CSE 221 222)
  • Component user
  • Component implementer
  • How to break a program into pieces
  • How to recombine those pieces
  • Pieces Components Objects Modules
  • Different kinds (packages and classes)
  • Scalability is most important
  • Program piece built of other pieces(successive
    refinement)

20
How Pieces Connect at a Low-level
  • Subprograms
  • Linking loader (make Ant)
  • Some linkage described (J2EEs XML)
  • At Instruction Execution Level
  • At the instruction fetch stage
  • Add more tests and options
  • Event connected
  • Used to be thought of as interrupts

21
Event Driven Programming
  • Traditionally, the programmer prescribes the
    order of execution (imperative language)(function
    al languages also, but differently)
  • What if instructions are placed in memory and
    just wait for execution to come to them
  • Thread of execution
  • Next Instruction
  • Next event could just be the next instruction
    fetch
  • Multiple ways to figure out what to do next
  • How do we decide what instruction to execute next

22
Distributed (Web) Services
  • Reusable subprograms, components, objects,
    packages . . .
  • Distributed over the web . . .
  • Dynamically findable and linkable . . .
  • Possibly paying for services . . .
  • Reconfigurable . . .
  • . . . and Better and Better all the time

23
CSE 655 Big Themes
  • How do high-level languages do these thingsand
    how are they translated to a lower-level?
  • Control Structures
  • Structured (no gotos) programming
  • Loops, ifs, case, subprograms, coroutines
  • Exits, breaks, exceptions, events
  • Data Structures
  • Implicit and explicit relationships
  • Object-oriented programming
  • Aspect-oriented programming

24
Other 655 Goals or Approaches
  • Not a couple of weeks and a program in each
    language
  • Most languages have a common computational core
    and simple programs can be written a number of
    ways
  • Trying to emphasize differences in approach
  • Not a lot of low-level comparisons
  • Instructor attempting to identify ideas that may
    go in to future languages

25
Instructor's General Philosophy
  • There's more to programming than FORTRAN or C/C
    or Java or Ada or Lisp or any one language.
  • I intend to cover all relevant topics in the
    assigned text. I will cover all the topics
    usually covered in this course. We will also
    cover many additional topics.
  • I want to emphasize both the techniques and
    facilities for writing programs (mostly
    comparative programming languages) and the
    execution environments for those programs
    (compilers, interpreters, run-time support).

26
Programming Paradigms
  • Procedural/Imperative/Turing Machines (C, Pascal,
    Modula, Ada, FORTRAN, ALGOL, BASIC, COBOL)
  • Functional/Lambda Calculus (Lisp, ML)
  • Logic (PROLOG, expert systems)
  • Declarative (SQL)
  • Pattern matching/String Processing/Markov
    Algorithms (XSLT)
  • Object-Oriented (C, CLOS, Java, Ada95)
  • Event driven (Java, JavaScript, C)
  • Embedded/Real-Time (Ada)
  • Axiomatic Semantics (RESOLVE)
  • Scripting Languages (JavaScript, ECMAScript, PHP,
    Ruby)
  • Mixed Languages (Java Server Pages (JSP), Active
    Server Pages (ASP))
  • Macro processors, command interpreters, text
    processing, editors, scripting languages
  • Simulation, test automation, numeric machine
    control, problem domain oriented
  • Program development environments, testing,
    debugging

27
What to Program Machines To Do
  • 40's programmable electronic calculators
  • 50's combining that with data processing(punched
    card machines for accounting, payroll, record
    keeping) programming languages combining words,
    formulae, and numbers
  • 60's what can machines be programmed to
    do?Fortran, Cobol, Algol, Basic, Lisp, Snobol,
    APL
  • 70's Pascal to Ada, software engineering
  • 80's C to C, office automation, personal
    computers, artificial intelligence, beginning of
    object-oriented
  • 90's networking, Java, integrated versus personal
    applications, Web
  • 00s frameworks beyond programming languages

28
Another View
  • Data Processing (just manipulating numbers, data
    mining trying to see meaning / patterns)
  • Information Science(data for decision making)
  • Knowledge Based Systems / Expert Systems (if we
    know the rules can we automate them?)
  • Artificial Intelligence (if we dont know the
    rules, can we automate them anyway?)
  • Wisdom (how to make decisions, beyond what we
    know today)

29
Major Themes 1
  • Divide a program into comprehensible
    pieces(subprograms, types, declarations,
    objects, packages, threads, tasks)(control
    whats changed where)
  • Pieces communicate with each other(development
    (names), construction (linking), and execution
    times (parameter passing, named and positional),
    self describing data)
  • Know (formally) they'll work properly together
    (program proofs, design by contractcode
    reviews, inspections, walk throughs reliability
    of generated and linked code)

30
Major Themes 2
  • Describe the design and pieces(flow charts,
    design methodologies, UML, automatic
    documentation)
  • Modify the pieces (macros, generics, templates,
    instantiations)
  • Combine the pieces (loaders, linkers, build
    scripts, registries (dynamic), installers)
  • Adapt to the underlying execution environment
    (code generation, virtual machines, APIs,
    infrastructures, distributed code, CORBA,
    operating systems, optimizations, allocationsand
    garbage collection)

31
Breakthrough Ideas 1
  • Converting symbolic expressions to machine code
  • Grammars and understandability of programs
    parsing, compiling
  • Programs writing other programs
  • Structured control, subprograms, functional
    programming
  • Types as values with operations type
    handling, generics/templates
  • Binding approaches and timing
  • Language extensibility, macros, parameterized
    extensions, patterns

32
Breakthrough Ideas 2
  • Modularity, packages, environments, separate
    specifications, interfaces
  • Encapsulated objects and object extension,
    classes
  • Formal correctness, assertions
  • Error recovery in the running program
    exceptions
  • Concurrency, events
  • Program distribution
  • Components, reuse

33
  • ? Basics of Programming Languages
  • Life as a Computer Scientist ?
Write a Comment
User Comments (0)
About PowerShow.com