Solver- aided DSL with. Rui Zhao (rz2290)

Similar documents
A Lightweight Symbolic Virtual Machine for Solver-Aided Host Languages

On the Modeling and Verification of Security-Aware and Process-Aware Information Systems

Problems and Measures Regarding Waste 1 Management and 3R Era of public health improvement Situation subsequent to the Meiji Restoration

Database Access from a Programming Language: Database Access from a Programming Language

Database Access from a Programming Language:

GContracts Programming by Contract with Groovy. Andre Steingress

Automated Formal Analysis of Internet Routing Systems

School of Computer Science

Bitemporal Extensions to Non-temporal RDBMS in Distributed Environment

Oracle BI 11g R1: Build Repositories

Introduction to Functional Verification. Niels Burkhardt

Using EDA Databases: Milkyway & OpenAccess

Matrix Logic WirelessDMS Service 2.0

EUROPASS DIPLOMA SUPPLEMENT

CASE workbenches. . Software tools to support specific process phases. Objectives. Chapter 26. Chapter 26 CASE Workbenches

Optimizing Database-Backed Applications with Query Synthesis

COURSE NAME: Database Management. TOPIC: Database Design LECTURE 3. The Database System Life Cycle (DBLC) The database life cycle contains six phases;

CUT YOUR GRAILS APPLICATION TO PIECES

PCB Project (*.PrjPcb)

Programming Languages The McGraw-Hill Companies, Inc. All rights reserved.

Archiving and Sharing Big Data Digital Repositories, Libraries, Cloud Storage

What is a database? COSC 304 Introduction to Database Systems. Database Introduction. Example Problem. Databases in the Real-World

Quartus II Software Design Series : Foundation. Digitale Signalverarbeitung mit FPGA. Digitale Signalverarbeitung mit FPGA (DSF) Quartus II 1

Building Views and Charts in Requests Introduction to Answers views and charts Creating and editing charts Performing common view tasks

Lecture 15. IP address space managed by Internet Assigned Numbers Authority (IANA)

Verification. Formal. OneSpin 360 LaunchPad Adaptive Formal Platform. May 2015

IntroClassJava: A Benchmark of 297 Small and Buggy Java Programs

Lab Experience 17. Programming Language Translation

Java Programming (10155)

Embedded Software development Process and Tools:

1. Introduction What is Slice? Background Why Slice? Purpose of this Document Intended Audience...

Business Intelligence and Decision Support Systems

EMC Documentum Composer

Certification Authorities Software Team (CAST) Position Paper CAST-13

Deploying Artificial Intelligence Techniques In Software Engineering

Using SQL Developer. Copyright 2008, Oracle. All rights reserved.

InvGen: An Efficient Invariant Generator

Model Driven Security: Foundations, Tools, and Practice

Course: Fundamentals of Microsoft Server 2008 Active Directory

CIKM 2015 Melbourne Australia Oct. 22, 2015 Building a Better Connected World with Data Mining and Artificial Intelligence Technologies

A Modular Representation of a Business Process Planner

Commercial Database Software Development- A review.

SW: from Craftsmanship to Industry. The role of code generation in the industrialisation of software development

IMPLEMENTATION OF BACKEND SYNTHESIS AND STATIC TIMING ANALYSIS OF PROCESSOR LOCAL BUS(PLB) PERFORMANCE MONITOR

Introduction to Automated Testing

Statistical Machine Translation: IBM Models 1 and 2

Software Development Practices in Project X

Puppet Firewall Module and Landb Integration

Mobile App Infrastructure for Cross-Platform Deployment (N11-38)

if-then else : 2-1 mux mux: process (A, B, Select) begin if (select= 1 ) then Z <= A; else Z <= B; end if; end process;

Real SQL Programming 1

Translation Protégé Knowledge for Executing Clinical Guidelines. Jeong Ah Kim, BinGu Shim, SunTae Kim, JaeHoon Lee, InSook Cho, Yoon Kim

Vector storage and access; algorithms in GIS. This is lecture 6

find model parameters, to validate models, and to develop inputs for models. c 1994 Raj Jain 7.1

How To Trace

Formal verification of contracts for synchronous software components using NuSMV

Advanced Computer Networks Project 2: File Transfer Application

How To Design A Chip Layout

Structure of Presentation. The Role of Programming in Informatics Curricula. Concepts of Informatics 2. Concepts of Informatics 1

Embedding Maps into Microsoft Office and Microsoft SharePoint

Table of Contents. Testimonials from the MDM Alliance Group... Introduction to MDM...

IBM Tivoli Monitoring V6.2.3, how to debug issues with Windows performance objects issues - overview and tools.

