Top Banner
Visual Programming SFT 5030 Bernd Meyer [email protected] Ph: 9905 2240 p://www.monash.edu.au/pubs/handbooks/units/CSE5030.
33
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

Visual Programming

SFT 5030

Bernd Meyer

[email protected]

Ph: 9905 2240

See http://www.monash.edu.au/pubs/handbooks/units/CSE5030.html

Page 2: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

Resources and Literature

Will be made available at http://www.csse.monash.edu.au/~berndm/SFT5030/

Clayton Campus, Building 26, Room 115

Wednesdays 11:00-12:00

Caulfield Campus, by appointment

Consultation

Page 3: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

Tutor

To be announced

Always:

Labs,

Tuesday, 8pm-10pm

B346B, B348B

Tutorials

Page 4: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

100% project-based homework

Implementation project using an object-oriented VPL

°Design Paper (10 %): April 1°Implementation (60 %): June 3°Documentation (30 %): June 3

Groupwork in pairs, if necessary one group with n=3

Implementation basis: Prograph CPX

Assignments should be received at identify place and process on or before the due date. Late submissions will be penalised at the rate of penalty rates. If you believe that your assignment will be delayed because of circumstances beyond your control such as illness you should apply for an extension before the due date. Medical certificates or certification supporting your application may be required.

Assessment

Page 5: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

•Working Knowledge of Object-Oriented Programming(no particular language)

•Basic Concepts of GUI Programming(Widget Programming, Event-driven Programming, Container Hierarchies, etc.)

•Overview of Alternative Programming Paradigms(as given e.g. in CSE 3322)Data-flow ProgrammingFunctional ProgrammingLogic Programming (Introduction in Course)

Prerequisite Knowledge

Page 6: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

It is important that your solutions to the assignment questions be your own work. It is perfectly acceptable to seek help and advice when completing the assignments, but this must not be taken to the point where what is submitted is in part someone else's work.

Please note that, since the assignments are used in assessing your final grade in this subject, the following Faculty policy applies. "Students should note that cheating is regarded as a very serious offence which is likely to lead not only to failure in the subject concerned but also to additional penalties including exclusion. Students should carefully note that the taking of any unauthorised material into examinations such as notes and unauthorised dictionaries will be regarded as cheating. Students should also note that essays, assignments and other work are generally understood to be the student's own work and where such work is identical with, or similar to, another student's work, an assumption of cheating may arise. Where students wish to undertake work in conjunction with other students, it is suggested that the matter be discussed with the lecturer concerned." Faculty of Computing and Information Technology Handbook In addition, the following School policy applies. "The assignments set in this subject are designed primarily as learning exercises, but they also contribute to your final grade.

Copying of other student's assignment solutions is unacceptable.

All students have a responsibility to ensure that their assignment solutions are their own work. You must ensure that others do not obtain access to your solutions for the purpose of copying a part of them. Where such plagiarism is detected, both of the assignments involved will receive no marks.

In significant cases of plagiarism, action may be taken against the offenders under the University's disciplinary regulations."

Cheating

Page 7: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

It is important that your solutions to the assignment questions be your own work. It is perfectly acceptable to seek help and advice when completing the assignments, but this must not be taken to the point where what is submitted is in part someone else's work.

Please note that, since the assignments are used in assessing your final grade in this subject, the following Faculty policy applies. "Students should note that cheating is regarded as a very serious offence which is likely to lead not only to failure in the subject concerned but also to additional penalties including exclusion. Students should carefully note that the taking of any unauthorised material into examinations such as notes and unauthorised dictionaries will be regarded as cheating. Students should also note that essays, assignments and other work are generally understood to be the student's own work and where such work is identical with, or similar to, another student's work, an assumption of cheating may arise. Where students wish to undertake work in conjunction with other students, it is suggested that the matter be discussed with the lecturer concerned." Faculty of Computing and Information Technology Handbook In addition, the following School policy applies. "The assignments set in this subject are designed primarily as learning exercises, but they also contribute to your final grade.

Copying of other student's assignment solutions is unacceptable.

All students have a responsibility to ensure that their assignment solutions are their own work. You must ensure that others do not obtain access to your solutions for the purpose of copying a part of them. Where such plagiarism is detected, both of the assignments involved will receive no marks.

In significant cases of plagiarism, action may be taken against the offenders under the University's disciplinary regulations."

Computing Resources

Page 8: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

•Why have you taken this subject?

•What do you expect to learn?

•Which programming languages do you know?

•Have you heard of visual programming languages? Which?

Questionnaire SFT5030

Page 9: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

Visual IDEs

(Visual Basic, Delphi …)

Page 10: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

Visual Basic is not a VPL!

Private Sub TimerMove ()

Static X As Long, Y As Long

X = X + 1Y = Y + 1

'Keep the ball of the edgeIf (X > Me.ScaleWidth) Then X = 0End If

If (Y > Me.ScaleHeight) Then Y = 0End If…End Sub

Page 11: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

AlgorithmAnimation

User Interfaces

Visual Programming

End User Languages

ComputerGraphics

ScientificVisualization

Visual Computing

Page 12: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

Prograph

Page 13: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

Visual Programming Languages :

Languages that use visual notationsor “Diagrams” for

expressing programming constructs,

e.g. Dataflow, Control flow, Abstraction etc.

Subfields:

End User Programming

Domain Specific Programming

Universal Programming Languages (*)

Definition of Visual Programming

Page 14: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

•Graphical User Interfaces

•Computer Graphics

•Information Visualization / Scientific Visualization

•End User Languages (Databases etc.)

•Special Purpose Languages (e.g. UML)

•Algorithm Animation

•Visual IDEs: Visual Basic, Delphi etc.

