Satsy Input-Output Code Search Engine Carl Chapman Cole Groff - - PowerPoint PPT Presentation

satsy
SMART_READER_LITE
LIVE PREVIEW

Satsy Input-Output Code Search Engine Carl Chapman Cole Groff - - PowerPoint PPT Presentation

Satsy Input-Output Code Search Engine Carl Chapman Cole Groff Cody Hoover Trevor Lund Kaitlin McAbee Problem Statement Lots of open-source code is available for use. Instead of rewriting code that already exists, can we search to


slide-1
SLIDE 1

Satsy

Carl Chapman Cole Groff Cody Hoover Trevor Lund Kaitlin McAbee

Input-Output Code Search Engine

slide-2
SLIDE 2

Problem Statement

  • Lots of open-source code is available for use.
  • Instead of rewriting code that already exists, can we

search to find the existing code that does what we want?

  • Assume we can describe functionality as an Input-

Output pair.

slide-3
SLIDE 3

Satsy Example

slide-4
SLIDE 4

Google Example

slide-5
SLIDE 5

Prototype Market Study

VS.

48.4

Results Returned

20.5

1.5

Satisfactory Results

8.5

[1]
slide-6
SLIDE 6

Concept Sketch

slide-7
SLIDE 7

Live Demonstration

slide-8
SLIDE 8

Challenge 1: Technologies

  • Amazon Web Services setup
  • Running Z3 from Java application
  • JDBC connection pool
  • Running Java code from HTTP requests
  • Asynchronous requests and responses
  • Deploying Java web application
slide-9
SLIDE 9

Challenge 2: AWS

  • Why do some search

queries seem to stall while others are much more responsive?

  • Investigation reveals

the AWS EC2 free-tier imposes CPU throttling.

slide-10
SLIDE 10

Challenge 3: CPU Bound

  • One Solver takes at least 60 Milliseconds of CPU time
  • Searching 1000 database entries takes at least 1 minute
slide-11
SLIDE 11

Original Design

slide-12
SLIDE 12

Improved Design

slide-13
SLIDE 13

Initialize Search

  • 1. end old search
  • 2. prepare new ResultMap and Executor
  • 3. create collection of Solvers
  • 4. launch all the Solvers using the new

Executor

slide-14
SLIDE 14

Solver Algorithm

  • 1. check for search timeout
  • 2. create SMT file
  • 3. execute z3 and read result
  • 4. increment result matrix
  • 5. notify SearchCallback
slide-15
SLIDE 15

Result Matrix

slide-16
SLIDE 16

Database Structure

slide-17
SLIDE 17

Paths Encoded as SMT

slide-18
SLIDE 18

Ranking

  • Generic superclass that can be

extended to create new algorithms.

  • Current algorithms are sorted

by number of paths satisfied, percentage of paths satisfied and if all paths are satisfied.

slide-19
SLIDE 19

Front End Design

  • Single Page Web App
  • Asynchronous Communication
  • Template-based presentation
slide-20
SLIDE 20

Testing 1: User Simulations

  • Strong Engineering

Effort put into comprehensive tests

  • Relied on Blocking/All-
  • r-nothing nature
  • Architectural change ->

Out the window

slide-21
SLIDE 21

Testing 3: Revised Testing

  • GUI: Manual “Mock” Flags
  • Backend: Unit Tests
  • Exceptional Cases: Database Integrity
slide-22
SLIDE 22

Testing 2: SearchCallback

  • Shift to Asynchronous/Incremental

DeliveryArchitecture

  • Less control over timing, more “events”
  • On completion call SearchCallback
slide-23
SLIDE 23

Questions