Let me send relevant pictures to my friends while we chat. Select a - - PowerPoint PPT Presentation

let me send relevant pictures to my friends while we chat
SMART_READER_LITE
LIVE PREVIEW

Let me send relevant pictures to my friends while we chat. Select a - - PowerPoint PPT Presentation

Let me send relevant pictures to my friends while we chat. Select a picture from a collection Show pictures aligned with text Send pictures over a chat connection Locate relevant items Display a collection of pictures Confirm a selection


slide-1
SLIDE 1

‘Let me send relevant pictures to my friends while we chat.’

Select a picture from a collection

Locate relevant items Display a collection of pictures Confirm a selection

Show pictures aligned with text Send pictures over a chat connection

Builder

Chat { void sendPicture(Picture p) { byte[] data = p.serialize(); sendMessage(Messages.PIC, data); } }

slide-2
SLIDE 2

‘Let me send relevant pictures to my friends while we chat.’

Select a picture from a collection

Locate relevant items Display a collection of pictures Confirm a selection

Show pictures aligned with text Send pictures over a chat connection

Builder

Chat { void sendPicture(Picture p) { byte[] data = p.serialize(); sendMessage(Messages.PIC, data); } }

slide-3
SLIDE 3

Let people specify their instructions informally

  • avoid premature precision
  • more helpful to programmers
  • enable a new generation of flexible,

intelligent(?) programs FSE 2010

slide-4
SLIDE 4

Managing Ambiguity by Example

Kenneth C. Arnold and Henry Lieberman MIT Media Lab & Mind Machine Project

{kcarnold,lieber}@media.mit.edu

slide-5
SLIDE 5

Managing Ambiguity by Example

Kenneth C. Arnold and Henry Lieberman MIT Media Lab & Mind Machine Project

{kcarnold,lieber}@media.mit.edu

Informality

slide-6
SLIDE 6

Informality vs. Ambiguity

  • Specs and tests are formal but ambiguous.
  • Formal = controlled semantics; incl.

programming languages.

slide-7
SLIDE 7

Executing informal descriptions is hard!

Select a picture from a collection Show pictures aligned with text Send pictures over a chat connection

slide-8
SLIDE 8

Strategy: Examples Clarify

Select a picture from a collection

Locate relevant items Display a collection of pictures

Send pictures over a chat connection

Builder

Chat { void sendPicture(Picture p) { byte[] data = p.serialize(); sendMessage(Messages.PIC, data); } }

Send relevant pictures to my friends while we chat

slide-9
SLIDE 9

Strategy: Examples Clarify

Select a picture from a collection

Locate relevant items Display a collection of pictures

Send pictures over a chat connection

Builder

Chat { void sendPicture(Picture p) { byte[] data = p.serialize(); sendMessage(Messages.PIC, data); } }

Send relevant pictures to my friends while we chat

slide-10
SLIDE 10

Strategy: Examples Clarify

Select a picture from a collection

Locate relevant items Display a collection of pictures

Send pictures over a chat connection

Builder

Chat { void sendPicture(Picture p) { byte[] data = p.serialize(); sendMessage(Messages.PIC, data); } }

Send relevant pictures to my friends while we chat

slide-11
SLIDE 11

Two hard parts

  • Acquiring and interacting with examples
  • Zones: integrate intent into development

process

  • Finding appropriate examples for new

queries

  • use code features and natural language

background knowledge

slide-12
SLIDE 12

Progress on both fronts

  • Acquiring and interacting with examples
  • Zones: integrate intent into development

process

  • Finding appropriate examples for new

queries

  • ProcedureSpace: relates code and informal

descriptions using code features and natural language background knowledge

slide-13
SLIDE 13

Zones Demo

slide-14
SLIDE 14

Backend: Code search?

  • At the lowest level (directly to code), if

keywords match, maybe.

  • Finding vocabulary is a large part of the

problem-solving process

  • Need to understand the relationship

between code and statements of its purpose

slide-15
SLIDE 15

ProcedureSpace Relates Code and Descriptions

chase

(forever (pointTowards: "mouse") (forward: 10)) forever > pointTowards: forever > forward: pointTowards: ~ forward:

follow

kind of movement

  • pposite of lead

natural language descriptions background knowledge code fragments static analysis

slide-16
SLIDE 16

Informal Inference

AnalogySpace (Speer et al., AAAI 2008)

slide-17
SLIDE 17

Informal Inference

AnalogySpace (Speer et al., AAAI 2008)

slide-18
SLIDE 18

Informal Inference

AnalogySpace (Speer et al., AAAI 2008)

slide-19
SLIDE 19

Informal Inference

AnalogySpace (Speer et al., AAAI 2008)

slide-20
SLIDE 20

Informal Inference

AnalogySpace (Speer et al., AAAI 2008)

slide-21
SLIDE 21

Informal Inference

  • AnalogySpace (Speer et al., AAAI 2008)
slide-22
SLIDE 22

Can also blend multiple knowledge sources. Like code and descriptions.

Blending (Havasi et al., IEEE Intelligent Systems 2009)

slide-23
SLIDE 23

ProcedureSpace Blends Code and Descriptions

  • Zones Annotations
  • Code Features
  • static analysis now,

dynamic analysis soon?

  • Commonsense Knowledge
  • Domain Knowledge

English features code fragments English concepts code structural features Static Analysis Purpose Annotations ConceptNet domain-specific knowledge

slide-24
SLIDE 24

Search Results

Users searched for

  • gravity
  • follow player

neither result was annotated

slide-25
SLIDE 25

Related Ideas

  • Keyword Programming: Match keywords,

align types, synthesize code. (Little and Miller, ASE ’07)

  • Example-Centric Programming: integrated

search for examples (Brandt et al., CHI ’10)

slide-26
SLIDE 26

Natural Language Programming

  • Many attempts to formalize or restrict

natural language.

  • But that’s unnatural!
slide-27
SLIDE 27

Natural Language Programming

  • Many attempts to formalize or restrict

natural language.

  • But that’s unnatural!
  • Imprecision is a feature.
slide-28
SLIDE 28

Tests, not code?

slide-29
SLIDE 29

‘Let me send relevant pictures to my friends while we chat.’

Select a picture from a collection

Locate relevant items Display a collection of pictures Confirm a selection

Show pictures aligned with text Send pictures over a chat connection

Builder

Chat { void sendPicture(Picture p) { byte[] data = p.serialize(); sendMessage(Messages.PIC, data); } }

slide-30
SLIDE 30

‘Let me send relevant pictures to my friends while we chat.’

Select a picture from a collection

Locate relevant items Display a collection of pictures Confirm a selection

Show pictures aligned with text Send pictures over a chat connection

Builder

Chat { void sendPicture(Picture p) { byte[] data = p.serialize(); sendMessage(Messages.PIC, data); } }

slide-31
SLIDE 31

Let programmers be informal!

slide-32
SLIDE 32

Have you heard of x?

  • Probably not.
  • Talk afterwards, or email:

kcarnold@mit.edu

  • (thanks, Professor Forrest)
slide-33
SLIDE 33

Getting familiar with existing programs

slide-34
SLIDE 34

Try on Python, Java, ... the essence of the analysis is simple