Optimizing Synthesis with Metasketches

Size: px
Start display at page:

Download "Optimizing Synthesis with Metasketches"

Transcription

1 Optimizing Synthesis Artifact with Metasketches * POPL * Consistent * Complete * Well Documented * Easy to Reuse * Evaluated * AEC * James Bornholt Emina Torlak Dan Grossman Luis Ceze University of Washington SYNAPSE

2 Program synthesis

3 Specification Program synthesis

4 Specification Program synthesis Program

5 Specification Program synthesis Program f(x) =4x

6 Specification Program synthesis Program f(x) =4x x+x+x+x

7 Compilation [PLDI 14] Data Structures [PLDI 15] End-user Programming [POPL 11] Specification Program synthesis Program f(x) =4x x+x+x+x Executable Biology [POPL 13] Browser Layout [PPoPP 13] Cache Protocols [PLDI 13]

8 Compilation [PLDI 14] Data Structures [PLDI 15] End-user Programming [POPL 11] Often looking for an optimal solution, not just any correct program Specification Program synthesis Program Executable Biology [POPL 13] Browser Layout [PPoPP 13] Cache Protocols [PLDI 13]

9 Compilation [PLDI 14] Data Structures [PLDI 15] End-user Programming [POPL 11] Often looking for an optimal solution, not just any correct program Specification Program synthesis Program There are many programs, so tools must control search strategy Executable Biology [POPL 13] Browser Layout [PPoPP 13] Cache Protocols [PLDI 13]

10 Compilation [PLDI 14] Data Structures [PLDI 15] End-user Programming [POPL 11] Often looking for an optimal solution, not just any correct program Specification Program synthesis Program There are many programs, so tools must control search strategy Executable Biology [POPL 13] Browser Layout [PPoPP 13] Cache Protocols [PLDI 13]

11 Specification Program synthesis Program

12 Metasketches Specification Program synthesis Program

13 Metasketches A framework that makes search strategy and optimality part of the problem definition Specification Program synthesis Program

14 Metasketches Design and structure

15 Metasketches Design and structure Synapse A metasketch solver

16 Metasketches Design and structure Synapse A metasketch solver Results Better solutions, faster

17 Background Syntax-guided synthesis Metasketches Design and structure Synapse A metasketch solver Results Better solutions, faster

18 Syntax-guided synthesis Specification Program synthesis Program

19 Syntax-guided synthesis Specification Program synthesis Program Sketch

20 Syntax-guided synthesis Specification Program synthesis Program Sketch def f(x): return Expr Expr := x?? Expr op Expr op := + * - >> <<?? := integer constant

21 Syntax-guided synthesis: guess, check, learn def f(x): return Expr Expr := x?? Expr op Expr op := + * - >> <<?? := integer constant

22 Syntax-guided synthesis: guess, check, learn def f(x): return Expr Expr := x?? Expr op Expr op := + * - >> <<?? := integer constant Syntax

23 Syntax-guided synthesis: guess, check, learn Counterexample-guided inductive synthesis [Solar-Lezama et al, 2006] Semantics Syntax

24 Syntax-guided synthesis: guess, check, learn Counterexample-guided inductive synthesis [Solar-Lezama et al, 2006] f(x) =4x Semantics Syntax

25 Syntax-guided synthesis: guess, check, learn Counterexample-guided inductive synthesis [Solar-Lezama et al, 2006] 0 f(x) =4x Semantics Syntax

26 Syntax-guided synthesis: guess, check, learn Counterexample-guided inductive synthesis [Solar-Lezama et al, 2006] 0 f(x) =4x Semantics Syntax

27 Syntax-guided synthesis: guess, check, learn Counterexample-guided inductive synthesis [Solar-Lezama et al, 2006] f(x) =4x Semantics Syntax

28 Syntax-guided synthesis: guess, check, learn Counterexample-guided inductive synthesis [Solar-Lezama et al, 2006] f(x) =4x Semantics Syntax

29 Syntax-guided synthesis: guess, check, learn Counterexample-guided inductive synthesis [Solar-Lezama et al, 2006] f(x) =4x x+x+x+x Semantics Syntax

30 Syntax-guided synthesis: guess, check, learn Counterexample-guided inductive synthesis [Solar-Lezama et al, 2006] 1. Search order is critical x+x+x+x Syntax

31 Syntax-guided synthesis: guess, check, learn Counterexample-guided inductive synthesis [Solar-Lezama et al, 2006] 1. Search order is critical 2. Desire optimal solutions x+x+x+x Syntax

32 Syntax-guided synthesis: guess, check, learn Counterexample-guided inductive synthesis [Solar-Lezama et al, 2006] 1. Search order is critical 2. Desire optimal solutions x << 2 x+x+x+x Syntax

33 Background Syntax-guided synthesis Metasketches Design and structure Synapse A metasketch solver Results Better solutions, faster

34 Background Syntax-guided synthesis Metasketches Design and structure Synapse A metasketch solver Results Better solutions, faster

35 Metasketches express structure and strategy 1. Search order is critical 2. Desire optimal solutions Syntax

36 Metasketches express structure and strategy 1. Search order is critical 2. Desire optimal solutions A metasketch contains: 1. structured candidate space (S, ) S4 S6 S1 S3 S5 S7 S2 Syntax

37 Metasketches express structure and strategy 1. Search order is critical 2. Desire optimal solutions S1 A metasketch contains: 1. structured candidate space (S, ) 2. cost function (κ)s S4 S6 S3 S5 S7 S2 Syntax

38 Metasketches express structure and strategy 1. Search order is critical 2. Desire optimal solutions S1 A metasketch contains: 1. structured candidate space (S, ) 2. cost function (κ)s S4 S6 S3 S5 3. gradient function (g)s S7 S2 Syntax

39 Metasketches express structure and strategy 1. Search order is critical 2. Desire optimal solutions S1 A metasketch contains: 1. structured candidate space (S, ) 2. cost function (κ)s S4 S6 S3 S5 3. gradient function (g)s S7 S2 Syntax

40 Metasketches express structure and strategy 1. Search order is critical 2. Desire optimal solutions S1 A metasketch contains: 1. structured candidate space (S, ) 2. cost function (κ)s S4 S6 S3 S5 3. gradient function (g)s S7 S2 Syntax

41 Metasketches express structure and strategy 1. Search order is critical 2. Desire optimal solutions S1 A metasketch contains: 1. structured candidate space (S, ) 2. cost function (κ)s 3. gradient function (g)s S4 S6 Program S3 S5 S7 S2 Syntax

42 Metasketches express structure and strategy 1. Search order is critical 2. Desire optimal solutions S1 A metasketch contains: 1. structured candidate space (S, ) 2. cost function (κ)s 3. gradient function (g)s S4 S6 Program S3 S5 Superoptimizer S7 S2 Syntax

43 Metasketches express structure and strategy 1. Search order is critical 2. Desire optimal solutions S1 A metasketch contains: 1. structured candidate space (S, ) 2. cost function (κ)s 3. gradient function (g)s S4 S6 Program S3 S5 Superoptimizer S7 Optimal Program Syntax S2

44 Metasketches express structure and strategy 1. structured candidate space (S, ) 2. cost function (κ)s 3. gradient function (g)s

45 Metasketches express structure and strategy 1. structured candidate space (S, ) A fragmentation of the candidate space, and an ordering on those fragments. 2. cost function (κ)s 3. gradient function (g)s

46 Metasketches express structure and strategy 1. structured candidate space (S, ) A fragmentation of the candidate space, and an ordering on those fragments. S = set of all SSA programs def S 2. cost function (κ)s 3. gradient function (g)s

