Interrogative Programming - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Interrogative Programming

Description:

Non-programmer is someone who has never programmed in a language with loops or ... Platform-independent (written in Python) Can generate code in any language. ... – PowerPoint PPT presentation

Number of Views:42
Avg rating:3.0/5.0
Slides: 19
Provided by: alexq
Category:

less

Transcript and Presenter's Notes

Title: Interrogative Programming


1
Interrogative Programming
Alex Quinn aquinn_at_cs.washington.edu http//www.cs.
washington.edu/homes/aquinn/ips/ May 17, 2002
2
Basic Idea
  • Allow non-programmers to create programs by
    answering a series of closed-ended questions.
  • Non-programmer is someone who has never
    programmed in a language with loops or control
    flow.

3
Outline
  • Human Computer Interaction
  • Interrogative Programming Overview
  • User study
  • Future work

4
Outline
  • Human Computer Interaction
  • Interrogative Programming Overview
  • User study
  • Future work

5
How do we interact with Computers?
  • Standard point and click interfaces
  • Buttons, scroll bars, etc.
  • Special hardware for special purposes
  • Speech, art pads, eye trackers, MIDI keyboards
    etc.
  • Special software for special purposes
  • Paint programs, the office "assistant"

6
Outline
  • Human Computer Interaction
  • Interrogative Programming Overview
  • User study
  • Future work

7
Motivation
  • "Make a computer that can program itself."
  • Put computer in the role of a consultant.
  • Empower end-users (non-programmers) to create
    useful programs
  • Bridge the gap between the user's concept of a
    solution and the computer's required method of
    specification (e.g. a programming language).

8
Interrogative Programming Foundations
  • Computer extracts specification from user through
    closed ended questions
  • More specifically, computer "parses" user's
    intent
  • "Top-down recursive decent parse"
  • Based on a context-free grammar

9
IPS A prototype
  • Console based interaction.
  • Platform-independent (written in Python)
  • Can generate code in any language.
  • C, C, Java, Python, Perl, HTML, etc.

10
Example
Computer This system is capable of creating
programs to do simple mathematical computations.
Does this sound like what you want to do? 1.
Yes 2. No User 1 (Yes) Computer Please choose
the kind of operation that is closest to what you
want to do. 1. do a specialized financial
computation 2. create some kind of desk
calculator 3. do some numerical process 4. undo
go back to the previous question 5. exit
quit this session User 3 (General numerical
process) Computer Please pick the type of
numerical process you want to perform. 1. do a
probability simulation 2. operate on some
numbers in a particular set 3. compute an
iterative estimate 4. do something else User 2
(Operate on numbers in a set) Computer To
operate on numbers in a set, you need to (a)
define the set of numbers to work on, and (b)
specify what operations you want to do with
that set. ... ...
11
Domain Example
name statement_list productions string("give a
name to the group of instructions you are about
to specify") statement("specify instructions
for 1") options "specify some instructions for
the computer" code include ltstdio.hgt / Begin
"1" / 2 name statement productions
print_stmt("display some text")
assignment("change the value of a variable")
input_stmt("get some input from the user")
loop("repeat some actions") options code
1 help 1. The first option is to print
something to the screen. 2. Changing a the value
of a variable requires that you create a
variable first. You can also use this to do
calculations. 3. Getting input from the user
will print a message you specify and then let
the user enter something to be stored in one
of your variables. 4. You can use this to repeat
one or many instructions. name
print_stmt productions string("enter the text
you want to display") options "enter the text to
be printed" code printf("1\n")
12
IPS Flow
To specify some actions you have 4 choices.
Please pick one. 1. Print something to the
screen. 2. Create or change a variable. 3. Get
some input from the user. 4. Repeat some
action(s) a certain number of times. 6. EXIT
name statement productions print_stmt("display
some text") assignment("change the value of a
variable") input_stmt("get some input from
the user") loop("repeat some
actions") options "display some text" "change
the value of a variable" "get some input from
the user" "repeat some actions" code
1 help .....
13
Outline
  • Human Computer Interaction
  • Interrogative Programming Overview
  • User study
  • Future work

14
User Study
  • Successes
  • General approach works
  • Pitfalls
  • Language issues need more work
  • Users need feedback
  • Users need to know what they are trying to do.

15
Possible Applications
  • People with disabilities
  • Internet programming
  • Text processing
  • Teaching tool (well, maybe)

16
Outline
  • Human Computer Interaction
  • Interrogative Programming Overview
  • User study
  • Future work

17
Future Work
  • Improve context and flow of conversation.
  • Wrap the dialog in some more friendly interface.
  • Speech?
  • Try mixing the dialog with some sort of GUI to
    allow better editing and feedback.

18
What to Take With You
  • Computers will become more customizable.
  • Enabling people to create programs or customize
    applications will help them do more.
  • Interrogative programming is one stab at the
    problem - more to come.
Write a Comment
User Comments (0)
About PowerShow.com