Advertisement

Journal of Automated Reasoning

, Volume 60, Issue 1, pp 23–42 | Cite as

Verifying Relative Safety, Accuracy, and Termination for Program Approximations

  • Shaobo HeEmail author
  • Shuvendu K. Lahiri
  • Zvonimir Rakamarić
Article

Abstract

Approximate computing is an emerging area for trading off the accuracy of an application for improved performance, lower energy costs, and tolerance to unreliable hardware. However, developers must ensure that the leveraged approximations do not introduce significant, intolerable divergence from the reference implementation, as specified by several established robustness criteria. In this work, we show the application of automated differential verification towards verifying relative safety, accuracy, and termination criteria for a class of program approximations. We use mutual summaries to express relative specifications for approximations, and SMT-based invariant inference to automate the verification of such specifications. We perform a detailed feasibility study showing promise of applying automated verification to the domain of approximate computing in a cost-effective manner.

Keywords

Approximate computing Differential verification SymDiff 

Notes

Acknowledgements

We thank Adrian Sampson for his feedback and for helping out with benchmark selection, and Akash Lal for assisting with Houdini. This work was supported in part by NSF awards 1255776 and 1552975, and SRC contract 2013-TJ-2426.

References

  1. 1.
    Baek, W., Chilimbi, T.M.: Green: a framework for supporting energy-conscious programming using controlled approximation. In: ACM SIGPLAN Conf. on Programming Language Design and Implementation (PLDI), pp. 198–209 (2010)Google Scholar
  2. 2.
    Barnett, M., Chang, B.-Y.E., DeLine, R., Jacobs, B., Leino, K.R.M.: Boogie: A modular reusable verifier for object-oriented programs. In: International Symposium on Formal Methods for Components and Objects (FMCO), pp. 364–387 (2006)Google Scholar
  3. 3.
    Barrett, C., Sebastiani, R., Seshia, S., Tinelli, C.: Satisfiability modulo theories. In: Handbook of Satisfiability, chap. 26, pp. 825–885. IOS Press, Amsterdam (2009)Google Scholar
  4. 4.
    Benton, N.: Simple relational correctness proofs for static analyses and program transformations. In: ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), pp. 14–25 (2004)Google Scholar
  5. 5.
    Bornholt, J., Mytkowicz, T., McKinley, K.S.: Uncertain<T>: a first-order type for uncertain data. In: ACM International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), pp. 51–66 (2014)Google Scholar
  6. 6.
    Boston, B., Sampson, A., Grossman, D., Ceze, L.: Probability type inference for flexible approximate programming. In: ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pp. 470–487 (2015)Google Scholar
  7. 7.
    Carbin, M., Kim, D., Misailovic, S., Rinard, M.C.: Proving acceptability properties of relaxed nondeterministic approximate programs. In: ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pp. 169–180 (2012)Google Scholar
  8. 8.
    Carbin, M., Misailovic, S., Rinard, M.C.: Verifying quantitative reliability for programs that execute on unreliable hardware. In: ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), pp. 33–52 (2013)Google Scholar
  9. 9.
    Chakrapani, L.N., George, J., Marr, B., Akgul, B.E.S., Palem, K.V.: Probabilistic design: a survey of probabilistic CMOS technology and future directions for terascale IC design. In: International Conference on Very Large Scale Integration of System on Chip (VLSI-SoC), pp. 101–118 (2006)Google Scholar
  10. 10.
    The Coq proof assistant. http://coq.inria.fr
  11. 11.
    Elenbogen, D., Katz, S., Strichman, O.: Proving mutual termination. Form. Methods Syst. Des. 47(2), 204–229 (2015)CrossRefzbMATHGoogle Scholar
  12. 12.
    Esmaeilzadeh, H., Sampson, A., Ceze, L., Burger, D.: Neural acceleration for general-purpose approximate programs. Commun. ACM 58(1), 105–115 (2014)CrossRefGoogle Scholar
  13. 13.
    Felsing, D., Grebing, S., Klebanov, V., Rümmer, P., Ulbrich, M.: Automating regression verification. In: ACM/IEEE International Conference on Automated Software Engineering (ASE), pp. 349–360 (2014)Google Scholar
  14. 14.
    Flanagan, C., Leino, K.R.M.: Houdini, an annotation assistant for ESC/Java. In: Internationa Symposium of Formal Methods Europe on Formal Methods for Increasing Software Productivity (FME), pp. 500–517 (2001)Google Scholar
  15. 15.
    Godlin, B., Strichman, O.: Regression verification. In: Design Automation Conference (DAC), pp. 466–471 (2009)Google Scholar
  16. 16.
    Graf, S., Saïdi, H.: Construction of abstract state graphs with PVS. In: International Conference on Computer Aided Verification (CAV), pp. 72–83 (1997)Google Scholar
  17. 17.
    Gupta, P., Agarwal, Y., Dolecek, L., Dutt, N., Gupta, R.K., Kumar, R., Mitra, S., Nicolau, A., Rosing, T.S., Srivastava, M.B., Swanson, S., Sylvester, D.: Underdesigned and opportunistic computing in presence of hardware variability. IEEE Trans. CAD of Integr. Circuits Syst. 32(1), 8–23 (2013)CrossRefGoogle Scholar
  18. 18.
    Han, J., Orshansky, M.: Approximate computing: an emerging paradigm for energy-efficient design. In: IEEE European Test Symposium (ETS), pp. 1–6 (2013)Google Scholar
  19. 19.
    Hawblitzel, C., Kawaguchi, M., Lahiri, S.K., Rebelo, H.: Towards modularly comparing programs using automated theorem provers. In: International Conference on Automated Deduction (CADE), pp. 282–299 (2013)Google Scholar
  20. 20.
    Hoffmann, H., Sidiroglou, S., Carbin, M., Misailovic, S., Agarwal, A., Rinard, M.: Dynamic knobs for responsive power-aware computing. In: ACM International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), pp. 199–212 (2011)Google Scholar
  21. 21.
    Kugler, L.: Is “good enough” computing good enough? Commun. ACM 58(5), 12–14 (2015)CrossRefGoogle Scholar
  22. 22.
    Lahiri, S.K., Hawblitzel, C., Kawaguchi, M., Rebêlo, H.: SymDiff: a language-agnostic semantic diff tool for imperative programs. In: International Conference on Computer Aided Verification (CAV), pp. 712–717 (2012)Google Scholar
  23. 23.
    Lahiri, S.K., McMillan, K.L., Sharma, R., Hawblitzel, C.: Differential assertion checking. In: Joint Meeting of the European Software Engineering Conference and ACM SIGSOFT Symposium on the Foundations of Software Engineering (ESEC/FSE), pp. 345–355 (2013)Google Scholar
  24. 24.
    McMillan, K.L.: Lazy annotation revisited. In: International Conference on Computer Aided Verification (CAV), pp. 243–259 (2014)Google Scholar
  25. 25.
    Misailovic, S., Carbin, M., Achour, S., Qi, Z., Rinard, M.C.: Chisel: Reliability- and accuracy-aware optimization of approximate computational kernels. SIGPLAN Not. 49(10), 309–328 (2014)CrossRefGoogle Scholar
  26. 26.
    Misailovic, S., Sidiroglou, S., Hoffmann, H., Rinard, M.: Quality of service profiling. In: ACM/IEEE International Conference on Software Engineering (ICSE), pp. 25–34 (2010)Google Scholar
  27. 27.
    Necula, G.C.: Translation validation for an optimizing compiler. In: ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pp. 83–94 (2000)Google Scholar
  28. 28.
    Nelson, J., Sampson, A., Ceze, L.: Dense approximate storage in phase-change memory. In: Ideas and Perspectives session at ASPLOS (2001)Google Scholar
  29. 29.
    Park, J., Esmaeilzadeh, H., Zhang, X., Naik, M., Harris, W.: FlexJava: Language support for safe and modular approximate programming. In: ACM SIGSOFT Symp. on the Foundations of Software Engineering (FSE), pp. 745–757 (2015)Google Scholar
  30. 30.
    Park, J., Ni, K., Zhang, X., Esmaeilzadeh, H., Naik, M.: Expectation-oriented framework for automating approximate programming. In: Workshop on Approximate Computing Across the System Stack (WACAS) (2014)Google Scholar
  31. 31.
    Pnueli, A., Siegel, M., Singerman, E.: Translation validation. In: International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS), pp. 151–166 (1998)Google Scholar
  32. 32.
    Rinard, M.: Acceptability-oriented computing. In: ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pp. 221–239 (2003)Google Scholar
  33. 33.
    Ringenburg, M.F., Sampson, A., Ackerman, I., Ceze, L., Grossman, D.: Dynamic analysis of approximate program quality. Technical Report UW-CSE-14-03-01, University of Washington (2014)Google Scholar
  34. 34.
    Ringenburg, M.F., Sampson, A., Ceze, L., Grossman, D.: Profiling and autotuning for energy-aware approximate programming. In: Workshop on Approximate Computing Across the System Stack (WACAS) (2014)Google Scholar
  35. 35.
    Roy, P., Ray, R., Wang, C., Wong, W.-F.: ASAC: Automatic sensitivity analysis for approximate computing. In: ACM SIGPLAN/SIGBED Conference on Languages, Compilers and Tools for Embedded Systems (LCTES), pp. 95–104 (2014)Google Scholar
  36. 36.
    Sampson, A.: Hardware and Software for Approximate Computing. PhD thesis, University of Washington (2015)Google Scholar
  37. 37.
    Sampson, A., Baixo, A., Ransford, B., Moreau, T., Yip, J., Ceze, L., Oskin, M.: ACCEPT: A programmer-guided compiler framework for practical approximate computing. Technical Report UW-CSE-15-01-01, University of Washington (2015)Google Scholar
  38. 38.
    Sampson, A., Bornholt, J., Ceze, L.: Hardware-software co-design: not just a cliché. In: Summit on Advances in Programming Languages (SNAPL), pp. 262–273 (2015)Google Scholar
  39. 39.
    Sampson, A., Dietl, W., Fortuna, E., Gnanapragasam, D., Ceze, L., Grossman, D.: EnerJ: approximate data types for safe and general low-power computation. In: ACM SIGPLAN Conf. on Programming Language Design and Implementation (PLDI), pp. 164–174 (2011)Google Scholar
  40. 40.
    Sampson, A., Panchekha, P., Mytkowicz, T., McKinley, K.S., Grossman, D., Ceze, L.: Expressing and verifying probabilistic assertions. In: ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pp. 112–122 (2014)Google Scholar
  41. 41.
    Sharma, V.C., Haran, A., Rakamarić, Z., Gopalakrishnan, G.: Towards formal approaches to system resilience. In: IEEE Pacific Rim International Symposium on Dependable Computing (PRDC), pp. 41–50 (2013)Google Scholar
  42. 42.
    Sidiroglou-Douskos, S., Misailovic, S., Hoffmann, H., Rinard, M.C.: Managing performance vs. accuracy trade-offs with loop perforation. In: Joint Meeting of the European Software Engineering Conference and ACM SIGSOFT Symposium on the Foundations of Software Engineering (ESEC/FSE), pp. 124–134 (2011)Google Scholar
  43. 43.
    Sui, X., Lenharth, A., Fussell, D.S., Pingali, K.: Proactive control of approximate programs. In: International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), pp. 607–621 (2016)Google Scholar
  44. 44.
    Thomas, A., Pattabiraman, K.: LLFI: An intermediate code level fault injector for soft computing applications. In: Workshop on Silicon Errors in Logic System Effects (SELSE) (2013)Google Scholar
  45. 45.
    Vanegue, J., Lahiri, S.K.: Towards practical reactive security audit using extended static checkers. In: IEEE Symposium on Security and Privacy, pp. 33–47 (2013)Google Scholar
  46. 46.
    Zhu, Z.A., Misailovic, S., Kelner, J.A., Rinard, M.: Randomized accuracy-aware program transformations for efficient approximate computations. In: ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), pp. 441–454 (2012)Google Scholar

Copyright information

© Springer Science+Business Media B.V. 2017

Authors and Affiliations

  1. 1.University of UtahSalt Lake CityUSA
  2. 2.Microsoft ResearchRedmondUSA

Personalised recommendations