experiences with visual programming languages for end-users and specific domains

19
Oct 14, 2001 OOPSLA’01- DSVL 1 Experiences with Visual Programming Languages for End-Users and Specific Domains Philip T. Cox Trevor J. Smedley Dalhousie University Halifax, Canada

Upload: marvin-kirby

Post on 02-Jan-2016

38 views

Category:

Documents


1 download

DESCRIPTION

Experiences with Visual Programming Languages for End-Users and Specific Domains. Philip T. Cox Trevor J. Smedley Dalhousie University Halifax, Canada. Introduction. Spreadsheets Domain - tabular arithmetic End-user - accountant Metaphor - paper ledger - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Experiences with Visual Programming Languages for End-Users and Specific Domains

Oct 14, 2001 OOPSLA’01- DSVL 1

Experiences withVisual Programming

Languagesfor End-Users and Specific

Domains

Experiences withVisual Programming

Languagesfor End-Users and Specific

DomainsPhilip T. Cox Trevor J. Smedley

Dalhousie UniversityHalifax, Canada

Philip T. Cox Trevor J. SmedleyDalhousie University

Halifax, Canada

Page 2: Experiences with Visual Programming Languages for End-Users and Specific Domains

Oct 14, 2001 OOPSLA’01- DSVL 2

IntroductionIntroduction

• Spreadsheets– Domain - tabular arithmetic– End-user - accountant– Metaphor - paper ledger

• Why are they successful?– They employ a well-understood, concrete representation in a specific

domain (“Closeness of Mapping” - Green & Petre ‘96)

• General principles– Rely on concepts/actions familiar to the intended user– The more specific the domain, the more concrete the programming

language

• Three projects …

• Spreadsheets– Domain - tabular arithmetic– End-user - accountant– Metaphor - paper ledger

• Why are they successful?– They employ a well-understood, concrete representation in a specific

domain (“Closeness of Mapping” - Green & Petre ‘96)

• General principles– Rely on concepts/actions familiar to the intended user– The more specific the domain, the more concrete the programming

language

• Three projects …

Page 3: Experiences with Visual Programming Languages for End-Users and Specific Domains

Oct 14, 2001 OOPSLA’01- DSVL 3

1. Autonomous Robots1. Autonomous Robots

• Have sensors and effectors• React to changing conditions • Operate in partly unknown & changing

environments • Require problem-solving abilities • Exhibit reactive behaviour • Programming

– Direct coding of sensor/effector feedback

– High-level planning - mechanical deduction (eg STRIPS)

– Logic programming based systems – Layered control architectures (eg

Brooks subsumption architecture)

• Have sensors and effectors• React to changing conditions • Operate in partly unknown & changing

environments • Require problem-solving abilities • Exhibit reactive behaviour • Programming

– Direct coding of sensor/effector feedback

– High-level planning - mechanical deduction (eg STRIPS)

– Logic programming based systems – Layered control architectures (eg

Brooks subsumption architecture)

• Examples: Mars Rover; Lego car and Handyboard• Examples: Mars Rover; Lego car and Handyboard

Page 4: Experiences with Visual Programming Languages for End-Users and Specific Domains

Oct 14, 2001 OOPSLA’01- DSVL 4

Generality vs. ConcretenessGenerality vs. Concreteness

• Want “closeness of mapping” of language to domain– include representation of robot and environment in the

programming language – programming involves realistic interaction with this

representation • Also want generality

– applicable to a large class of robots (eg free-ranging, autonomous robots requiring reactive control mechanisms)

• Apparently contradictory criteria– generality vs. closeness to specific domain

• Want “closeness of mapping” of language to domain– include representation of robot and environment in the

programming language – programming involves realistic interaction with this

representation • Also want generality

– applicable to a large class of robots (eg free-ranging, autonomous robots requiring reactive control mechanisms)

• Apparently contradictory criteria– generality vs. closeness to specific domain

Page 5: Experiences with Visual Programming Languages for End-Users and Specific Domains

Oct 14, 2001 OOPSLA’01- DSVL 5

Two-phase processTwo-phase process

• Specification phase– Hardware Definition Module (HDM) – editing environment for specifying “syntax and semantics” of target robot

and environment – builds visual representation of robot and environment – specifies interactions between robot and environment – specifies relationship between “software” robot and “hardware” robot – outputs hardware specification structure

• Realisation phase– Software Definition Module (SDM) – inputs hardware specification structure – user builds control programs by interacting with “software” robot

• Specification phase– Hardware Definition Module (HDM) – editing environment for specifying “syntax and semantics” of target robot

