Скачать презентацию Visual Programming Qinwei Zhu Jiunwei Chen Contents Скачать презентацию Visual Programming Qinwei Zhu Jiunwei Chen Contents

9e22e2f43c8a16abc5e7141a73458244.ppt

  • Количество слайдов: 37

Visual Programming Qinwei Zhu Jiunwei Chen Visual Programming Qinwei Zhu Jiunwei Chen

Contents ¡ ¡ ¡ What is a VPL? Motivations Examples Advantages / Disadvantages Brief Contents ¡ ¡ ¡ What is a VPL? Motivations Examples Advantages / Disadvantages Brief Survey of VPLs in Detail l ¡ ¡ Prograph, VIPR VPL Issues and Classifications References

What is a VPL? ¡ ¡ A programming language that uses a visual representation What is a VPL? ¡ ¡ A programming language that uses a visual representation (such as graphics, drawings, animation or icons, partially or completely) A visual language manipulates visual information or supports visual interaction, or allows programming with visual expressions [Golin 90] Any system where the user writes a program using two or more dimensions [Myers 90] A visual language is a set of spatial arrangements of text-graphic symbols with a semantic interpretation that is used in carrying out communication actions in the world

What are NOT VPLs? ¡ Visual Basic, Visual C++, Delphi, etc. l l Still What are NOT VPLs? ¡ Visual Basic, Visual C++, Delphi, etc. l l Still primarily textual languages with a graphical GUI builder User interface portion of the language is visual, the rest is not

Motivations ¡ ¡ ¡ Many people think in pictures. Textual programming languages have proven Motivations ¡ ¡ ¡ Many people think in pictures. Textual programming languages have proven to be difficult for many people to learn to use effectively. Some applications are very well suited to graphical development approaches. l l Scientific visualization System simulation

