Programming%20in%20Several%20Dimensions - PowerPoint PPT Presentation

About This Presentation
Title:

Programming%20in%20Several%20Dimensions

Description:

Programming in Several Dimensions Paul Lyons Massey University Textual Languages are One-dimensional Computers Support Multi-dimensionality A Multi-dimensional ... – PowerPoint PPT presentation

Number of Views:48
Avg rating:3.0/5.0
Slides: 29
Provided by: PaulL234
Category:

less

Transcript and Presenter's Notes

Title: Programming%20in%20Several%20Dimensions


1
(No Transcript)
2
Programming in Several Dimensions
  • Paul Lyons
  • Massey University

3
Textual Languages are One-dimensional
How about programs?
Computers are sequential.
Input devices Output devices Memory
addresses Accumulator Buses Parsers
Flow of control Sequential syntax Tree-structured
semantics Declarations Tree-structured Inverted
w.r.t. procedures I/O Asynchronous
4
Computers Support Multi-dimensionality
Power Easy 2-D input High-res 2-D and 3-D
graphic output Multiple window support
Synchronous updating Hyperlinks
5
A Multi-dimensional Language
Desiderata
High-level
Multiple views Non-sequential access Easy
editing Efficient space use
Mid-level
Control relationships Text where
appropriate Graphics where appropriate
Low-level
Group related concepts Purge brackets
6
HyperPascal
Visualisations
hyperlinks
Action Tree
Scope Tree
7
HyperPascal
Visualisations
hyperlinks
Action Tree
Scope Tree
8
HyperPascal
Visualisations
hyperlinks
Scope Tree
Action Tree
9
HyperPascal
Visualisations
hyperlinks
Scope Tree
Action Tree
10
HyperPascal
Structure Template Visualisation
Dot-and-caret notation
Pictorial notation
new(newNode) newNode.data x if L nil
then begin L newNode.next L
newNode end else begin parent nil
thisNode L status running while
status running do begin if
(thisNode.data gt x) or (thisNode nil)_then
begin newNode.next thisNode if
parent nil then L newNode else
parent.next newNode status
finished end then clause else begin
parent thisNode thisNode
thisNode.next end if end end
11
new(newNode) newNode.data x if L nil
then begin newNode.next L L
newNode end else begin L isnt nil parent
nil thisNode L status running
while status running do begin if
(thisNode.data gt x) or (thisNode nil)_then
begin newNode.next thisNode if
parent nil then L newNode else
parent.next newNode status
finished end then clause else begin the
node goes somewhere else parent
thisNode thisNode thisNode.next end
if end end
HyperPascal
Structure Template Visualisation
Dot-and-caret notation
Pictorial notation
new(newNode) newNode.data x if L nil
then begin L newNode.next L
newNode end else begin parent nil
thisNode L status running while
status running do begin if
(thisNode.data gt x) or (thisNode nil)_then
begin newNode.next thisNode if
parent nil then L newNode else
parent.next newNode status
finished end then clause else begin
parent thisNode thisNode
thisNode.next end if end end

12
new(newNode) newNode.data x if L nil
then begin newNode.next L L
newNode end else begin L isnt nil parent
nil thisNode L status running
while status running do begin if
(thisNode.data gt x) or (thisNode nil)_then
begin newNode.next thisNode if
parent nil then L newNode else
parent.next newNode status
finished end then clause else begin the
node goes somewhere else parent
thisNode thisNode thisNode.next end
if end end
parent thisNode thisNode
thisNode.next
13
HyperPascal
Structure Template Visualisation
Dot-and-caret notation
Pictorial notation
new(newNode) newNode.data x if L nil
then begin L newNode.next L
newNode end else begin parent nil
thisNode L status running while
status running do begin if
(thisNode.data gt x) or (thisNode nil) then
begin newNode.next thisNode if
parent nil then L newNode else
parent.next newNode status
finished end then clause else begin
parent thisNode thisNode
thisNode.next end if end end
14
HyperPascal
Pictorial declarations
15
HyperPascal
16
HyperPascal
Easy-to-draw pictures
17
HyperPascal
Easy-to-draw pictures
18
HyperPascal
Easy-to-draw pictures
19
HyperPascal
Easy-to-draw pictures
gtx
20
HyperPascal
Easy-to-draw pictures
gtx
21
HyperPascal
Easy-to-draw pictures
gtx
22
HyperPascal
Easy-to-draw pictures
gtx
23
HyperPascal
Easy-to-draw pictures
x
gtx
24
HyperPascal
Easy-to-draw pictures
if thisNode ltgt nil then if thisNode.data gt x
then generate after-picture1
else thisNode ltgt nil and thisNode.data ltx
generate after-picture 2
else thisNode nil
generate after-picture 3
25
HyperPascal
Three-layer architecture
Draw commands
User actions
(undistorted coordinates)
(undistorted coordinates)
Object association information
Redraw messages
(coordinate-free)
(coordinate-free)
26
HyperPascal
FIN
27
(No Transcript)
28
HyperPascal
Easy-to-draw pictures
if thisNode ltgt nil then if thisNode.data gt x
then generate after-picture1 else
thisNode.data ltx generate after-picture
2 else thisNode nil generate after-picture
3
if L ltgt nil then if L.data gt x then generate
after-picture1 else L.data ltx generate
after-picture 2 else L nil
if L ltgt nil then if L.data gt x then generate
after-picture1 else L.data ltx generate
after-picture 2
Write a Comment
User Comments (0)
About PowerShow.com