CS703: PROJECT GUIDELINES 1. Logistics: Project Most important part of the course Teams of 1 or 2 people Expectations commensurate with size of team Deliverables.

Slides:



Advertisements
Similar presentations
Formal Methods and Testing Goal: software reliability Use software engineering methodologies to develop the code. Use formal methods during code development.
Advertisements

Representing Boolean Functions for Symbolic Model Checking Supratik Chakraborty IIT Bombay.
Counting the bits Analysis of Algorithms Will it run on a larger problem? When will it fail?
Timed Automata.
The Big Picture Chapter 3. We want to examine a given computational problem and see how difficult it is. Then we need to compare problems Problems appear.
Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.
Software Reliability CIS 640 Adapted from the lecture notes by Doron Pelel (
1 Formal Methods in SE Qaisar Javaid Assistant Professor Lecture 05.
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
CS 454 Theory of Computation Sonoma State University, Fall 2011 Instructor: B. (Ravi) Ravikumar Office: 116 I Darwin Hall Original slides by Vahid and.
CS 330 Programming Languages 09 / 16 / 2008 Instructor: Michael Eckmann.
Synthesis of Loop-free Programs Sumit Gulwani (MSR), Susmit Jha (UC Berkeley), Ashish Tiwari (SRI) and Ramarathnam Venkatesan(MSR) Susmit Jha 1.
Formal verification Marco A. Peña Universitat Politècnica de Catalunya.
Design and Analysis of Algorithms
1 L07SoftwareDevelopmentMethod.pptCMSC 104, Version 8/06 Software Development Method Topics l Software Development Life Cycle Reading l Section 1.4 – 1.5.
Software Testing Sudipto Ghosh CS 406 Fall 99 November 9, 1999.
ECE 720T5 Winter 2014 Cyber-Physical Systems Rodolfo Pellizzoni.
CMPS 3223 Theory of Computation Automata, Computability, & Complexity by Elaine Rich ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Slides provided.
Moodle (Course Management Systems). Assignments 1 Assignments are a refreshingly simple method for collecting student work. They are a simple and flexible.
Chapter 1 Introduction Dr. Frank Lee. 1.1 Why Study Compiler? To write more efficient code in a high-level language To provide solid foundation in parsing.
Stochastic Algorithms Some of the fastest known algorithms for certain tasks rely on chance Stochastic/Randomized Algorithms Two common variations – Monte.
1 Theory of Computation 計算理論 2 Instructor: 顏嗣鈞 Web: Time: 9:10-12:10 PM, Monday Place: BL 103.
Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek.
04/30/13 Last class: summary, goggles, ices Discrete Structures (CS 173) Derek Hoiem, University of Illinois 1 Image: wordpress.com/2011/11/22/lig.
Generative Programming Meets Constraint Based Synthesis Armando Solar-Lezama.
Dimensions in Synthesis Part 3: Ambiguity (Synthesis from Examples & Keywords) Sumit Gulwani Microsoft Research, Redmond May 2012.
Algorithms and their Applications CS2004 ( ) Dr Stephen Swift 1.2 Introduction to Algorithms.
Compiler Construction Lexical Analysis. The word lexical means textual or verbal or literal. The lexical analysis implemented in the “SCANNER” module.
Introduction Algorithms and Conventions The design and analysis of algorithms is the core subject matter of Computer Science. Given a problem, we want.
Constraint Satisfaction Problems (CSPs) CPSC 322 – CSP 1 Poole & Mackworth textbook: Sections § Lecturer: Alan Mackworth September 28, 2012.
COURSE INTRODUCTION CS703 – Program verification and synthesis Loris D’Antoni.
1 Generating FSMs from Abstract State Machines Wolfgang Grieskamp Yuri Gurevich Wolfram Schulte Margus Veanes Foundations of Software Engineering Microsoft.
CALTECH CS137 Spring DeHon CS137: Electronic Design Automation Day 9: May 6, 2002 FSM Equivalence Checking.
CS 363 Comparative Programming Languages Semantics.
Synthesis with the Sketch System D AY 1 Armando Solar-Lezama.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
Recursion. What is recursion? Rules of recursion Mathematical induction The Fibonacci sequence Summary Outline.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
Today’s Agenda  Reminder: HW #1 Due next class  Quick Review  Input Space Partitioning Software Testing and Maintenance 1.
MATH 224 – Discrete Mathematics
Documentation. Your documentation must fit the needs of your audience. It’s always better to say one thing that is useful, as opposed to many things that.
Umans Complexity Theory Lectures Lecture 1a: Problems and Languages.
Data Structures and Algorithms Dr. Tehseen Zia Assistant Professor Dept. Computer Science and IT University of Sargodha Lecture 1.
Synthesis with the Sketch System D AY 2 Armando Solar-Lezama.
FlashNormalize: Programming by Examples for Text Normalization International Joint Conference on Artificial Intelligence, Buenos Aires 7/29/2015FlashNormalize1.
Reactive and Output-Only HKOI Training Team 2006 Liu Chi Man (cx) 11 Feb 2006.
CSCI1600: Embedded and Real Time Software Lecture 28: Verification I Steven Reiss, Fall 2015.
CompSci On the Limits of Computing  Reasons for Failure 1. Runs too long o Real time requirements o Predicting yesterday's weather 2. Non-computable.
CES 592 Theory of Software Systems B. Ravikumar (Ravi) Office: 124 Darwin Hall.
Identifying “Best Bet” Web Search Results by Mining Past User Behavior Author: Eugene Agichtein, Zijian Zheng (Microsoft Research) Source: KDD2006 Reporter:
Program Correctness. The designer of a distributed system has the responsibility of certifying the correctness of the system before users start using.
From Natural Language to LTL: Difficulties Capturing Natural Language Specification in Formal Languages for Automatic Analysis Elsa L Gunter NJIT.
LECTURE 5 Scanning. SYNTAX ANALYSIS We know from our previous lectures that the process of verifying the syntax of the program is performed in two stages:
CompSci Today’s Topics Computer Science Noncomputability Upcoming Special Topic: Enabled by Computer -- Decoding the Human Genome Reading Great.
On the Relation Between Simulation-based and SAT-based Diagnosis CMPE 58Q Giray Kömürcü Boğaziçi University.
The PLA Model: On the Combination of Product-Line Analyses 강태준.
CSC 108H: Introduction to Computer Programming
Nonogram Solver Cs491b Software Design Prepared by :
CSE 311 Foundations of Computing I
Lesson 10: Building an App: Color Sleuth
Advanced Compilation and Automatic Programming
Introduction to Automata Theory
Lecture 7 Constraint-based Search
Lecture 6 Inductive Synthesis
CSCE 411 Design and Analysis of Algorithms
Objective of This Course
CSE 311: Foundations of Computing
Templates of slides for P4 Experiments with your synthesizer
CISC 7120X Programming Languages and Compilers
Lecture One: Automata Theory Amjad Ali
Presentation transcript:

CS703: PROJECT GUIDELINES 1

Logistics: Project Most important part of the course Teams of 1 or 2 people Expectations commensurate with size of team Deliverables Oct 2: me a list of 3 project ideas Oct 16: Project proposal Nov 4: Description of progress 1 Nov 19: Description of progress 2 Dec 7-14:Presentation to the class Dec 15:Final write-up 2

How do I choose my project? I really want you to work on something you like! Ideally something that intersects with your research interests Talk to your advisor and explain what the class is about Ask for suggestions: “Is there a verification or synthesis problem related to our research?” If you need suggestions on papers to read based on a topic ask me … if you really cannot find anything I can help you and guide you towards some projects 3

Verification projects You’ll have a portfolio of program verification techniques plenty of open-source and freely available verification tools (NuSMV, Z3, Boogie, Uppaal) If you also took CS704, you can combine all you have learned Possible domains Networks, GPU code, hardware binary, XML queries, CSS, GUIs, … Think outside the box… Example1: automatically detect whether an Android app can ever render 2 images on top of each-other. Example2: is CSS file 1 equivalent to CSS file 2. Which one is faster? It doesn’t have to use what we used in class verbatim 4

Theory projects Least recommended (might be hard to get deliverables) We are seeing many models, logics, and techniques in this course Many have open-problems, some of which are (might be) approachable Example: an algorithm for learning symbolic automata over the theory of BDDs Example: prove complexity lower-bound for some problem related to automata/verification (if you want to work on this type of problem, come and talk to me) Example: analyze complexity of synthesis questions Example: combine models together and analyze algorithms (e.g. symbolic MSO) 5

AN OVERVIEW OF PROGRAM SYNTHESIS Enough info so that you can think about a project 6

What is program synthesis? 7 User intent Domain knowledge Program can only use: Length(x), if(x)then y else z, x[i],… Synthesizer Input Output Program 1 -> > > 500 Function f(x){ If(length(x)<3) return 0 Else return x[0]+`00’ }

For every synthesis problem… How do you tell the system what you want? What is the specification formalism What is the interaction model What happens when there is ambiguity How do you represent domain knowledge? How do you guide the system towards relevant programs How can you take advantage of the structure of the space of programs you care about How does the system find the program you actually want? And how does it know it is the program you want

Different types of synthesis Inductive Synthesis Functional Synthesis Reactive Synthesis Quantitative Synthesis

Traditional Machine Learning  Learn a function from a set of examples  Scalability is very important, algorithms must scale to millions of data points  Data is assumed to be noisy;  need to avoid overfitting  Space of possible functions is highly stylized  Background knowledge incorporated as preprocessing and feature selection Inductive Synthesis  Learn a function from a set of examples  Scalability is not so important, usually we are dealing with small numbers of examples  Data is assumed to be clean  It’s annoying when user says f(x)=y and the system assumes the user is wrong and decides that f(x)=z  Space of possible functions can be arbitrary  Background knowledge encoded in the description of the space and in the search itself Inductive Synthesis Synthesize a program whose behavior satisfies a set of examples

Programming by Example: Motivation Two major criticisms of synthesis: It’s too hard to make it work Even if it works, it ends up being too hard to use Students and Teachers Algorithm Designers Software Developers End-Users Most Useful Target (logics, automata, etc.) (Examples!)

FlashFill: a feature of Excel 2013 (Sumit Gulwani et al.)

Different types of synthesis Inductive Synthesis Functional Synthesis Reactive Synthesis

Functional Synthesis Goal: Synthesize a function that satisfies a specification How do we know the specification has been satisfied? Isn’t verification itself already quite hard? What is the relevant space of functions? How do we explore this space efficiently?

Example:Least Significant Zero Bit  Trick: Adding 1 to a string of ones turns the next zero to a 1 i.e = int W = 32; bit[W] isolate0 (bit[W] x) { // W: word size bit[W] ret = 0; for (int i = 0; i < W; i++) if (!x[i]) { ret[i] = 1; return ret; } }

Space of possible implementations /** * Generate the set of all bit-vector expressions * involving +, &, xor and bitwise negation (~). * the bnd param limits the size of the generated expression. */ generator bit[W] gen(bit[W] x, int bnd){ assert bnd > 0; if(??) return x; if(??) return ??; if(??) return ~gen(x, bnd-1); if(??){ return {| gen(x, bnd-1) (+ | & | ^) gen(x, bnd-1) |}; }

Example: Least Significant Zero Bit generator bit[W] gen(bit[W] x, int bnd){ assert bnd > 0; if(??) return x; if(??) return ??; if(??) return ~gen(x, bnd-1); if(??){ return {| gen(x, bnd-1) (+ | & | ^) gen(x, bnd-1) |}; } bit[W] isolate0sk (bit[W] x) implements isolate0 { return gen(x, 3); }

Different types of synthesis Inductive Synthesis Functional Synthesis Reactive Synthesis

while(true){ read inputs; make decisions; update state; write outputs; } Reactive Synthesis EnvironmentSystem Inputs Outputs

Reactive Synthesis Challenge How do we specify correct behavior? We now have to relate infinite sequences of inputs to infinite sequences of outputs. What if there is feedback between the system and environment Often the goal of the system is to control the environment Very nice theory around finite state systems

Game based formalisms for Reactive Synthesis For every move of the adversary (ever action of the environment) the synthesized program must make a counter-move that keeps the system working correctly. The game can be modeled with an automaton

Different types of synthesis Inductive Synthesis Functional Synthesis Reactive Synthesis Quantitative Synthesis

Boolean specifications are often insufficient They can be too hard to write Fail to capture important properties of the problem What do we want to optimize? A quantity that is inherent to the program e.g. lines of code A quantity that depends on the input e.g. running time of the program In the worst case? The best case? On average? On expected value? For what distribution?

WHAT DO THEY ALL HAVE IN COMMON 24

For every synthesis problem… How do you tell the system what you want? What is the specification formalism What is the interaction model What happens when there is ambiguity How do you represent domain knowledge? How do you guide the system towards relevant programs How can you take advantage of the structure of the space of programs you care about How does the system find the program you actually want? And how does it know it is the program you want

How do you tell the system what you want? (Input, output) examples Sketched program LTL formula for reactive system One of the above + optimization criteria 26

How do you represent domain knowledge? A grammar of possible operations (you can only use substring, …) Generator: A program that can generate programs (see Sketch) Every reactive controller will be a game automaton 27

How does the system find the program you actually want? Enumeration-based search Requires quick way to discard wrong solutions Requires pruning techniques (don’t enumerate redundant functions) Constraint-based search Encode the search problem into a constraint in a logic Solve the constraint For example Sketch encodes everything in a constraint over the integers Stochastic search Randomly pick next program to search based on heuristic Requires good heuristics Nice algorithms for the automata case in reactive synthesis 28

EXAMPLE APPLICATIONS 29

Inductive synthesis Spreadsheet transformations in excel They are typically small programs but tricky to write Parsers Very natural way to provide examples (highlight part of text you want to parse with some nonterminal) A lot of domain knowledge to exploit Small recursive functional programs Examples guide the search (each suffix is an example itself) 30

Functional synthesis Superoptimizers (via Sketch) They are small programs Operate over (large) finite domains Query extractions (via Sketch) Extract SQL query from Java code Very specific theory for relations Program repair and automatic grading Small edit should turn the program into a correct one Wrong program provides a hopefully close to correct solution 31

Reactive synthesis A theory by itself… Can only be used by domain experts But result is guaranteed to be correct BUS controllers in hardware 32