47 Metasketches express structure and strategy 1. structured candidate space (S, ) A fragmentation of the candidate space, and an ordering on those fragments. S = set of all SSA programs S1 S2 def S S3 S4 S5 2. cost function (κ)s 3. gradient function (g)s

48 Metasketches express structure and strategy 1. structured candidate space (S, ) a countable set S of sketches a total order on S A fragmentation of the candidate space, and an ordering on those fragments. S = set of all SSA programs S1 S2 def S S3 S4 S5 2. cost function (κ)s 3. gradient function (g)s

49 Metasketches express structure and strategy 1. structured candidate space (S, ) a countable set S of sketches a total order on S A fragmentation of the candidate space, and an ordering on those fragments. S = set of all SSA programs S1 S2 S3 S 3 (SSA programs of length 3) def f(x): r1 =??op(??{x}) r2 =??op(??{x,r1}) r3 =??op(??{x,r1,r2}) return r3 S4 S5 2. cost function (κ)s 3. gradient function (g)s

50 Metasketches express structure and strategy 1. structured candidate space (S, ) a countable set S of sketches a total order on S A fragmentation of the candidate space, and an ordering on those fragments. S 3 (SSA programs of length 3) +, -, <, if, def f(x): r1 =??op(??{x}) r2 =??op(??{x,r1}) r3 =??op(??{x,r1,r2}) return r3 2. cost function (κ)s S = set of all SSA programs S1 S2 S3 S4 S5 3. gradient function (g)s

51 Metasketches express structure and strategy 1. structured candidate space (S, ) a countable set S of sketches a total order on S A fragmentation of the candidate space, and an ordering on those fragments. S 3 (SSA programs of length 3) +, -, <, if, def f(x): r1 =??op(??{x}) r2 =??op(??{x,r1}) r3 =??op(??{x,r1,r2}) return r3 2. cost function (κ)s Vars & constants S = set of all SSA programs S1 S2 S3 S4 S5 3. gradient function (g)s

52 Metasketches express structure and strategy 1. structured candidate space (S, ) a countable set S of sketches a total order on S A fragmentation of the candidate space, and an ordering on those fragments. S = set of all SSA programs S1 S2 S3 S 3 (SSA programs of length 3) def f(x): r1 =??op(??{x}) r2 =??op(??{x,r1}) r3 =??op(??{x,r1,r2}) return r3 S4 S5 2. cost function (κ)s 3. gradient function (g)s

53 Metasketches express structure and strategy 1. structured candidate space (S, ) a countable set S of sketches a total order on S A fragmentation of the candidate space, and an ordering on those fragments. S 3 (SSA programs of length 3) def f(x): r1 =??op(??{x}) r2 =??op(??{x,r1}) r3 =??op(??{x,r1,r2}) return r3 2. cost function (κ)s Ordering expresses high-level search strategy. S = set of all SSA programs S1 S2 S3 S4 S5 3. gradient function (g)s

54 Metasketches express structure and strategy 1. structured candidate space (S, ) a countable set S of sketches a total order on S A fragmentation of the candidate space, and an ordering on those fragments. S 3 (SSA programs of length 3) def f(x): r1 =??op(??{x}) r2 =??op(??{x,r1}) r3 =??op(??{x,r1,r2}) return r3 2. cost function (κ)s Ordering expresses high-level search strategy. Here, expresses iterative deepening. S = set of all SSA programs S1 S2 S3 S4 S5 3. gradient function (g)s

55 Metasketches express structure and strategy 1. structured candidate space (S, ) a countable set S of sketches a total order on S A fragmentation of the candidate space, and an ordering on those fragments. S = set of all SSA programs def f(x): r1 =??op(??{x}) return r1 def f(x): r1 =??op(??{x}) r2 =??op(??{x,r1}) return r2 S 1 S 2 2. cost function (κ)s Implemented as a generator that returns the next sketch in the space def f(x): r1 =??op(??{x}) r2 =??op(??{x,r1}) r3 =??op(??{x,r1,r2}) return r3 S 3 3. gradient function (g)s

56 Metasketches express structure and strategy 1. structured candidate space (S, ) a countable set S of sketches a total order on S S = set of all SSA programs S1 S2 S3 S4 S5 Semantics 2. cost function (κ)s 3. gradient function (g)s

57 Metasketches express structure and strategy 1. structured candidate space (S, ) a countable set S of sketches a total order on S S = set of all SSA programs S1 S2 S3 S 3 S4 S5 Semantics 2. cost function (κ)s 3. gradient function (g)s

58 Metasketches express structure and strategy 1. structured candidate space (S, ) a countable set S of sketches a total order on S S = set of all SSA programs S1 S2 S3 S 2 S 3 S4 S5 Semantics 2. cost function (κ)s 3. gradient function (g)s

59 Metasketches express structure and strategy 1. structured candidate space (S, ) a countable set S of sketches a total order on S S 2 S 3 Semantics 2. cost function (κ)s Semantic redundancy in the search space. S = set of all SSA programs S1 S2 S3 S4 S5 3. gradient function (g)s

60 Metasketches express structure and strategy 1. structured candidate space (S, ) a countable set S of sketches a total order on S Semantic redundancy in the search space. S = set of all SSA programs S1 S2 S 2 S 3 Structure constraints eliminate some overlap between sketches S3 S4 Semantics 2. cost function (κ)s 3. gradient function (g)s S5

61 Metasketches express structure and strategy 1. structured candidate space (S, ) a countable set S of sketches a total order on S Semantic redundancy in the search space. S = set of all SSA programs S1 S2 S 2 S 3 Semantics 2. cost function (κ)s 3. gradient function (g)s Structure constraints eliminate some overlap between sketches S3 S4 S 3 (SSA programs of length 3) def f(x): S5 r1 =??op(??{x}) r2 =??op(??{x,r1}) r3 =??op(??{x,r1,r2}) return r3

62 Metasketches express structure and strategy 1. structured candidate space (S, ) a countable set S of sketches a total order on S Semantic redundancy in the search space. S = set of all SSA programs S1 S2 S 2 S 3 Semantics 2. cost function (κ)s 3. gradient function (g)s Structure constraints eliminate some overlap between sketches Eliminate dead-code redundancy: assert that each ri is read S3 S4 S 3 (SSA programs of length 3) def f(x): S5 r1 =??op(??{x}) r2 =??op(??{x,r1}) r3 =??op(??{x,r1,r2}) return r3

63 Cost functions rank candidate programs 1. structured candidate space (S, ) 2. cost function (κ)s κ : L R assigns a numeric cost to each program in the language L S = set of all SSA programs S1 S2 S3 S4 S5 3. gradient function (g)s

64 Cost functions rank candidate programs 1. structured candidate space (S, ) 2. cost function (κ)s κ : L R assigns a numeric cost to each program in the language L Cost functions can be based on both syntax and semantics (dynamic behavior) S = set of all SSA programs S1 S2 S3 S4 S5 3. gradient function (g)s

65 Cost functions rank candidate programs 1. structured candidate space (S, ) 2. cost function (κ)s κ : L R assigns a numeric cost to each program in the language L Cost functions can be based on both syntax and semantics (dynamic behavior) S = set of all SSA programs S1 S2 S3 S4 S5 κ(p) = i for P S i S The number of variables defined in P 3. gradient function (g)s