Example 1: Factorial int Factorial(int n) { if(n > 0) return (n*factorial(n-1)); else return Example 1: Factorial int Factorial(int n) { if(n > 0) return (n*factorial(n-1)); else return (1); }

Forms/3 Example Forms/3 Example

Prograph Example Prograph Example

Example 2 msc Timeout 2; instance User; out Code to Keyboard; endinstance; instance Keyboard; Example 2 msc Timeout 2; instance User; out Code to Keyboard; endinstance; instance Keyboard; in Code from User; out Code to Main; endinstance; instance Screen; in `Enter amount' from Main; in `Take card' from Main; endinstance; instance Main; in Code from Keyboard; out `Enter amount' to Screen; set Timer (10); timeout Timer; out `Take card' to Screen; endinstance; endmsc;

Advantages ¡ ¡ ¡ Fewer programming concepts Concreteness Explicit depiction of relationships Immediate visual Advantages ¡ ¡ ¡ Fewer programming concepts Concreteness Explicit depiction of relationships Immediate visual feedback Eliminates an intermediate step in the process of creating a program

Advantages (cont’d) ¡ ¡ A different conceptual framework for the programming process(examples) Parallel computation Advantages (cont’d) ¡ ¡ A different conceptual framework for the programming process(examples) Parallel computation is a natural consequence of many visual programming paradigms

Disadvantages ¡ Deutsch Limit l ¡ The problem with visual programming is that you Disadvantages ¡ Deutsch Limit l ¡ The problem with visual programming is that you can't have more than 50 visual primitives on the screen at the same time. Some situations in which text has superiority: l l l documentation, naming to distinguish between elements that are of the same kind, and expressing well-known and compact concepts that are inherently textual, e. g. algebraic formulas.

Early Systems: 1966 -1980 o o Ambit Auto. Programmer Plan 2 D Tinker o Early Systems: 1966 -1980 o o Ambit Auto. Programmer Plan 2 D Tinker o Grail o Query by Example o Pygmalion o Outline

Visual Systems: 1981 -1990 ¡ ¡ ¡ ¡ ML-like VL Pict Formal Small. Star Visual Systems: 1981 -1990 ¡ ¡ ¡ ¡ ML-like VL Pict Formal Small. Star Hi-Visual PC-Titles Thing. Lab ARK o o o o Prograph GAL PIGS Show and Tell Tinker Toy C^2 Sun. PICT No. Pump. G

Modern Systems: 1991 o o o o Cube Cantata Hence 1. 4 Scheme. Paint Modern Systems: 1991 o o o o Cube Cantata Hence 1. 4 Scheme. Paint CODE 2. 0 Iconicode Viasvis MViews o o o o Forms/3 AVS Mondrian Chem. Trains Hyper. Pascal Vampire VIPR SPE

VPLs in Detail ¡ AVS and Khoros/Cantata (Monday) l l ¡ High-level languages Specific VPLs in Detail ¡ AVS and Khoros/Cantata (Monday) l l ¡ High-level languages Specific towards simulation and visualization Prograph, VIPR l l General-purpose VPLs Support for lower level features

Prograph ¡ General-purpose VPL l l l ¡ Object-oriented Data-flow driven Designed for Rapid Prograph ¡ General-purpose VPL l l l ¡ Object-oriented Data-flow driven Designed for Rapid Application Development (RAD) Developed by Pictograph Inc. l One of the more successful generalpurpose VPLs

Data Flow Model Information flows through a system ¡ Data is transformed at certain Data Flow Model Information flows through a system ¡ Data is transformed at certain points in the program ¡ Input ¡ Transform Output This model can represent the system at any level of abstraction l Application-level, package-level, classlevel, operation-level, etc.

Data Flow Model ¡ Little control over the order in which sections of a Data Flow Model ¡ Little control over the order in which sections of a program are executed l X Operations can execute after all their input data has arrived A C Y Z B

Prograph Components ¡ Sections l ¡ Analogous to Java packages Classes l l Attributes/methods Prograph Components ¡ Sections l ¡ Analogous to Java packages Classes l l Attributes/methods Single inheritance support

Prograph Components ¡ Methods l l ¡ Basis for control flow Contains the “meat” Prograph Components ¡ Methods l l ¡ Basis for control flow Contains the “meat” of the program Operations l l Basic executable component Operates on input, produces output Root Terminal

Hello. World Example Method case Operations Hello. World Example Method case Operations

Controls ¡ ¡ Attached to operations in order to control the flow of execution Controls ¡ ¡ Attached to operations in order to control the flow of execution Contains two aspects l l ¡ The action to be taken Whether or not the action is a success or a failure Allows the next case to be executed, or the current case terminated, etc. Next Case Control

Factorial Example Revisited Factorial Example Revisited

Prograph Users Generally used for in-house projects or small applications ¡ Corporate users include: Prograph Users Generally used for in-house projects or small applications ¡ Corporate users include: ¡ l l l Akamai Technologies, Inc. Boeing Dow Chemical Company Raytheon Westinghouse

VIPR ¡ Visual Imperative Programming l ¡ Almost completely visual l ¡ Uses a VIPR ¡ Visual Imperative Programming l ¡ Almost completely visual l ¡ Uses a nested series of rings Object-oriented l ¡ Developed at the University of Colorado Inheritance, polymorphism, etc. Semantics are similar to C++

Other VPLs ¡ Lab. VIEW (National Instruments) l ¡ Cube l ¡ For development Other VPLs ¡ Lab. VIEW (National Instruments) l ¡ Cube l ¡ For development of measurement and automation applications First 3 D VPL; almost completely visual Forms/3 l l Another general-purpose VPL, emphasizing data abstraction Uses a spreadsheet metaphor

VPL Issues ¡ Procedural Abstraction l l ¡ Data Abstraction l ¡ High-level vs. VPL Issues ¡ Procedural Abstraction l l ¡ Data Abstraction l ¡ High-level vs. Low-level Levels of abstraction, granularity Similar to the notion of data abstraction in conventional languages Control Flow l l l Data-flow model Message passing model … or others

Classifications 1. Purely visual languages • Icons or other graphical representations are manipulated e. Classifications 1. Purely visual languages • Icons or other graphical representations are manipulated e. g. Cube, VIPR, Prograph, … 2. Hybrid text and visual systems • • Programs are created visually and then translated into an underlying textual language Usage of graphical elements in an otherwise textual language e. g. Rehearsal World

Classifications 3. Programming-by-example systems • Teach a system how to perform a task e. Classifications 3. Programming-by-example systems • Teach a system how to perform a task e. g. Rehearsal World, Pygmalion 4. Constraint-oriented systems • Popular for simulation design e. g. Thing. Lab, ARK 5. Form-based systems • Uses a spreadsheet metaphor e. g. Forms/3, No. Pump. G

References ¡ ¡ ¡ http: //www. cs. washington. edu/homes/jpower/vpl_ home. html http: //www. wi. References ¡ ¡ ¡ http: //www. cs. washington. edu/homes/jpower/vpl_ home. html http: //www. wi. leidenuniv. nl/CS/SEIS/vislang/VLcourse. html http: //www-lsi. upc. es/~rbaeza/cursos/vp/todo. html http: //www. cs. berkeley. edu/~maratb/cs 263/ http: //www. efd. lth. se/~d 87 man/EXJOBB/MSC. html http: //www. ecs. soton. ac. uk/~tal 00 r/vlangs. html