CS 5150 So(ware Engineering System Architecture

Realizing business flexibility through integrated SOA policy management.

Firewall Testing Methodology W H I T E P A P E R

EXPERIMENT 8. Flip-Flops and Sequential Circuits

Ruby on Rails Tutorial - Bounded Verification of Data Models

Data Migration Plan for MIRPS Data and Reference Table Data

Database Access via Programming Languages

Run-Time Monitoring of Goal-Oriented Requirements Specifications

Constraint Programming. Master Parisien de Recherche en Informatique

Software design (Cont.)

Memory management basics (1) Requirements (1) Objectives. Operating Systems Part of E1.9 - Principles of Computers and Software Engineering

Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification

Introduction Decomposition Simple Synthesis Bernstein Synthesis and Beyond. 6. Normalization. Stéphane Bressan. January 28, 2015

Architecture Design & Sequence Diagram. Week 7

Digitale Signalverarbeitung mit FPGA (DSF) Soft Core Prozessor NIOS II Stand Mai Jens Onno Krah

Discuss the size of the instance for the minimum spanning tree problem.

OpenLDAP Oracle Enterprise Gateway Integration Guide

Introduction to Databases

Decomposition into Parts. Software Engineering, Lecture 4. Data and Function Cohesion. Allocation of Functions and Data. Component Interfaces

Database System Architecture & System Catalog Instructor: Mourad Benchikh Text Books: Elmasri & Navathe Chap. 17 Silberschatz & Korth Chap.

Chapter 2 Database System Concepts and Architecture

A. TRUE-FALSE: GROUP 2 PRACTICE EXAMPLES FOR THE REVIEW QUIZ:

Programming Languages

Driving force. What future software needs. Potential research topics

What's New? Web Forms for Marketers 2.1. An Overview of the New Functionality in Web Forms for Marketers 2.1. What's New?

Transcription:

Solver- aided DSL with Rui Zhao (rz2290

Solver- aided Programming So>ware is widely used We all want to build programs, not only so>ware engineers

Solver- aided Programming 1960 - So>ware crisis 1970 - Program logics 1980 - MechanizaKon of logic 1990 - Mechanized tools

Solver- aided Programming We all want to build programs Solver aided Languages less code less Kme less effort

Solver- aided Programming 1960 - So>ware crisis 1970 - Program logics 1980 - MechanizaKon of logic 1990 - Mechanized tools 2000 - Solvers and tools, eg. SAT, SMT 2010 - Solver- aided Languages

Four Elementary Queries S: synthesize a code fragment V: checking that an implementakon saksfies a desired property L: localizing code fragments that cause an undesired behavior A: asking an angelic oracle to divine values that make the execukon saksfy a specificakon

Programming SpecificaKon P(x { }

Programming I have test cases P(x { } assert(safe(p(2

Programming with Solver- aided tools I do not have test cases P(x { } assert(safe(p(x translate. solver

Programming with Solver- aided tools VerificaKon P(x { } assert(safe(p(x solver

Programming with Solver- aided tools Find a value that fails the program P(x { } assert(safe(p(x solver

Programming with Solver- aided tools Debugging 42 P(x { v = x + 2; } assert(safe(p(x x = 42 safe(p(x solver

Programming with Solver- aided tools Debugging 42 P(x { v = choose(; } assert(safe(p(x x = 42 safe(p(x solver

Programming with Solver- aided tools Find the pair that fails the execukon 42 40 P(x { v = choose(; } assert(safe(p(x x = 42 safe(p(x solver

Programming with Solver- aided tools Synthesis 42 40 P(x { v =??; } assert(safe(p(x x = 42 safe(p(x solver

Programming with Solver- aided tools Synthesis 42 40 P(x { v = x - 2; } assert(safe(p(x x = 42 safe(p(x solver

Current Problems It s very hard to write a solver- aided tool / PL Learn the problem domain Design a domain language Build a symbolic compiler from the domain language to constraints

SoluKon It s very hard to write a solver- aided tool / PL Learn the problem domain Design a domain language Get a symbolic compiler for free, implement an interpreter for the new PL

Languages Layers DSL Interpreter library Host Language

Solver- aided Languages Layers SDSL Interpreter library Solver- aided Host Language Symbolic Virtual Machine

What is Roseie Solver- aided host language A framework for designing solver- aided programming languages Roseie itself is a solver- aided programming language embedded in Racket Frees designers from having to compiler the new language to constraints

How does Roseie work Take BV as an example def bvmax(r0, r1: r2 = bvge (r0, r1 r3 = bvneg(r2 r4 = bvxor(r0,r2 r5 = bvand(r3,r4 r6 = bvxor(r1,r5 return r6

How does Roseie work Take BV as an example > bvmax (- 1,- 2 def bvmax(r0, r1: r2 = bvge (r0, r1 r3 = bvneg(r2 r4 = bvxor(r0,r2 r5 = bvand(r3,r4 r6 = bvxor(r1,r5 return r6 (define bvmax `((2 bvge 0 1 (3 bvneg 2 (4 bvxor 0 2 (5 bvand 3 4 (6 bvxor 1 5

How does Roseie work Take BV as an example (define bvmax `((2 bvge 0 1 (3 bvneg 2 (4 bvxor 0 2 (5 bvand 3 4 (6 bvxor 1 5 > bvmax (- 1,- 2 (define (interpret prog inputs (make- registers prog inputs (for ([stmt prog] (match stmt [(list out opcode in... (define op (eval opcode (define args (map load in (store out (apply op args ] load(last

How does Roseie work Take BV as an example (define bvmax `((2 bvge 0 1 (3 bvneg 2 (4 bvxor 0 2 (5 bvand 3 4 (6 bvxor 1 5 > bvmax (- 1,- 2 0 1 2 3 4 5 6-2 - 1 0 0-2 0-1 (define (interpret prog inputs (make- registers prog inputs (for ([stmt prog] (match stmt [(list out opcode in... (define op (eval opcode (define args (map load in (store out (apply op args ] load(last

How does Roseie work Take BV as an example (define bvmax `((2 bvge 0 1 (3 bvneg 2 (4 bvxor 0 2 (5 bvand 3 4 (6 bvxor 1 5 (define- symbolic n0 n1 number? (define inputs (list n0 n1 (verify (assert (= (interpret bvmax inputs (apply max inputs > verify (bvmax, max (0, - 2 > bvmax(0, - 2-1

How does Roseie work Take BV as an example (define bvmax `((2 bvge 0 1 (3 bvneg 2 (4 bvxor 0 2 (5 bvand 3 4 (6 bvxor 1 5 (define- symbolic n0 n1 number? (define inputs (list n0 n1 (verify (assert (= (interpret bvmax inputs (apply max inputs > verify (bvmax, max (0, - 2 > bvmax(0, - 2-1

How does Roseie work Take BV as an example > debug (bvmax, max, (0, - 2 (define bvmax `((2 bvge 0 1 (3 bvneg 2 (4 bvxor 0 2 (5 bvand 3 4 (6 bvxor 1 5 (define inputs (list 0-2 (debug [input- register?] (assert (= (interpret bvmax inputs (apply max inputs

How does Roseie work Take BV as an example > debug (bvmax, max, (0, - 2 (define bvmax `((2 bvge 0 1 (3 bvneg 2 (4 bvxor 0 2 (5 bvand 3 4 (6 bvxor 1 5 (define inputs (list 0-2 (debug [input- register?] (assert (= (interpret bvmax inputs (apply max inputs

How does Roseie work Take BV as an example > synthesize (bvmax, max (define bvmax `((2 bvge 0 1 (3 bvneg 2 (4 bvxor?? (5 bvand 3? (6 bvxor?? (define inputs (list 0-2 (debug [input- register?] (assert (= (interpret bvmax inputs (apply max inputs

How does Roseie work Take BV as an example > synthesize (bvmax, max (define bvmax `((2 bvge 0 1 (3 bvneg 2 (4 bvxor 0 1 (5 bvand 3 4 (6 bvxor 1 5 (define inputs (list 0-2 (debug [input- register?] (assert (= (interpret bvmax inputs (apply max inputs

How does Roseie work Take BV as an example def bvmax(r0, r1: r2 = bvge (r0, r1 r3 = bvneg(r2 r4 = bvxor(r0,r1 r5 = bvand(r3,r4 r6 = bvxor(r1,r5 return r6 (define bvmax `((2 bvge 0 1 (3 bvneg 2 (4 bvxor 0 1 (5 bvand 3 4 (6 bvxor 1 5

References Growing Solver- Aided languages with ROSETTE slides: hips:// excape.cis.upenn.edu/documents/roseie_emina.pdf Growing Solver- Aided languages with ROSETTE paper: hip:// homes.cs.washington.edu/~emina/pubs/roseie.onward13.pdf A Lightweight Symbolic Virtual Machine for Solver- Aided Host Languages: hip://homes.cs.washington.edu/~emina/pubs/roseie.pldi14.pdf Github Repository for Roseie: hips://github.com/emina/roseie Programming for everyone: hip://fm.csl.sri.com/ssft14/roseie- lecture.pdf Images and code fragments I used in this slides are from the papers and slides above

Thank you!