66 Gradient functions provide cost structure 1. structured candidate space (S, ) 2. cost function (κ)s 3. gradient function (g)s g : R 2 S g(c) is the set of sketches in S that may contain a solution P with κ(p) < c S = set of all SSA programs S1 S2 S3 S4 S5 κ(p) = i for P S i S

67 Gradient functions provide cost structure 1. structured candidate space (S, ) 2. cost function (κ)s 3. gradient function (g)s g : R 2 S g(c) is the set of sketches in S that may contain a solution P with κ(p) < c The gradient function overapproximates the behavior of κ on S S = set of all SSA programs S1 S2 S3 S4 S5 κ(p) = i for P S i S

68 Gradient functions provide cost structure 1. structured candidate space (S, ) 2. cost function (κ)s 3. gradient function (g)s g : R 2 S g(c) is the set of sketches in S that may contain a solution P with κ(p) < c The gradient function overapproximates the behavior of κ on S S = set of all SSA programs S1 S2 S3 S4 S5 κ(p) = i for P S i S g(c) = { S i S i < c }

69 Gradient functions provide cost structure 1. structured candidate space (S, ) 2. cost function (κ)s 3. gradient function (g)s g : R 2 S g(c) is the set of sketches in S that may contain a solution P with κ(p) < c The gradient function overapproximates the behavior of κ on S S = set of all SSA programs S1 S2 S3 S4 S5 κ(p) = i for P S i S g(c) = { S i S i < c } g(4) = {S 1, S 2, S 3 }

70 Gradient functions provide cost structure 1. structured candidate space (S, ) 2. cost function (κ)s 3. gradient function (g)s g : R 2 S g(c) is the set of sketches in S that may contain a solution P with κ(p) < c S = set of all SSA programs S1 S2 S3 S4 S5 g(4) = {S 1, S 2, S 3 } The gradient function overapproximates the behavior of κ on S Always sound for g to return all of S if a tighter bound is unavailable. κ(p) = i for P S i S g(c) = { S i S i < c }

71 Gradient functions provide cost structure 1. structured candidate space (S, ) 2. cost function (κ)s 3. gradient function (g)s g : R 2 S g(c) is the set of sketches in S that may contain a solution P with κ(p) < c S = set of all SSA programs S1 S2 S3 S4 S5 g(4) = {S 1, S 2, S 3 } The gradient function overapproximates the behavior of κ on S Always sound for g to return all of S if a tighter bound is unavailable. g(c) always being finite is sufficient (not necessary) to guarantee termination. κ(p) = i for P S i S g(c) = { S i S i < c }

72 Metasketches Design and structure 1. structured candidate space (S, ) 2. cost function (κ)s 3. gradient function (g)s S = set of all SSA programs S1 S2 S3 S4 S5 κ(p) = i for P S i S g(c) = { S i S i < c }

73 Background Syntax-guided synthesis Metasketches Design and structure Synapse A metasketch solver Results Better solutions, faster

74 Background Syntax-guided synthesis Metasketches Design and structure Synapse A metasketch solver Results Better solutions, faster

75 Solving with two cooperative searches S,, κ, g Global search Coordinates the search for an optimal solution, offloading work to parallel local searches Local search Local search... Local search

76 Solving with two cooperative searches S,, κ, g Global search Coordinates the search for an optimal solution, offloading work to parallel local searches Local search Local search... Local search An incremental form of CEGIS that can accept new information from the global search

77 Solving with two cooperative searches S,, κ, g Global search S1 S4 S6 S3 S5 Local search Local search Local search S7 S2

78 Solving with two cooperative searches S,, κ, g Global search S4 S6 S5 Local search Local search Local search S7 S1 S2 S3

79 Solving with two cooperative searches S,, κ, g Global search S4 S6 S5 Local search UNSAT Local search Local search S7 S1 S 2 S2 S3

80 Solving with two cooperative searches S,, κ, g Global search UNSAT S4 S6 S5 Local search Local search Local search S7 S1 S 2 S2 S3

81 Solving with two cooperative searches S,, κ, g Global search S6 S5 Local search Local search Local search S7 S1 S3 S4

82 Solving with two cooperative searches S,, κ, g Global search S6 S5 Local search Local search Local search SAT (P) S7 S1 S3 S4

83 Solving with two cooperative searches S,, κ, g Global search SAT (P) S6 S5 Local search Local search Local search S7 S1 S3 S4

84 Solving with two cooperative searches S,, κ, g Global search κ(p) κ(p) κ(p) S6 S5 Local search Local search Local search S7 S1 S3 S4

85 Solving with two cooperative searches S,, κ, g Global search κ(p) κ(p) κ(p) S6 S5 Local search Local search Local search S7 S1 S4 S3 Prune local search spaces using κ(p)

86 Solving with two cooperative searches S,, κ, g Global search κ(p) κ(p) κ(p) S6 S5 Local search Local search Local search S7 S1 S4 S3 Prune local search spaces using κ(p)

87 Solving with two cooperative searches S,, κ, g Global search κ(p) κ(p) κ(p) Prune global search space using g(κ(p)) S6 S5 Local search Local search Local search S7 S1 S4 S3 Prune local search spaces using κ(p)

88 Solving with two cooperative searches S,, κ, g Global search κ(p) κ(p) κ(p) Prune global search space using g(κ(p)) S6 S5 Local search Local search Local search S1 S4 S3 Prune local search spaces using κ(p)

89 Solving with two cooperative searches S,, κ, g Global search Continues until all search spaces exhausted, yielding an optimal solution. κ(p) κ(p) κ(p) Prune global search space using g(κ(p)) S6 S5 Local search Local search Local search S1 S4 S3 Prune local search spaces using κ(p)

90 Synapse implementation S,, κ, g Global search Implemented in Rosette, a solver-aided extension of Racket Local search Local search... Local search

91 Synapse implementation S,, κ, g Global search Implemented in Rosette, a solver-aided extension of Racket Local CEGIS searches can share counterexamples Local search Local search... Local search

92 Synapse implementation S,, κ, g Global search Implemented in Rosette, a solver-aided extension of Racket Local CEGIS searches can share counterexamples Local search Local search... Local search Local searches can time out, which weakens optimality

93 Background Syntax-guided synthesis Metasketches Design and structure Synapse A metasketch solver Results Better solutions, faster

94 Background Syntax-guided synthesis Metasketches Design and structure Synapse A metasketch solver Results Better solutions, faster

95 Evaluation questions Is Synapse a practical approach to solving different kinds of synthesis problems? Approximate computing, array programs

96 Evaluation questions Is Synapse a practical approach to solving different kinds of synthesis problems? Approximate computing, array programs Can Synapse reason about complex cost functions?

97 Evaluation questions Is Synapse a practical approach to solving different kinds of synthesis problems? Approximate computing, array programs Can Synapse reason about complex cost functions? In the paper: Parallel speedup Optimizations (structure constraints, sharing) More kinds of problems More complex cost functions

98 Synapse solves previously-intractable problems Parrot benchmarks from approximate computing [Esmaelizadeh et al., 2012] Find the most efficient approximate program within an error bound

99 Synapse solves previously-intractable problems Parrot benchmarks from approximate computing [Esmaelizadeh et al., 2012] Find the most efficient approximate program within an error bound fft cos fft sin inversek2j 1 inversek2j 2 kmeans sobel x sobel y Solving time (secs)

100 Synapse solves previously-intractable problems Parrot benchmarks from approximate computing [Esmaelizadeh et al., 2012] Find the most efficient approximate program within an error bound fft cos fft sin inversek2j 1 inversek2j 2 kmeans sobel x Solving time (secs) sobel y All intractable to Sketch and Stoke

