DOC PREVIEW
UT Arlington CSE 3302 - Lecture Notes

This preview shows page 1-2-15-16-17-32-33 out of 33 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CSE3302 Programming Languagesprogramming languageWhy is this interesting?Why is this useful?PrinciplesEarly computingConstraintsWhat must a “pseudo-code” (or a programming language) do?Decisions to make (OK, just a few of them)The Principles (again)Arithmetic vs. ComparisonMoving, Indexing & Looping [ Addresses ]Input and OutputProgram StructureInterpreter enhancementsSymbolic Pseudo CodePhenomenologyEfficiency : FortranAdoption and Use of FortranFortran structureImperative statementsFortran Control IssuesSubroutines in FortranFortran: Activation RecordFortran: Data StructuresSlide 26Fortran: Data IssuesFortran: Name structuresCOMMON blocksLanguage DefinitionFortran syntaxFirst Generation LanguagesLanguage Design IssuesCSE 3302 CSE@UTA Programming LanguagesCh. 0 - 2Ch. 0 - 2 1 jcmtCSE3302CSE3302Programming LanguagesProgramming LanguagesDr. Carter TiernanCSE 3302 CSE@UTA Programming LanguagesCh. 0 - 2Ch. 0 - 2 2 jcmtprogramming languageprogramming languagea language that is intended for the expression of computer programs and is capable of expressing anyany computer programA isCSE 3302 CSE@UTA Programming LanguagesCh. 0 - 2Ch. 0 - 2 3 jcmtWhy is this interesting?Why is this interesting?•Although it’s possible to write any program in any language, it’s not equally easy to do so.•Languages are the tools of the central activity of computer science•The structure of language defines the boundaries of thought•Motivation for and use of modern language facilitiesCSE 3302 CSE@UTA Programming LanguagesCh. 0 - 2Ch. 0 - 2 4 jcmtWhy is this useful?Why is this useful?•Learning language mechanisms can allow you to simulate such things even in a language that does not provide them•Presents the most important principles for the design, evaluation, and implementation of programming languagesCSE 3302 CSE@UTA Programming LanguagesCh. 0 - 2Ch. 0 - 2 5 jcmtPrinciplesPrinciples•Open the front cover of your textbook.•Yes, right now.CSE 3302 CSE@UTA Programming LanguagesCh. 0 - 2Ch. 0 - 2 6 jcmtEarly computingEarly computing•Numeric programming with coding of instructions •A “pseudo-code” was a primitive language that implemented the machine code operations with different, and hopefully easier to use, codes–interpreted or–(eventually) compiledCSE 3302 CSE@UTA Programming LanguagesCh. 0 - 2Ch. 0 - 2 7 jcmtConstraintsConstraints•Very slow•Very small memory•Computer time cost more than programmer time•For numeric programming -–Significant floating point calculations–Requirement for indexing dataCSE 3302 CSE@UTA Programming LanguagesCh. 0 - 2Ch. 0 - 2 8 jcmtWhat must a “pseudo-code” (or a What must a “pseudo-code” (or a programming language) do?programming language) do?Originally based on what the actual Originally based on what the actual machine could do:machine could do:•Floating point arithmetic and comparisons•Indexing•Transfer of control•I/OCSE 3302 CSE@UTA Programming LanguagesCh. 0 - 2Ch. 0 - 2 9 jcmtDecisions to makeDecisions to make(OK, just a few of them)(OK, just a few of them)•Syntax?•How large can addresses be?•How long can instructions be?•How should we code the operations?•and so on…CSE 3302 CSE@UTA Programming LanguagesCh. 0 - 2Ch. 0 - 2 10 jcmtThe Principles (again)The Principles (again)•Identify elements most important to good programming language design•Apply with flexibility•Balance among contradictory •Modeled on Strunk and WhiteCSE 3302 CSE@UTA Programming LanguagesCh. 0 - 2Ch. 0 - 2 11 jcmtArithmetic vs. ComparisonArithmetic vs. Comparison•Calculate values•Use operands•Values created can be used or stored•Test values•Use operands•Test results can be used or stored•Test results may control program flowCSE 3302 CSE@UTA Programming LanguagesCh. 0 - 2Ch. 0 - 2 12 jcmtMoving, Indexing & LoopingMoving, Indexing & Looping[ Addresses ][ Addresses ]•Moving –Put a value into a memory address•Indexing–Access a single element from a multiple element structure - an array•Looping–Change the flow of the program back to a previous locationCSE 3302 CSE@UTA Programming LanguagesCh. 0 - 2Ch. 0 - 2 13 jcmtInput and OutputInput and Output•Based on I/O devices and methods of the time–Punched cards–Paper tape–Keyboards•{Not much to say about this one}CSE 3302 CSE@UTA Programming LanguagesCh. 0 - 2Ch. 0 - 2 14 jcmtProgram StructureProgram Structure•Declarations•Instructions•Input dataInterpreterInterpreterExecutionExecution1. Read instruction2. Decode3. Execute4. Repeat steps with next instructionCSE 3302 CSE@UTA Programming LanguagesCh. 0 - 2Ch. 0 - 2 15 jcmtInterpreter enhancementsInterpreter enhancements•Program tracing–Breakpoints–Data trap•Labels for statements and variables–Beginning of symbol table•TranslationCSE 3302 CSE@UTA Programming LanguagesCh. 0 - 2Ch. 0 - 2 16 jcmtSymbolic Pseudo CodeSymbolic Pseudo Code•Syntax•Punch cards led to fixed format fields•Key punches only had upper case•VAR format•Prefix notationCSE 3302 CSE@UTA Programming LanguagesCh. 0 - 2Ch. 0 - 2 17 jcmtPhenomenologyPhenomenology•Ampliative and Reductive•Fascination and Fear•Direct vs. Mediated (transparency)•Focus and ActionCSE 3302 CSE@UTA Programming LanguagesCh. 0 - 2Ch. 0 - 2 18 jcmtEfficiency : FortranEfficiency : Fortran•Inclusion of floating point arithmetic and indexing in hardware exposed the overhead of interpreters•John Backus of IBM recognized that language adoption would be based on :–Use of conventional mathematical notation–Highly efficient (machine) code producedCSE 3302 CSE@UTA Programming LanguagesCh. 0 - 2Ch. 0 - 2 19 jcmtAdoption and Use of FortranAdoption and Use of Fortran•Development of a usable Fortran took 2 years (18 person/years) of effort (starting in 1955)•Within a year and a half, approximately half the code being written for the IBM 704 machines was in Fortran•Why?–Exceptionally clear documentation–Very sophisticated optimization techniques•Many versions exist and are in use•Book focuses on ANS Fortran IV (’66)CSE 3302 CSE@UTA Programming LanguagesCh. 0 - 2Ch. 0 - 2 20 jcmtFortran structureFortran structure•Subprograms–Parameters–COMMON blocks •Declarative or Imperative (nonexecutable vs. executable)–Allocate, bind and initialize at declaration–Compute, control flow, or I/O•Stages and phases of compilationCSE 3302 CSE@UTA Programming LanguagesCh. 0 - 2Ch. 0 - 2 21 jcmtImperative


View Full Document

UT Arlington CSE 3302 - Lecture Notes

Documents in this Course
Smalltalk

Smalltalk

11 pages

Syntax

Syntax

5 pages

Syntax

Syntax

5 pages

JAVA

JAVA

57 pages

Semantics

Semantics

41 pages

Control

Control

74 pages

Load more
Download Lecture Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?