and environment – builds visual representation of robot and environment – specifies interactions between robot and environment – specifies relationship between “software” robot and “hardware” robot – outputs hardware specification structure

• Realisation phase– Software Definition Module (SDM) – inputs hardware specification structure – user builds control programs by interacting with “software” robot

Page 6: Experiences with Visual Programming Languages for End-Users and Specific Domains

Oct 14, 2001 OOPSLA’01- DSVL 6

HDM - building the environment

HDM - building the environment

• Build “tiles”– Region of any shape

corresponding to specific value for a property

• Combine tiles into components• Define classes from

components

• Build “tiles”– Region of any shape

corresponding to specific value for a property

• Combine tiles into components• Define classes from

components

Page 7: Experiences with Visual Programming Languages for End-Users and Specific Domains

Oct 14, 2001 OOPSLA’01- DSVL 7

HDM - building the robot: sensors

HDM - building the robot: sensors

• Defines appearance of sensor in simulated world

• Relates simulated sensor to real world sensor

• Defines interaction between simulated sensor and simulated environment

• Defines appearance of sensor in simulated world

• Relates simulated sensor to real world sensor

• Defines interaction between simulated sensor and simulated environment

Page 8: Experiences with Visual Programming Languages for End-Users and Specific Domains

Oct 14, 2001 OOPSLA’01- DSVL 8

HDM - building the robot: effectors

HDM - building the robot: effectors

• Defines appearance of effector in simulated world• Relates simulated effector to real world effector• Defines effect of simulated effector on simulated environment

• Defines appearance of effector in simulated world• Relates simulated effector to real world effector• Defines effect of simulated effector on simulated environment

Page 9: Experiences with Visual Programming Languages for End-Users and Specific Domains

Oct 14, 2001 OOPSLA’01- DSVL 9

SDM - programming by demonstration

SDM - programming by demonstration

• Build an environment from instances of environment components

• Build a robot from sensors, effectors and inert pieces• Program behaviours (finite state machines) by running

simulated robot in simulated environment

• Build an environment from instances of environment components

• Build a robot from sensors, effectors and inert pieces• Program behaviours (finite state machines) by running

simulated robot in simulated environment

Page 10: Experiences with Visual Programming Languages for End-Users and Specific Domains

Oct 14, 2001 OOPSLA’01- DSVL 10

2. Design of Structured Objects

2. Design of Structured Objects

• Electronic devices • Mechanical devices • Biological structures • Buildings • Software - a special case

– algorithms – data structures

• Electronic devices • Mechanical devices • Biological structures • Buildings • Software - a special case

– algorithms – data structures

Page 11: Experiences with Visual Programming Languages for End-Users and Specific Domains

Oct 14, 2001 OOPSLA’01- DSVL 11

Design ActivitiesDesign Activities

• Building, editing– software: coding, building data structures– other: drafting, maybe coding

• Testing, debugging– software: interpreting– other: simulation, trial assembly

• Generating production model– software: compilation– other: generating such things as numerical control codes

• Building, editing– software: coding, building data structures– other: drafting, maybe coding

• Testing, debugging– software: interpreting– other: simulation, trial assembly

• Generating production model– software: compilation– other: generating such things as numerical control codes

Page 12: Experiences with Visual Programming Languages for End-Users and Specific Domains

Oct 14, 2001 OOPSLA’01- DSVL 12

Tools: Design vs Programming

Tools: Design vs Programming

• Design environments– Highly graphical– Evolved from drawing applications– Parametrisation requires programming - leads to dichotomy

between design and coding• Programming languages

– Traditionally dominated by textual expression– Evolved from machine-level coding– Recent move toward visualisation– Effectiveness of visual languages

• Design environments– Highly graphical– Evolved from drawing applications– Parametrisation requires programming - leads to dichotomy

between design and coding• Programming languages

– Traditionally dominated by textual expression– Evolved from machine-level coding– Recent move toward visualisation– Effectiveness of visual languages

Page 13: Experiences with Visual Programming Languages for End-Users and Specific Domains

Oct 14, 2001 OOPSLA’01- DSVL 13

Parametrised DesignParametrised Design

• Build an elastic n-tooth partial cog from elastic teeth– Build an elastic 1-tooth partial cog

by adding a tooth to a 0-tooth partial cog (?)

– Build an elastic 2-tooth partial cog by adding a tooth to a 1-tooth partial cog

– Build an elastic n-tooth partial cog by adding a tooth to an (n-1)-tooth partial cog

