Abstract
In this paper we present a new technique for automatically verifying typing constraints in the setting of Dminor, a first-order data processing language with refinement types and dynamic type-tests. We achieve this by translating Dminor programs into a standard while language and then using a general-purpose verification tool. Our translation generates assertions in the while program that faithfully represent the sophisticated typing constraints in the original program. We use a generic verification condition generator together with an SMT solver to prove statically that these assertions succeed in all executions. We formalise our translation algorithm using an interactive theorem prover and provide a machine-checkable proof of its soundness. We provide a prototype implementation using Boogie and Z3 that can already be used to efficiently verify a large number of test programs.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Bytecode level specification language and program logic. Mobius Project, Deliverable D3.1 (2006)
The Microsoft code name ”M” modeling language specification (October 2009), http://msdn.microsoft.com/en-us/library/dd548667.aspx
Barnett, M., Chang, B.-Y.E., DeLine, R., Jacobs, B., Leino, K.R.M.: Boogie: A Modular Reusable Verifier for Object-Oriented Programs. In: de Boer, F.S., Bonsangue, M.M., Graf, S., de Roever, W.-P. (eds.) FMCO 2005. LNCS, vol. 4111, pp. 364–387. Springer, Heidelberg (2006)
Barnett, M., Leino, K.R.M., Schulte, W.: The Spec# Programming System: An Overview. In: Barthe, G., Burdy, L., Huisman, M., Lanet, J.-L., Muntean, T. (eds.) CASSIS 2004. LNCS, vol. 3362, pp. 49–69. Springer, Heidelberg (2005)
Barras, B., Boutin, S., Cornes, C., Courant, J., Coscoy, Y., Delahaye, D., de Rauglaudre, D., Filliâtre, J., Giménez, E., Herbelin, H., et al.: The Coq proof assistant reference manual, version 8.2. INRIA (2009)
Bengtson, J., Bhargavan, K., Fournet, C., Gordon, A.D., Maffeis, S.: Refinement types for secure implementations. ACM Transactions on Programming Languages and Systems 33(2), 8 (2011)
Bierman, G.M., Gordon, A.D., Hriţcu, C., Langworthy, D.: Semantic subtyping with an SMT solver. In: 15th ACM SIGPLAN International Conference on Functional programming (ICFP 2010), pp. 105–116. ACM Press (2010)
Böhme, S., Leino, K.R.M., Wolff, B.: HOL-Boogie — An Interactive Prover for the Boogie Program-Verifier. In: Mohamed, O.A., Muñoz, C., Tahar, S. (eds.) TPHOLs 2008. LNCS, vol. 5170, pp. 150–166. Springer, Heidelberg (2008)
Cohen, E., Moskal, M., Tobies, S., Schulte, W.: A precise yet efficient memory model for C. Electronic Notes in Theoretical Computer Science 254, 85–103 (2009)
Dahlweid, M., Moskal, M., Santen, T., Tobies, S., Schulte, W.: VCC: Contract-based modular verification of concurrent C. In: 31st International Conference on Software Engineering (ICSE), pp. 429–430. IEEE (2009)
DeLine, R., Leino, K.: BoogiePL: A typed procedural language for checking object-oriented programs. Technical Report MSR-TR-2005-70, Microsoft Research (2005)
Detlefs, D., Nelson, G., Saxe, J.: Simplify: A theorem prover for program checking. Journal of the ACM (JACM) 52(3), 473 (2005)
Filliâtre, J.-C., Marché, C.: The Why/Krakatoa/Caduceus Platform for Deductive Program Verification. In: Damm, W., Hermanns, H. (eds.) CAV 2007. LNCS, vol. 4590, pp. 173–177. Springer, Heidelberg (2007)
Hosoya, H., Pierce, B.: XDuce: A statically typed XML processing language. ACM Transactions on Internet Technology 3(2), 117–148 (2003)
Jhala, R., Majumdar, R., Rybalchenko, A.: HMC: Verifying Functional Programs Using Abstract Interpreters. In: Gopalakrishnan, G., Qadeer, S. (eds.) CAV 2011. LNCS, vol. 6806, pp. 470–485. Springer, Heidelberg (2011)
Kleymann, T.: Hoare logic and auxiliary variables. Formal Aspects of Computing 11(5), 541–566 (1999)
Knowles, K., Tomb, A., Gronski, J., Freund, S., Flanagan, C.: Sage: Unified hybrid checking for first-class types, general refinement types and Dynamic. Technical report, UCSC (2007)
Kobayashi, N., Ong, C.-H.L.: A type system equivalent to the modal mu-calculus model checking of higher-order recursion schemes. In: 24th Annual IEEE Symposium on Logic in Computer Science (LICS), pp. 179–188. IEEE Computer Society (2009)
Lehner, H., Müller, P.: Formal translation of bytecode into BoogiePL. Electronic Notes in Theoretical Computer Science 190(1), 35–50 (2007)
Leino, K.R.M.: This is Boogie 2. TechReport (2008)
Leino, K.R.M., Millstein, T., Saxe, J.: Generating error traces from verification-condition counterexamples. Science of Computer Programming 55(1-3), 209–226 (2005)
Marinos, C.: An introduction to functional programming for.NET developers. MSDN Magazine (April 2010)
Meijer, E., Beckman, B., Bierman, G.M.: LINQ: reconciling object, relations and XML in the .NET framework. In: ACM SIGMOD International Conference on Management of Data (SIGMOD), page 706. ACM (2006)
Morris, J.: Comments on ”procedures and parameters”. Undated and unpublished
Naik, M., Palsberg, J.: A type system equivalent to a model checker. ACM Transactions on Programming Languages and Systems (TOPLAS) 30(5), 29 (2008)
Nipkow, T.: Hoare logics in Isabelle/HOL. In: Proof and System-Reliability, pp. 341–367. Kluwer (2002)
Pierce, B., Casinghino, C., Greenberg, M., Sjöberg, V., Yorgey, B.: Software Foundations (2010), http://www.cis.upenn.edu/~bcpierce/sf/
Ranise, S., Tinelli, C.: The satisfiability modulo theories library, SMT-LIB (2006), http://www.SMT-LIB.org
Rondon, P.M., Kawaguchi, M., Jhala, R.: Liquid types. In: ACM SIGPLAN 2008 Conference on Programming Language Design and Implementation (PLDI), pp. 159–169 (2008)
Swamy, N., Chen, J., Chugh, R.: Enforcing Stateful Authorization and Information Flow Policies in Fine. In: Gordon, A.D. (ed.) ESOP 2010. LNCS, vol. 6012, pp. 529–549. Springer, Heidelberg (2010)
Tarrach, T.: Automatically verifying “M” modeling language constraints. Master’s thesis, Saarland University (2010)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Backes, M., Hriţcu, C., Tarrach, T. (2011). Automatically Verifying Typing Constraints for a Data Processing Language. In: Jouannaud, JP., Shao, Z. (eds) Certified Programs and Proofs. CPP 2011. Lecture Notes in Computer Science, vol 7086. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-25379-9_22
Download citation
DOI: https://doi.org/10.1007/978-3-642-25379-9_22
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-25378-2
Online ISBN: 978-3-642-25379-9
eBook Packages: Computer ScienceComputer Science (R0)