101 Synapse solves standard benchmarks optimally Array Search benchmarks from the syntax-guided synthesis (SyGuS) competition [Alur et al., 2015] arraysearch-n: find program that searches lists of length n

102 Synapse solves standard benchmarks optimally Array Search benchmarks from the syntax-guided synthesis (SyGuS) competition [Alur et al., 2015] arraysearch-n: find program that searches lists of length n arraysearch 2 fft cos arraysearch 3 fft sin arraysearch 4 inversek2j 1 arraysearch 5 inversek2j 2 arraysearch 6 kmeans arraysearch 7 sobel x arraysearch 8 sobel y arraysearch 9 arraysearch 10 arraysearch 11 Solving time (secs) arraysearch 12 arraysearch 13 arraysearch 14 arraysearch 15

103 Synapse solves standard benchmarks optimally Array Search benchmarks from the syntax-guided synthesis (SyGuS) competition [Alur et al., 2015] arraysearch-n: find program that searches lists of length n Solving time (secs) Synapse: 349 bytes SyGuS: 7.1 MB arraysearch 2 fft cos arraysearch 3 fft sin arraysearch 4 inversek2j 1 arraysearch 5 inversek2j 2 arraysearch 6 kmeans arraysearch 7 sobel x arraysearch 8 sobel y arraysearch 9 arraysearch 10 arraysearch 11 arraysearch 12 arraysearch 13 arraysearch 14 arraysearch 15

104 Is this a cat?

105 Synapse reasons about complex costs??????????????????????????????

106 Synapse reasons about complex costs?????????????? κ(p) = i P (xi )???????? X???? yi?? Classification error executes the program for each point in the training set??

107 Metasketches Design and structure Synapse A metasketch solver Results Better solutions, faster

108 Metasketches Design and structure Synapse A metasketch solver Results Better solutions, faster synapse.uwplse.org

Approximate Program Synthesis

Approximate Program Synthesis Approximate Program Synthesis James Bornholt Emina Torlak Luis Ceze Dan Grossman University of Washington Writing approximate programs is hard Precise Implementation Writing approximate programs is hard

More information

Optimizing Synthesis with Metasketches

Optimizing Synthesis with Metasketches Optimizing Synthesis with Metasketches Artifact James Bornholt Emina Torlak Dan Grossman Luis Ceze University of Washington, USA {bornholt, emina, djg, luisceze}@cs.washington.edu * POPL * Consistent *

More information

Scaling Program Synthesis by Exploiting Existing Code

Scaling Program Synthesis by Exploiting Existing Code Scaling Program Synthesis by Exploiting Existing Code James Bornholt Emina Torlak University of Washington Synthesis: write programs automatically Syntax Semantics Synthesis: write programs automatically

More information

Synthesis and Verification for All Emina Torlak

Synthesis and Verification for All Emina Torlak Synthesis and Verification for All Emina Torlak University of Washington emina@cs.washington.edu homes.cs.washington.edu/~emina/ Emina Racket Racket a programmable programming language Racket a programmable

More information

EECS 219C: Formal Methods Syntax-Guided Synthesis (selected/adapted slides from FMCAD 13 tutorial by R. Alur) Sanjit A. Seshia EECS, UC Berkeley

EECS 219C: Formal Methods Syntax-Guided Synthesis (selected/adapted slides from FMCAD 13 tutorial by R. Alur) Sanjit A. Seshia EECS, UC Berkeley EECS 219C: Formal Methods Syntax-Guided Synthesis (selected/adapted slides from FMCAD 13 tutorial by R. Alur) Sanjit A. Seshia EECS, UC Berkeley Solving SyGuS Is SyGuS same as solving SMT formulas with

More information

Synthesizing Memory Models

Synthesizing Memory Models Synthesizing Memory Models from Framework Sketches and Litmus Tests James Bornholt Emina Torlak University of Washington Memory consistency models define memory reordering behaviors on mul>processors Memory

More information

Synthesis-Aided Compiler for Low-Power Spatial Architectures

Synthesis-Aided Compiler for Low-Power Spatial Architectures Synthesis-Aided Compiler for Low-Power Spatial Architectures Phitchaya Mangpo Phothilimthana, Tikhon Jelvis, Rohin Shah, Nishant Totla, Sarah Chasins, and Ras Bodik 2 unusual ISA small memory narrow bitwidth

More information

Syntax-Guided Synthesis. Rajeev Alur. University of Pennsylvania

Syntax-Guided Synthesis. Rajeev Alur. University of Pennsylvania Syntax-Guided Synthesis Rajeev Alur University of Pennsylvania 1 Program Verification Specification S Program P Verifier Proof of correctness or Witness of a bug 2 Classical Program Synthesis Specification

More information

CSC410 Program Synthesis AZADEH FARZAN FALL 2017

CSC410 Program Synthesis AZADEH FARZAN FALL 2017 CSC410 Program Synthesis AZADEH FARZAN FALL 2017 The idea Produce small code fragments that satisfy the given specification As a programming aid: It helps you write programs. The insight is yours, the

More information

Abstractions and small languages in synthesis CS294: Program Synthesis for Everyone

Abstractions and small languages in synthesis CS294: Program Synthesis for Everyone Abstractions and small languages in synthesis CS294: Program Synthesis for Everyone Ras Bodik Emina Torlak Division of Computer Science University of California, Berkeley Today Today: we describe why high-level

More information

PLDI: U: Type Assisted Synthesis of Recursive Transformers on Algebraic Datatypes

PLDI: U: Type Assisted Synthesis of Recursive Transformers on Algebraic Datatypes PLDI: U: Type Assisted Synthesis of Recursive Transformers on Algebraic Datatypes Jeevana Priya Inala MIT jinala@mit.edu Advisor: Armando Solar-Lezama 1. Problem and Motivation As programming languages

More information

Syntax-Guided Program Synthesis. Rajeev Alur. University of Pennsylvania

Syntax-Guided Program Synthesis. Rajeev Alur. University of Pennsylvania Syntax-Guided Program Synthesis Rajeev Alur University of Pennsylvania 1 Goal: Programming computers easier than communicating with people Can programming be liberated, period. David Harel, IEEE Computer,

More information

Syntax-Guided Program Synthesis. Rajeev Alur

Syntax-Guided Program Synthesis. Rajeev Alur Syntax-Guided Program Synthesis Rajeev Alur University of Pennsylvania 1 Goal: Programming computers easier than communicating with people Can programming be liberated, period. David Harel, IEEE Computer,

More information

Growing Solver-Aided Languages with ROSETTE

Growing Solver-Aided Languages with ROSETTE Growing Solver-Aided Languages with ROSETTE Emina Torlak & Rastislav Bodik U.C. Berkeley ExCAPE June 10, 2013 solver-aided domain-specific language Solver-aided DSL (SDSL) Noun 1. A high-level language

More information

Solver Aided Reverse Engineering of Architectural Features

Solver Aided Reverse Engineering of Architectural Features Solver Aided Reverse Engineering of Architectural Features Bill Zorn, Dan Grossman, Luis Ceze {billzorn, djg, luisceze}@cs.washington.edu Paul G. Allen School for Computer Science & Engineering University

More information

Synthesis through Unification

Synthesis through Unification Synthesis through Unification Rajeev Alur 1, Pavol Černý2, and Arjun Radhakrishna 1 1 University of Pennsylvania 2 University of Colorado Boulder Abstract. Given a specification and a set of candidate

More information

Using Program Synthesis for Program Analysis