• Build an n-tooth cog by joining the open faces of the elastic n-tooth partial cog

• Build an elastic n-tooth partial cog from elastic teeth– Build an elastic 1-tooth partial cog

by adding a tooth to a 0-tooth partial cog (?)

– Build an elastic 2-tooth partial cog by adding a tooth to a 1-tooth partial cog

– Build an elastic n-tooth partial cog by adding a tooth to an (n-1)-tooth partial cog

• Build an n-tooth cog by joining the open faces of the elastic n-tooth partial cog

Page 14: Experiences with Visual Programming Languages for End-Users and Specific Domains

Oct 14, 2001 OOPSLA’01- DSVL 14

LSD - Language for Structured Design

LSD - Language for Structured Design

• Extension of visual logic programming language (Lograph)

• Extension of visual logic programming language (Lograph)

QuickTime™ and aVideo decompressor

are needed to see this picture.

Page 15: Experiences with Visual Programming Languages for End-Users and Specific Domains

Oct 14, 2001 OOPSLA’01- DSVL 15

3. Visual Scripting for Handhelds

3. Visual Scripting for Handhelds

• Increasing power and widespread use of handheld computers

• Expect an evolution parallel to that which we have seen with desktop computers, where end users increasingly want access to programming abilities

• Significant challenges relating to relativelylow processing power, small screen sizeand difficulty with textual input

• Increasing power and widespread use of handheld computers

• Expect an evolution parallel to that which we have seen with desktop computers, where end users increasingly want access to programming abilities

• Significant challenges relating to relativelylow processing power, small screen sizeand difficulty with textual input

Page 16: Experiences with Visual Programming Languages for End-Users and Specific Domains

Oct 14, 2001 OOPSLA’01- DSVL 16

Component ModelComponent Model

• Particularly interested in handheld computers with expansion capabilities, such as the Handspring Visor

• Component-based approach to scripting– Script components

• User defined scripts, created on the handheld– User interface components

• Windows and menus, created on the handheld– External components

• “Glue” to connect external devices and other software to scripting environment

• Defined using a desktop tool by a professional programmer and imported to the handheld

• Particularly interested in handheld computers with expansion capabilities, such as the Handspring Visor

• Component-based approach to scripting– Script components

• User defined scripts, created on the handheld– User interface components

• Windows and menus, created on the handheld– External components

• “Glue” to connect external devices and other software to scripting environment

• Defined using a desktop tool by a professional programmer and imported to the handheld

Page 17: Experiences with Visual Programming Languages for End-Users and Specific Domains

Oct 14, 2001 OOPSLA’01- DSVL 17

Execution ModelExecution Model

• Triggers are used to cause the execution of scripts– Button press, phone ring, etc.

• Sources and sinks are used to extract information from and provide information to components– Accessing text fields of windows, getting the caller id

information of an incoming call, etc.• Specialised operations for conditional and repeated

execution• Reusability of components

• Triggers are used to cause the execution of scripts– Button press, phone ring, etc.

• Sources and sinks are used to extract information from and provide information to components– Accessing text fields of windows, getting the caller id

information of an incoming call, etc.• Specialised operations for conditional and repeated

execution• Reusability of components

Page 18: Experiences with Visual Programming Languages for End-Users and Specific Domains

Oct 14, 2001 OOPSLA’01- DSVL 18

DemoDemo

• Very early in implementation• Currently have:

– Interface definition with a small number of interface elements– Scripting environment with Sources, Sinks, Triggers and a

small number of primitive operations– No conditional or repeated execution– No external components, and only very preliminary work on

tool for their definition– Undoubtedly lots of bugs, so bear with us!!

• Very early in implementation• Currently have:

– Interface definition with a small number of interface elements– Scripting environment with Sources, Sinks, Triggers and a

small number of primitive operations– No conditional or repeated execution– No external components, and only very preliminary work on

tool for their definition– Undoubtedly lots of bugs, so bear with us!!

Page 19: Experiences with Visual Programming Languages for End-Users and Specific Domains

Oct 14, 2001 OOPSLA’01- DSVL 19

Concluding RemarksConcluding Remarks

• The future of visual programming – application to specific domains.

• Three example projects– domains from concrete to more abstract.

• Reduces cognitive load on users required to build structures from textual encodings.

• No testable implementations yet. – PDA project most abstract, so likely the first to be user-tested

• The future of visual programming – application to specific domains.

• Three example projects– domains from concrete to more abstract.

• Reduces cognitive load on users required to build structures from textual encodings.

• No testable implementations yet. – PDA project most abstract, so likely the first to be user-tested