He Advisor Zvonimir Rakamarić shaobozvonimir csutahedu TOWARDS AUTOMATED DIFFERENTIAL PROGRAM VERIFICATION FOR APPROXIMATE COMPUTING Introduction Approximate computing ID: 524287
Download Presentation The PPT/PDF document "Student: Shaobo" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
Student: Shaobo He, Advisor: Zvonimir Rakamarić{shaobo,zvonimir}@cs.utah.edu
TOWARDS AUTOMATED DIFFERENTIAL PROGRAM VERIFICATION FOR APPROXIMATE COMPUTINGSlide2
IntroductionApproximate computing is an emerging area for trading off the accuracy of an application for improved performance, lower energy costs, and tolerance to unreliable hardware
Images generated with
relaxationsSlide3
INTRODUCTIONCurrent techniques for analyzing approximation acceptability criteria often lack inrigor (e.g., dynamic analysis),precision (e.g., type systems), orautomation (e.g., interactive theorem provers)Our approach is to leverage differential program verification to rigorously and automatically verify acceptability criteria of approximate programsSlide4
EXAMPLETaken fromCarbin, Kim, Misailovic, Rinard, “Proving Acceptability Properties of Relaxed Nondeterministic Approximate Programs”, PLDI 2012Inspired by an open-source search engine
procedure
swish(
maxR:
int
,N:
int
)
returns
(
numR:
int
) {
numR
:= 0;
while
(numR < maxR && numR < N)
numR
:=
numR
+ 1;
return
;
}Slide5
EXAMPLE: APPROXIMATIONprocedure swish(maxR:int,N:int)
returns
(
num
R
:
int
) {
old_maxR := maxR;
havoc
maxR;
assume
RelaxedEq(old_maxR, maxR);
numR
:=
0;
while
(
num
R
<
max
R
&&
num
R
<
N)
num
R
:=
num
R
+
1;
return
;
}
function
RelaxedEq
(
x:
int
,y:
int
)
returns
(
bool
) {
(x <= 10 && x == y) || (x > 10 && y >= 10)
}Slide6
EXAMPLE: Encoding & CheckingAcceptability property is encoded into a prediate called mutual summaryRelates original and approximate versions of swish (prefixed with v1. and v2. respectively)e.g, v1.maxR=v2.maxR && v1.N=v2.N
RelaxedEq
(v1.numR,v2.numR)
Mutual summaries are checked modularly by constructing a
product program
Implemented in
SymDiff
[
Lahiri
et al. CAV’12]
Use
off-the-shelf program verifier and
inference
Allow automatic inference of relational specificationSlide7
IMPLEMENTATIONSymDiffOriginal Program
Approximate Program
Product Program
Boogie + Inference
Z3
Manual PredicatesSlide8
EVALUATIONAcceptability of approximate programsTaken from Carbin et al.Swish++, LU Decomposition, WaterControl flow equivalenceReplaceChar, Selection Sort, Bubble Sort, Array OperationsIntroduced encoding that tracks a sequence of visited basic blocks using uninterpreted functionsPrecisely capturing array fragmentsSlide9
EXPERIMENTSBenchmark#Predicates#Manual
Preds
.
Time(s)
Swish++
14
4
6
LU Decomposition
32
4
7
Water
27
0
7
ReplaceChar
10
1
7
Selection Sort
66
4
307
Bubble Sort
38
4
49
Array Operations
41
1
7Slide10
FUTURE WORKConnect our tool flow with an approximate compilerTest and improve scalabilityProve relative terminationReason about probabilitiesSlide11
Questions?Slide12
Thanks!