Using Program Synthesis for Program Analysis Using Program Synthesis for Program Analysis Cristina David 1, Daniel Kroening 1, and Matt Lewis 1,2 1 University of Oxford 2 Improbable Worlds Ltd. Abstract. In this paper, we propose a unified framework

More information

Syntax-Guided Synthesis. Rajeev Alur. Marktoberdorf Summer School 2014

Syntax-Guided Synthesis. Rajeev Alur. Marktoberdorf Summer School 2014 Syntax-Guided Synthesis Rajeev Alur Marktoberdorf Summer School 2014 1 Program Verification Specification S Program P Verifier Proof of correctness or Witness of a bug 2 Classical Program Synthesis Specification

More information

Sciduction: Combining Induction, Deduction and Structure for Verification and Synthesis

Sciduction: Combining Induction, Deduction and Structure for Verification and Synthesis Sciduction: Combining Induction, Deduction and Structure for Verification and Synthesis (abridged version of DAC slides) Sanjit A. Seshia Associate Professor EECS Department UC Berkeley Design Automation

More information

CSE507. Practical Applications of SAT. Computer-Aided Reasoning for Software. Emina Torlak

CSE507. Practical Applications of SAT. Computer-Aided Reasoning for Software. Emina Torlak Computer-Aided Reasoning for Software CSE507 Practical Applications of SAT courses.cs.washington.edu/courses/cse507/18sp/ Emina Torlak emina@cs.washington.edu Today Past 2 lectures The theory and mechanics

More information

Autograder RISHABH SINGH, SUMIT GULWANI, ARMANDO SOLAR-LEZAMA

Autograder RISHABH SINGH, SUMIT GULWANI, ARMANDO SOLAR-LEZAMA Autograder RISHABH SINGH, SUMIT GULWANI, ARMANDO SOLAR-LEZAMA Test-cases based feedback Hard to relate failing inputs to errors Manual feedback by TAs Time consuming and error prone Feedback on Programming

More information

Language to Specify Syntax-Guided Synthesis Problems

Language to Specify Syntax-Guided Synthesis Problems Language to Specify Syntax-Guided Synthesis Problems Mukund Raghothaman Abhishek Udupa Saturday 25 th January, 2014 1 Introduction We present a language to specify syntax guided synthesis (SyGuS) problems.

More information

arxiv: v1 [cs.pl] 22 May 2014

arxiv: v1 [cs.pl] 22 May 2014 Language to Specify Syntax-Guided Synthesis Problems Mukund Raghothaman Abhishek Udupa Friday 7 th December, 2018 arxiv:1405.5590v1 [cs.pl] 22 May 2014 Abstract We present a language to specify syntax

More information

Synthesis of Parallel Tree Programs with Domain-Specific Symbolic Compilation

Synthesis of Parallel Tree Programs with Domain-Specific Symbolic Compilation Synthesis of Parallel Tree Programs with Domain-Specific Symbolic Compilation by Nate Yazdani Supervised by Ras Bodik A senior thesis submitted in partial fulfillment of the requirements for the degree

More information

Scaling Enumerative Program Synthesis via Divide and Conquer

Scaling Enumerative Program Synthesis via Divide and Conquer Scaling Enumerative Program Synthesis via Divide and Conquer Rajeev Alur, Arjun Radhakrishna, and Abhishek Udupa University of Pennsylvania Abstract. Given a semantic constraint specified by a logical

More information

The 4 th Competition on Syntax-Guided Synthesis. Rajeev Alur, Dana Fisman, Rishabh Singh and Armando Solar-Lezama

The 4 th Competition on Syntax-Guided Synthesis. Rajeev Alur, Dana Fisman, Rishabh Singh and Armando Solar-Lezama The 4 th Competition on Syntax-Guided Synthesis Rajeev Alur, Dana Fisman, Rishabh Singh and Armando Solar-Lezama SyGuS Idea and Definition in a Nutshell New Trends in Synthesis Turn off rightmost continuous

More information

Course Overview CS294: Program Synthesis for Everyone

Course Overview CS294: Program Synthesis for Everyone Course Overview CS294: Program Synthesis for Everyone Ras Bodik Emina Torlak Division of Computer Science University of California, Berkeley The name of the course this CS294 topics course has been listed

More information

Growing Solver-Aided Languages with ROSETTE

Growing Solver-Aided Languages with ROSETTE Growing Solver-Aided Languages with ROSETTE Emina Torlak & Rastislav Bodik U.C. Berkeley solver-aided domain-specific language Solver-aided DSL (SDSL) Noun 1. A high-level language in which partially implemented

More information

SpaceSearch: A Library for Building and Verifying Solver-Aided Tools

SpaceSearch: A Library for Building and Verifying Solver-Aided Tools SpaceSearch: A Library for Building and Verifying Solver-Aided Tools Konstantin Steven S. Stefan Weitz Lyubomirsky Heule Emina Torlak Michael D. Ernst Zachary Tatlock Reduction Reduction SMT Reduction

More information

COUNTEREXAMPLE-GUIDED MODEL SYNTHESIS

COUNTEREXAMPLE-GUIDED MODEL SYNTHESIS COUNTEREXAMPLE-GUIDED MODEL SYNTHESIS Mathias Preiner?y, Aina Niemetz?y and Armin Biere?? Johannes Kepler University y Stanford University SMT Workshop July 22-23, 2017 Heidelberg, Germany Introduction

More information

Programming with Constraint Solvers CS294: Program Synthesis for Everyone

Programming with Constraint Solvers CS294: Program Synthesis for Everyone Programming with Constraint Solvers CS294: Program Synthesis for Everyone Ras Bodik Emina Torlak Division of Computer Science University of California, Berkeley Today Today: we describe four programming

More information

COUNTEREXAMPLE-GUIDED MODEL SYNTHESIS

COUNTEREXAMPLE-GUIDED MODEL SYNTHESIS COUNTEREXAMPLE-GUIDED MODEL SYNTHESIS Mathias Preiner, Aina Niemetz and Armin Biere Johannes Kepler University Stanford University SMT Workshop July 22-23, 2017 Heidelberg, Germany Introduction Counterexample-Guided

More information

Type- & Example-Driven Program Synthesis. Steve Zdancewic WG 2.8, August 2014

Type- & Example-Driven Program Synthesis. Steve Zdancewic WG 2.8, August 2014 Type- & Example-Driven Program Synthesis Steve Zdancewic WG 2.8, August 2014 Joint work with Peter-Michael Osera CAVEATS Work in progress Similar work been done before This is our attempt to understand

More information

Lecture Notes: Program Synthesis

Lecture Notes: Program Synthesis Lecture Notes: Program Synthesis 17-355/17-665/17-819O: Program Analysis (Spring 2018) Jonathan Aldrich and Claire Le Goues aldrich@cs.cmu.edu, clegoues@cs.cmu.edu Note: A complete, if lengthy, resource

More information

arxiv: v2 [cs.pl] 3 Apr 2018

arxiv: v2 [cs.pl] 3 Apr 2018 1 Scheduling Constraint Based Abstraction Refinement for Multi-Threaded Program Verification arxiv:1708.08323v2 [cs.pl] 3 Apr 2018 LIANGZE YIN, School of Computer, National University of Defense Technology,

More information

LEARNING TO INSTANTIATE QUANTIFIERS

LEARNING TO INSTANTIATE QUANTIFIERS LEARNING TO INSTANTIATE QUANTIFIERS Armin Biere 1 joint work with Mathias Preiner 1,2, Aina Niemetz 1,2 TACAS 17, SMT 17, PhD Thesis Mathias Preiner in 2017 1 Johannes Kepler University Linz 2 Stanford

