3structured-flow - CSci 5106 Programming Languages...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CSci 5106: Programming Languages Imperative Programming – Structured Flow Constructs Gopalan Nadathur Department of Computer Science and Engineering University of Minnesota Lectures in Fall 2010 Gopalan Nadathur Structured Flow Constructs Imperative Programming (Recap) So called because programming is command oriented Commands cause changes in state States are made up of two components values in cells location of control or the “computation thread” Results are measured as snapshots of states functions return values of variables i/o operations display the values of particular variables Style of programming reflects the structure of a sequential machine Gopalan Nadathur Structured Flow Constructs Variability Within the Framework Different languages can make choices along at least the following dimensions: What devices (statement forms) are available for governing the flow of control? What kinds of values are handled? What primitive types are supported? What mechanisms are available for constructing new types? What devices are available for supporting the construction of correct programs? What devices are present for organizing programs? procedural and data abstraction, information hiding modular code development object-orientedness We will spend some time on each of these dimensions in turn Gopalan Nadathur Structured Flow Constructs Evaluation of Languages and Features Two kinds of questions may be asked here Do the language features make the underlying machine easier to use? do the statement forms yield understandable and comprehensive flow patterns? are the data representation capabilities sufficiently powerful? are the abstraction mechanisms strong and useful? Is there effective compile-time support for constructing correct programs? Are the features efficiently implementable? are there significant run-time costs? is the execution cost of the feature transparent? Gopalan Nadathur Structured Flow Constructs Motivating Structured Flow Constructs Programming brings with it two “contradictory” requirements program text must not be identical to dynamic behaviour short programs should be capable of carrying out long and complicated computations the same program should be able to manifest different behaviours depending on input dynamic behaviour should be predictable from static text “understanding a program should not require running it”...
View Full Document

Page1 / 5

3structured-flow - CSci 5106 Programming Languages...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online