Related Areas

Page 15: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

Toontalk

Literature at http://www.toontalk.com

Page 16: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

•Learn about paradigms in VP

•Learn concrete VPLs in Research and Industry

•Learn implementation techniques for VPLs

•Learn about specification and formalization of VPLs

»Get a feeling for the potential of VPLs

»Learn about the limits of visual computing

…Implement a small project using an object-oriented VPL !

Goals of this course

Page 17: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

•Unit A: Visual Dataflow Programming in Prograph CPX

•Unit B: Paradigms of Visual Programming

•Unit C: Implementation and Specification of VPLs

•Unit C: Beyond Programming - Diagrammatic Reasoning

Course Outline

Page 18: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

•Overview of Visual Programming Paradigms

•Aspects of Prograph

•Basic Dataflow Programming

•Object-oriented Programming

•Debugging

•Using an Application Framework

•Project work for assignment

Unit A: Prograph

(4 Lectures)

Page 19: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

•Data Flow Languages

Prograph, Labview

•Functional Languages

Clarity, VEX

•Logic and Constraint Languages, Rule Languages

TPM, Pictorial Janus, ToonTalk

•Languages with new Paradigms

Agentsheets, KidSim, Forms3, ToonTalk

Unit B: Paradigms

(5 Lectures)

Page 20: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

•Overview of VPL Implementation

•Specification of VPLs

•Visual Language Syntax and Parsing

•Layout of VPLs

Unit B: Implementation / Specification

(2 Lectures)

Page 21: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

•Experimental Systems for Diagrammatic Reasoning

°BITPICT

°Inter-DR

•Diagrammatic Calculi and Diagrammatic Proofs

•Heterogeneous Reasoning

Unit C: Diagrammatic Reasoning

(1 Lectures)

Page 22: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

b

a

(a+b)2 =a2 +2ab+b2

“Proofs Without Words”

Page 23: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

“Proofs Without Words”

n2 = 2i −1i=1

n

Example of an Induction Schema

Page 24: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

Diagrammatic “Proof” of Pythagorean Thorem: Circa 200 B.C.

b

a

Reasoning by Diagram Transformation

Page 25: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

Diagrammatic “Proof” of Pythagorean Thorem: Circa 200 B.C.

b

a

Reasoning by Diagram Transformation

c

Page 26: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

Diagrams in Software Engineering

Page 27: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

Diagrammatic Refinement

A C

D

BA

BDC

DC

Are Diagrammatic “Proofs” for UML possible?

Page 28: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

Paradigms of Visual Programming

•Dataflow ProgrammingNodes describe operations, arrows the flow of information between these nodes

•Rule-based visual ProgrammingBasis: Logical Implication

“if fact A holds, then fact B holds”or Production-system like action rules

“if situation A is found, then do action B”•Functional Programming

Basis: mathematical functions (without side-effects)a program has the form

f1(f2(f3(... (input) ...)))

Page 29: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

Functional Visual Programming

CLARITY (http://www.clarity-support.com/)

Clarity is a complete functional language in the style of MLoriginal motivation for Clarity was work on the functional database model

An important aspect is the incremental, interactive design of programs

The claim of the Clarity designers is that visualization introduces an

additional conceptual level.

Page 30: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

Rule-based Visual Programming

Universal Programming Paradigms•Visual Logic Programming (Prolog etc.)•Visual Constraint Programming (Pictorial Janus, Toontalk)

Programming Paradigms for Programming with Pictures, particularly visual Simulations

•Production-system languages pixel-based: BitPicthigh-level image based: Agentsheets

(http://www.agentsheets.com)

Visual production systems generally have the formSearchPicture => Modification

This is interpreted as “if you find the picture SearchPicture in the current picture then apply the right-hand side modification to the current picture”

•Can be used for simplified “Programming by Example”

Page 31: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

Visual Production Systemsused for implementing computations that directly operate on pictures.Mainly experimental research vehicle.

Only real-world application: Visual Simulation / Creating Animation

Example: BITPICT, a system for reasoning purely by diagram transformation.(For more information visit http://www.si.umich.edu/~furnas/)

The given rules (right) count the number of trees in a “tangled forest” by reducing each tree to a single dot.

Page 32: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

Data Flow Programs

Visual data-flow programming is the most common visual programming paradigm.

We use Prograph CPX as described in“Visual Programming with Prograph CPX” by Scott B. Steinman and Kevin G. Carver, Manning Publications/Prentice Hall, ISBN 0134411633

“The Power of Prograph CPX”by D. Shafer,The Reader Network, 1994.(out of print)

More information on (as well as the implementations of) Prograph can be found athttp://www.pictorius.com/prograph.html

Prograph CPX runs on Windows and will be available in the CA Labs.

Page 33: Visual Programming SFT 5030 Bernd Meyer bernd.meyer@acm.org Ph: 9905 2240 See .

Recommended LiteratureThere are no prescribed texts.

“Visual Programming with Prograph CPX” by Scott B. Steinman and Kevin G. Carver, Manning Publications/Prentice Hall, ISBN 0134411633

Is recommended (the only available text on Prograph), but not strictly required.

Other literature (research papers) will be referenced throughout the subject and are generally available on the web.

For the project you should read the following paper, which will be availble on-line.

Simulating Graphs as Physical Systems, A. Frick, G. Sander and K. Wang in Dr. Dobbs Journal, August 1999 R. Davidson and D. Harel. Drawing Graphs Nicely Using Simulated Annealing. ACM Transactions on Graphics, 15(4):301-331, October 1996.

Fruchtermann, T. M. J. and Reingold, E. M. (1991). Graph drawing by force-directed placement. Software Practice and Experience, 21(11):1129--1164.