More information

Specification-Based Sketching with Sketch#

Specification-Based Sketching with Sketch# Specification-Based Sketching with Sketch# Hesam Samimi University of California, Los Angeles hesam@cs.ucla.edu Kaushik Rajan Microsoft Research India krajan@microsoft.com ABSTRACT We introduce a new tool

More information

A Sparse Algorithm for Predicated Global Value Numbering

A Sparse Algorithm for Predicated Global Value Numbering Sparse Predicated Global Value Numbering A Sparse Algorithm for Predicated Global Value Numbering Karthik Gargi Hewlett-Packard India Software Operation PLDI 02 Monday 17 June 2002 1. Introduction 2. Brute

More information

Synthesis of Domain Specific Encoders for Bit- Vector Solvers

Synthesis of Domain Specific Encoders for Bit- Vector Solvers Synthesis of Domain Specific Encoders for Bit- Vector Solvers Jeevana Priya Inala! with Rohit Singh, Armando Solar-Lezama To appear at SAT 16 High-level constraint to CNF clauses SMT solver High-level

More information

The Sketching Approach to Program Synthesis

The Sketching Approach to Program Synthesis The Sketching Approach to Program Synthesis Armando Solar-Lezama Massachusetts Institute of Technology Abstract. Sketching is a new form of localized software synthesis that aims to bridge the gap between

More information

Loop Optimizations. Outline. Loop Invariant Code Motion. Induction Variables. Loop Invariant Code Motion. Loop Invariant Code Motion

Loop Optimizations. Outline. Loop Invariant Code Motion. Induction Variables. Loop Invariant Code Motion. Loop Invariant Code Motion Outline Loop Optimizations Induction Variables Recognition Induction Variables Combination of Analyses Copyright 2010, Pedro C Diniz, all rights reserved Students enrolled in the Compilers class at the

More information

QLOSE: Program Repair with Quantitative Objectives

QLOSE: Program Repair with Quantitative Objectives QLOSE: Program Repair with Quantitative Objectives Loris D Antoni Roopsha Samanta Rishabh Singh Everyone wants to be a programmer 2 Programming for Everybody (Getting Started with Python) 657,068 An Introduction

More information

Formally Certified Satisfiability Solving

Formally Certified Satisfiability Solving SAT/SMT Proof Checking Verifying SAT Solver Code Future Work Computer Science, The University of Iowa, USA April 23, 2012 Seoul National University SAT/SMT Proof Checking Verifying SAT Solver Code Future

More information

Synthesizing Programs with Constraint Solvers CAV 2012 invited tutorial

Synthesizing Programs with Constraint Solvers CAV 2012 invited tutorial Synthesizing Programs with Constraint Solvers CAV 2012 invited tutorial Ras Bodik Emina Torlak Division of Computer Science University of California, Berkeley Abstract Classical synthesis derives programs

More information

Type Assisted Synthesis of Programs with Algebraic Data Types

Type Assisted Synthesis of Programs with Algebraic Data Types Type Assisted Synthesis of Programs with Algebraic Data Types Jeevana Priya Inala MIT Collaborators: Xiaokang Qiu (MIT), Ben Lerner (Brown), Armando Solar-Lezama (MIT) Example - Desugaring a simple language

More information

Crash Course in Applied PL

Crash Course in Applied PL Crash Course in Applied PL (with applications to Networks) Software Reliability Lab Department of Computer Science ETH Zurich Overview of Applied PL techniques Static Analysis Program Synthesis ibgp, OSPF,

More information

Search-based Program Synthesis

Search-based Program Synthesis DOI:10.1145/3208071 A promising, useful tool for future programming development environments. BY RAJEEV ALUR, RISHABH SINGH, DANA FISMAN, AND ARMANDO SOLAR-LEZAMA Search-based Program Synthesis Writing

More information

Escape Analysis. Applications to ML and Java TM

Escape Analysis. Applications to ML and Java TM Escape Analysis. Applications to ML and Java TM Bruno Blanchet INRIA Rocquencourt Bruno.Blanchet@inria.fr December 2000 Overview 1. Introduction: escape analysis and applications. 2. Escape analysis 2.a

More information

ECE 5775 High-Level Digital Design Automation Fall More CFG Static Single Assignment

ECE 5775 High-Level Digital Design Automation Fall More CFG Static Single Assignment ECE 5775 High-Level Digital Design Automation Fall 2018 More CFG Static Single Assignment Announcements HW 1 due next Monday (9/17) Lab 2 will be released tonight (due 9/24) Instructor OH cancelled this

More information

Introduction to Sketching

Introduction to Sketching Introduction to Sketching IAP 2008 Armando Solar-Lezama What is sketching? A program synthesis system - generates small fragments of code - checks their validity against a specification A programming aid

More information

Hack Your Language! CSE401 Winter 2016 Introduction to Compiler Construction

Hack Your Language! CSE401 Winter 2016 Introduction to Compiler Construction Hack Your Language! CSE401 Winter 2016 Introduction to Compiler Construction Ras Bodik Alvin Cheung Maaz Ahmad Talia Ringer Ben Tebbs Lecture 15: Pointer analysis and Intro to Solver-Aided DSLs Andersen

More information

Synthesis for Automated Grading and Feedback EXCAPE NSF SITE VISIT AUGUST 2013

Synthesis for Automated Grading and Feedback EXCAPE NSF SITE VISIT AUGUST 2013 Synthesis for Automated Grading and Feedback EXCAPE NSF SITE VISIT AUGUST 2013 Sumit Gulwani Solar-Lezama Alur Seshia Hartmann Leverage Synthesis in Education Technology Computer aided approach to introduce

More information

Code Optimization. Code Optimization

Code Optimization. Code Optimization 161 Code Optimization Code Optimization 162 Two steps: 1. Analysis (to uncover optimization opportunities) 2. Optimizing transformation Optimization: must be semantically correct. shall improve program

More information

Program Synthesis for Forth Forth Day 2012

Program Synthesis for Forth Forth Day 2012 Program Synthesis for Forth Forth Day 2012 Computer Science UC Berkeley Ras Bodik Mangpo Phitchaya Phothilimthana Tikhon Jelvis Rohin Shah Synthesis with sketches Extend your language with two constructs

More information

A Brief History of Synthesis From Church to ExCAPE. Rajeev Alur. University of Pennsylvania

A Brief History of Synthesis From Church to ExCAPE. Rajeev Alur. University of Pennsylvania A Brief History of Synthesis From Church to ExCAPE Rajeev Alur University of Pennsylvania 1 Software Design Libraries Program Specifications Tests Compiler Analysis Tool Executable Platform 2 Programming

More information

F-Soft: Software Verification Platform

F-Soft: Software Verification Platform F-Soft: Software Verification Platform F. Ivančić, Z. Yang, M.K. Ganai, A. Gupta, I. Shlyakhter, and P. Ashar NEC Laboratories America, 4 Independence Way, Suite 200, Princeton, NJ 08540 fsoft@nec-labs.com

More information

Abstraction techniques for Floating-Point Arithmetic

Abstraction techniques for Floating-Point Arithmetic Abstraction techniques for Floating-Point Arithmetic Angelo Brillout 1, Daniel Kroening 2 and Thomas Wahl 2 1 ETH Zurich, 2 Oxford University ETH Zürich Floating-Point Arithmetic (FPA) Used for embedded

More information

Hyperkernel: Push-Button Verification of an OS Kernel

Hyperkernel: Push-Button Verification of an OS Kernel Hyperkernel: Push-Button Verification of an OS Kernel Luke Nelson, Helgi Sigurbjarnarson, Kaiyuan Zhang, Dylan Johnson, James Bornholt, Emina Torlak, and Xi Wang The OS Kernel is a critical component Essential

More information

SymDiff: A language-agnostic semantic diff tool for imperative programs

SymDiff: A language-agnostic semantic diff tool for imperative programs SymDiff: A language-agnostic semantic diff tool for imperative programs Shuvendu K. Lahiri 1, Chris Hawblitzel 1, Ming Kawaguchi 2, and Henrique Rebêlo 3 1 Microsoft Research, Redmond, WA, USA 2 University

More information

Induction Variable Identification (cont)

Induction Variable Identification (cont) Loop Invariant Code Motion Last Time Uses of SSA: reaching constants, dead-code elimination, induction variable identification Today Finish up induction variable identification Loop invariant code motion

More information

CSE 582 Autumn 2002 Exam 11/26/02

CSE 582 Autumn 2002 Exam 11/26/02 Name There are 8 questions worth a total of 100 points. Please budget your time so you get to all of the questions. Keep your answers brief and to the point. You may refer to the following reference materials:

More information

Optimal Constraint-Preserving Netlist Simplification

Optimal Constraint-Preserving Netlist Simplification Optimal Constraint-Preserving Netlist Simplification Jason Baumgartner 1 Hari Mony 1,2 Adnan Aziz 2 1 IBM Systems & Technology Group, Austin, TX 2 The University of Texas at Austin Abstract We consider

More information

Counterexample-Driven Genetic Programming

Counterexample-Driven Genetic Programming Counterexample-Driven Genetic Programming Iwo Błądek, Krzysztof Krawiec Institute of Computing Science, Poznań University of Technology Poznań, 12.12.2017 I. Błądek, K. Krawiec Counterexample-Driven Genetic

More information

Small Formulas for Large Programs: On-line Constraint Simplification In Scalable Static Analysis

Small Formulas for Large Programs: On-line Constraint Simplification In Scalable Static Analysis Small Formulas for Large Programs: On-line Constraint Simplification In Scalable Static Analysis Isil Dillig, Thomas Dillig, Alex Aiken Stanford University Scalability and Formula Size Many program analysis

More information

Scalable Synthesis with Symbolic Syntax Graphs

Scalable Synthesis with Symbolic Syntax Graphs Scalable Synthesis with Symbolic Syntax Graphs Rohin Shah, Sumith Kulal, Ras Bodik UC Berkeley, IIT Bombay and UW 18 July 2018, Oxford UK [Solar-Lezama et al. ASPLOS06] Combinatorial Sketching for Finite

More information

Generating Small Countermodels. Andrew Reynolds Intel August 30, 2012

Generating Small Countermodels. Andrew Reynolds Intel August 30, 2012 Generating Small Countermodels using SMT Andrew Reynolds Intel August 30, 2012 Acknowledgements Intel Corporation AmitGoel, Sava Krstic University of Iowa Cesare Tinelli, Francois Bobot New York University

More information

Optimizing database-backed applications with query synthesis

Optimizing database-backed applications with query synthesis Optimizing database-backed applications with query synthesis The MIT Faculty has made this article openly available. Please share how this access benefits you. Your story matters. Citation As Published

More information

Programs that write themselves: Program synthesis for the masses. Yu Feng UT Austin

Programs that write themselves: Program synthesis for the masses. Yu Feng UT Austin Programs that write themselves: Program synthesis for the masses Yu Feng UT Austin New platforms impose demand for programming 2 New platforms impose demand for programming 2 New platforms impose demand

More information

CS 267: Automated Verification. Lecture 13: Bounded Model Checking. Instructor: Tevfik Bultan

CS 267: Automated Verification. Lecture 13: Bounded Model Checking. Instructor: Tevfik Bultan CS 267: Automated Verification Lecture 13: Bounded Model Checking Instructor: Tevfik Bultan Remember Symbolic Model Checking Represent sets of states and the transition relation as Boolean logic formulas

More information

Generating Code for Assignment Statements back to work. Comp 412 COMP 412 FALL Chapters 4, 6 & 7 in EaC2e. source code. IR IR target.

Generating Code for Assignment Statements back to work. Comp 412 COMP 412 FALL Chapters 4, 6 & 7 in EaC2e. source code. IR IR target. COMP 412 FALL 2017 Generating Code for Assignment Statements back to work Comp 412 source code IR IR target Front End Optimizer Back End code Copyright 2017, Keith D. Cooper & Linda Torczon, all rights

More information

Push-Button Verification of File Systems

Push-Button Verification of File Systems 1 / 24 Push-Button Verification of File Systems via Crash Refinement Helgi Sigurbjarnarson, James Bornholt, Emina Torlak, Xi Wang University of Washington 2 / 24 File systems are hard to get right Complex

More information

C Code Verification based on the Extended Labeled Transition System Model

C Code Verification based on the Extended Labeled Transition System Model C Code Verification based on the Extended Labeled Transition System Model Dexi Wang, Chao Zhang, Guang Chen, Ming Gu, and Jiaguang Sun School of Software, TNLIST, Tsinghua University, China {dx-wang12,zhang-chao13,chenguan14}@mails.tsinghua.edu.cn

More information

arxiv: v1 [cs.ai] 11 Apr 2017

arxiv: v1 [cs.ai] 11 Apr 2017 Counterexample Guided Inductive Optimization Rodrigo F. Araújo a, Higo F. Albuquerque b, Iury V. de Bessa b, Lucas C. Cordeiro c, João Edgar C. Filho b arxiv:1704.03738v1 [cs.ai] 11 Apr 2017 a Federal

More information

COUNTEREXAMPLE-GUIDED MODEL SYNTHESIS

COUNTEREXAMPLE-GUIDED MODEL SYNTHESIS COUNTEREXAMPLE-GUIDED MODEL SYNTHESIS Mathias Preiner, Aina Niemetz and Armin Biere Institute for Formal Models and Verification (FMV) Johannes Kepler University, Linz, Austria http://fmv.jku.at/ TACAS

More information

Introduction to CBMC. Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Arie Gurfinkel December 5, 2011

Introduction to CBMC. Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Arie Gurfinkel December 5, 2011 Software Engineering Institute Carnegie Mellon University Pittsburgh, PA 15213 December 5, 2011 based on slides by Daniel Kroening Bug Catching with SAT-Solvers Main Idea: Given a program and a claim use

More information

/ / / Net Speedup. Percentage of Vectorization

/ / / Net Speedup. Percentage of Vectorization Question (Amdahl Law): In this exercise, we are considering enhancing a machine by adding vector hardware to it. When a computation is run in vector mode on the vector hardware, it is 2 times faster than

More information

Predicate Refinement Heuristics in Program Verification with CEGAR

Predicate Refinement Heuristics in Program Verification with CEGAR Predicate Refinement Heuristics in Program Verification with CEGAR Tachio Terauchi (JAIST) Part of this is joint work with Hiroshi Unno (U. Tsukuba) 1 Predicate Abstraction with CEGAR Iteratively generate

More information

Recap: Functions as first-class values

Recap: Functions as first-class values Recap: Functions as first-class values Arguments, return values, bindings What are the benefits? Parameterized, similar functions (e.g. Testers) Creating, (Returning) Functions Iterator, Accumul, Reuse

More information

Compiler Design. Register Allocation. Hwansoo Han

Compiler Design. Register Allocation. Hwansoo Han Compiler Design Register Allocation Hwansoo Han Big Picture of Code Generation Register allocation Decides which values will reside in registers Changes the storage mapping Concerns about placement of

More information

Introduction to Machine-Independent Optimizations - 1

Introduction to Machine-Independent Optimizations - 1 Introduction to Machine-Independent Optimizations - 1 Department of Computer Science and Automation Indian Institute of Science Bangalore 560 012 NPTEL Course on Principles of Compiler Design Outline of

More information

Symbolic and Concolic Execution of Programs

Symbolic and Concolic Execution of Programs Symbolic and Concolic Execution of Programs Information Security, CS 526 Omar Chowdhury 10/7/2015 Information Security, CS 526 1 Reading for this lecture Symbolic execution and program testing - James

More information

Program Analysis and Constraint Programming

Program Analysis and Constraint Programming Program Analysis and Constraint Programming Joxan Jaffar National University of Singapore CPAIOR MasterClass, 18-19 May 2015 1 / 41 Program Testing, Verification, Analysis (TVA)... VS... Satifiability/Optimization

More information

Copyright 2015 Daniel Perelman

Copyright 2015 Daniel Perelman Copyright 2015 Daniel Perelman Program Synthesis Without Full Specifications for Novel Applications Daniel Perelman A dissertation submitted in partial fulfillment of the requirements for the degree of

More information

Compiler Optimization and Code Generation

Compiler Optimization and Code Generation Compiler Optimization and Code Generation Professor: Sc.D., Professor Vazgen Melikyan 1 Course Overview Introduction: Overview of Optimizations 1 lecture Intermediate-Code Generation 2 lectures Machine-Independent

More information

Ufo: A Framework for Abstraction- and Interpolation-Based Software Verification

Ufo: A Framework for Abstraction- and Interpolation-Based Software Verification Ufo: A Framework for Abstraction- and Interpolation-Based Software Verification Aws Albarghouthi 1, Yi Li 1, Arie Gurfinkel 2, and Marsha Chechik 1 1 Department of Computer Science, University of Toronto,

More information

Compilation and Hardware Support for Approximate Acceleration

Compilation and Hardware Support for Approximate Acceleration Compilation and Hardware Support for Approximate Acceleration Thierry Moreau Adrian Sampson Andre Baixo Mark Wyse Ben Ransford Jacob Nelson Luis Ceze Mark Oskin University of Washington Abstract Approximate

More information

Hoare Logic: Proving Programs Correct

Hoare Logic: Proving Programs Correct Hoare Logic: Proving Programs Correct 17-654/17-765 Analysis of Software Artifacts Jonathan Aldrich Reading: C.A.R. Hoare, An Axiomatic Basis for Computer Programming Some presentation ideas from a lecture

More information

Direct Manipulation Programming Systems. Ravi Chugh Brian Hempel Jacob Albers Grace Lu Justin Lubin Mitchell Spradlin

Direct Manipulation Programming Systems. Ravi Chugh Brian Hempel Jacob Albers Grace Lu Justin Lubin Mitchell Spradlin Direct Manipulation Programming Systems Ravi Chugh Brian Hempel Jacob Albers Grace Lu Justin Lubin Mitchell Spradlin June 5, 2017 Idea 2 Idea 3 Idea 4 Idea 5 Idea 6 Idea 7 λ... λ... λ... λ... λ... λ...

More information

Synthesis of Recursive ADT Transformations from Reusable Templates

Synthesis of Recursive ADT Transformations from Reusable Templates Synthesis of Recursive ADT Transformations from Reusable Templates Jeevana Priya Inala 1,NadiaPolikarpova 1,XiaokangQiu 2,BenjaminS.Lerner 3, and Armando Solar-Lezama 1 1 MIT {jinala, polikarn, asolar}@csail.mit.edu

More information

BITCOIN MINING IN A SAT FRAMEWORK

BITCOIN MINING IN A SAT FRAMEWORK BITCOIN MINING IN A SAT FRAMEWORK Jonathan Heusser @jonathanheusser DISCLAIMER JUST TO BE CLEAR.. This is research! Not saying ASICs suck I am not a cryptographer, nor SAT solver guy WTF REALISED PHD RESEARCH

More information

Synthesizing a Synthesis tool. Rohit Singh

Synthesizing a Synthesis tool. Rohit Singh Synthesizing a Synthesis tool by Rohit Singh Submitted to the Department of Electrical Engineering and Computer Science in partial fulfillment of the requirements for the degree of Master of Science in

More information

PROGRAM ANALYSIS & SYNTHESIS

PROGRAM ANALYSIS & SYNTHESIS Lecture Partial Programs, Program Repair, and Sketching PROGRAM ANALYSIS & SYNTHESIS EranYahav Previously Synthesis from examples SMARTEdit String processing in spreadsheet from examples (a little bit)

More information

Chlorophyll: Synthesis-Aided Compiler for Low-Power Spatial Architectures

Chlorophyll: Synthesis-Aided Compiler for Low-Power Spatial Architectures Chlorophyll: Synthesis-Aided Compiler for Low-Power Spatial Architectures Phitchaya Phothilimthana Electrical Engineering and Computer Sciences University of California at Berkeley Technical Report No.

More information

Principles of Program Analysis: A Sampler of Approaches

Principles of Program Analysis: A Sampler of Approaches Principles of Program Analysis: A Sampler of Approaches Transparencies based on Chapter 1 of the book: Flemming Nielson, Hanne Riis Nielson and Chris Hankin: Principles of Program Analysis Springer Verlag

More information

Seminar in Software Engineering Presented by Dima Pavlov, November 2010

Seminar in Software Engineering Presented by Dima Pavlov, November 2010 Seminar in Software Engineering-236800 Presented by Dima Pavlov, November 2010 1. Introduction 2. Overview CBMC and SAT 3. CBMC Loop Unwinding 4. Running CBMC 5. Lets Compare 6. How does it work? 7. Conclusions

More information

COMPILER DESIGN - CODE OPTIMIZATION

COMPILER DESIGN - CODE OPTIMIZATION COMPILER DESIGN - CODE OPTIMIZATION http://www.tutorialspoint.com/compiler_design/compiler_design_code_optimization.htm Copyright tutorialspoint.com Optimization is a program transformation technique,

More information

Intermediate Code Generation

Intermediate Code Generation Intermediate Code Generation In the analysis-synthesis model of a compiler, the front end analyzes a source program and creates an intermediate representation, from which the back end generates target

More information

Syntax-Guided Termination Analysis

Syntax-Guided Termination Analysis Syntax-Guided Termination Analysis Grigory Fedyukovich, Yueling Zhang, Aarti Gupta Princeton University, Princeton, USA {grigoryf,yuelingz,aartig}@cs.princeton.edu Abstract. We present new algorithms for

More information

Wallingford: Toward a Constraint Reactive Programming Language

Wallingford: Toward a Constraint Reactive Programming Language Wallingford: Toward a Constraint Reactive Programming Language Alan Borning VPRI Technical Report TR-2016-001 Viewpoints Research Institute, 1025 Westwood Blvd 2nd flr, Los Angeles, CA 90024 t: (310) 208-0524

More information

ExCAPE. Expeditions in Computer Augmented Program Engineering

ExCAPE. Expeditions in Computer Augmented Program Engineering ExCAPE Expeditions in Computer Augmented Program Engineering Rajeev Alur, Ras Bodik, Jeff Foster, Bjorn Hartmann, Lydia Kavraki, Hadas Kress-Gazit, Stephane Lafortune, Boon Loo, P. Madhusudan, Milo Martin,

More information