{"title":"Verifying stateful programs with substructural state and hoare types","authors":"J. Borgström, Juan Chen, N. Swamy","doi":"10.1145/1929529.1929532","DOIUrl":"https://doi.org/10.1145/1929529.1929532","url":null,"abstract":"A variety of techniques have been proposed to verify stateful functional programs by developing Hoare logics for the state monad. For better automation, we explore a different point in the design space: we propose using affine types to model state, while relying on refinement type checking to prove assertion safety.\u0000 Our technique is based on verification by translation, starting from FX, an imperative object-based surface language with specifications including object invariants and Hoare triple computation types, and translating into FINE, a functional language with dependent refinements and affine types. The core idea of the translation is the division of a stateful object into a pure value and an affine token whose type mentions the current state of the object. We prove our methodology sound via a simulation between imperative FX programs and their functional FINE translation.\u0000 Our approach enables modular verification of FX programs supported by an SMT solver. We demonstrate its versatility by several examples, including verifying clients of stateful APIs, even in the presence of aliasing, and tracking information flow through side-effecting computations.","PeriodicalId":153056,"journal":{"name":"Programming Languages meets Program Verification","volume":"155 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2011-01-29","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"114767956","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Linear maps","authors":"Shuvendu K. Lahiri, S. Qadeer, David Walker","doi":"10.1145/1929529.1929531","DOIUrl":"https://doi.org/10.1145/1929529.1929531","url":null,"abstract":"Verification of large programs is impossible without proof techniques that allow local reasoning and information hiding. In this paper, we take the approach of modeling the heap as a collection of partial functions with disjoint domains. We call each such partial function a linear map. Programmers may select objects from linear maps, update linear maps or transfer addresses and their contents from one linear map to another. Programmers may also declare new linear map variables and pass linear maps as arguments to procedures. The program logic prevents any of these operations from duplicating locations and thereby breaking the key heap representation invariant: the domains of all linear maps remain disjoint. Linear maps facilitate modular reasoning because programs that use them are also able to use simple, classical frame rules to preserve information about heap state across procedure calls. We illustrate our approach through examples, prove that our verification rules are sound, and show that operations on linear maps may be erased and replaced by equivalent operations on a single, global heap.","PeriodicalId":153056,"journal":{"name":"Programming Languages meets Program Verification","volume":"2 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2011-01-29","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"125722131","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Singleton types here, singleton types there, singleton types everywhere","authors":"Stefan Monnier, D. Haguenauer","doi":"10.1145/1707790.1707792","DOIUrl":"https://doi.org/10.1145/1707790.1707792","url":null,"abstract":"Singleton types are often considered a poor man's substitute for dependent types. But their generalization in the form of GADTs has found quite a following. The main advantage of singleton types and GADTs is to preserve the so-called phase distinction, which seems to be so important to make use of the usual compilation techniques.\u0000 Of course, they considerably restrict the programmers, which often leads them to duplicate code at both the term and type levels, so as to reflect at the type level what happens at the term level, in order to be able to reason about it.\u0000 In this article, we show how to automate such a duplication while eliminating the problematic dependencies. More specifically, we show how to compile the Calculus of Constructions into λH, a non-dependently-typed language, while still preserving all the typing information. Since λH has been shown to be amenable to type preserving CPS and closure conversion, it shows a way to preserve types when doing code extraction and more generally when using all the common compiler techniques.","PeriodicalId":153056,"journal":{"name":"Programming Languages meets Program Verification","volume":"1 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2010-01-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"130115534","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
T. Kalibera, P. Parízek, G. Haddad, Gary T. Leavens, J. Vitek
{"title":"Challenge benchmarks for verification of real-time programs","authors":"T. Kalibera, P. Parízek, G. Haddad, Gary T. Leavens, J. Vitek","doi":"10.1145/1707790.1707800","DOIUrl":"https://doi.org/10.1145/1707790.1707800","url":null,"abstract":"Real-time systems, and in particular safety-critical systems, are a rich source of challenges for the program verification community as software errors can have catastrophic consequences. Unfortunately, it is nearly impossible to find representative safety-critical programs in the public domain. This has been significant impediment to research in the field, as it is very difficult to validate new ideas or techniques experimentally. This paper presents open challenges for verification of real-time systems in the context of the Real-time Specification for Java. But, our main contribution is a family of programs, called CDx, which we present as an open source benchmark for the verification community.","PeriodicalId":153056,"journal":{"name":"Programming Languages meets Program Verification","volume":"130 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2010-01-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"128458314","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Arity-generic datatype-generic programming","authors":"Stephanie Weirich, Chris Casinghino","doi":"10.1145/1707790.1707799","DOIUrl":"https://doi.org/10.1145/1707790.1707799","url":null,"abstract":"Some programs are doubly-generic. For example, map is datatype-generic in that many different data structures support a mapping operation. A generic programming language like Generic Haskell can use a single definition to generate map for each type. However, map is also arity-generic because it belongs to a family of related operations that differ in the number of arguments. For lists, this family includes repeat, map, zipWith, zipWith3, zipWith4, etc. With dependent types or clever programming, one can unify all of these functions together in a single definition.\u0000 However, no one has explored the combination of these two forms of genericity. These two axes are not orthogonal because the idea of arity appears in Generic Haskell: datatype-generic versions of repeat, map and zipWith have different arities of kind-indexed types. In this paper, we define arity-generic datatype-generic programs by building a framework for Generic Haskell-style generic programming in the dependently-typed programming language Agda 2.","PeriodicalId":153056,"journal":{"name":"Programming Languages meets Program Verification","volume":"66 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2010-01-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"123480718","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Modular reasoning about invariants over shared state with interposed data members","authors":"Stephanie Balzer, T. Gross","doi":"10.1145/1707790.1707794","DOIUrl":"https://doi.org/10.1145/1707790.1707794","url":null,"abstract":"Reasoning about object-oriented programs is difficult since such programs usually involve aliasing, and it is not easy to identify the ways objects can relate to each other and thus to confine a program's heap. In this paper, we address this problem in the context of a relationship-based programming language. In relationship-based programming languages, relationships are first-class citizens and allow a precise description of inter-object relationships. Relationships enforce a modularization discipline that is closer to the natural modularity inherent to many problem domains and that yields, as a result, program heaps that are DAGs. We further describe a mechanism, member interposition, that leverages the new modularization discipline and supports encapsulation of fields of shared objects. We have implemented the described modularization discipline and the mechanism of member interposition in the context of Rumer, a relationship-based programming language with support for contract specifications. We discuss the implications of member interposition for the modular verification of object invariants with an example. Relationships and interposed members provide an alternative to ownership type systems.","PeriodicalId":153056,"journal":{"name":"Programming Languages meets Program Verification","volume":"114 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2010-01-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"115794380","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Free theorems for functional logic programs","authors":"Jan Christiansen, D. Seidel, J. Voigtländer","doi":"10.1145/1707790.1707797","DOIUrl":"https://doi.org/10.1145/1707790.1707797","url":null,"abstract":"Type-based reasoning is popular in functional programming. In particular, parametric polymorphism constrains functions in such a way that statements about their behavior can be derived without consulting function definitions. Is the same possible in a strongly, and polymorphically, typed functional logic language? This is the question we study in this paper. Logical features like nondeterminism and free variables cause interesting effects, which we examine based on examples and address by identifying appropriate conditions that guarantee standard free theorems or inequational versions thereof to hold. We see this case study as a stepping stone for a general theory, not provided here, involving the definition of a logical relation and other machinery required for parametricity arguments appropriate to functional logic languages.","PeriodicalId":153056,"journal":{"name":"Programming Languages meets Program Verification","volume":"77 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2010-01-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"133769602","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Operating system development with ATS: work in progress","authors":"Matthew Danish, H. Xi","doi":"10.1145/1707790.1707793","DOIUrl":"https://doi.org/10.1145/1707790.1707793","url":null,"abstract":"Typical operating system design is marked by trade-offs between speed and reliability, features and security. Most systems are written in a low-level untyped programming language to achieve optimal hardware usage and for other practical reasons. But, this often results in CPU, memory, and I/O protection flaws due to mistakes in unverified code. On the other hand, fully verified systems are exceedingly hard to construct on any industrial scale. A high-level programming language, with an expressive type system suitable for systems programming, can help alleviate many of these problems without requiring the enormous effort of full verification.","PeriodicalId":153056,"journal":{"name":"Programming Languages meets Program Verification","volume":"102 1 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2010-01-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"125823722","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Resource typing in Guru","authors":"Aaron Stump, Evan Austin","doi":"10.1145/1707790.1707796","DOIUrl":"https://doi.org/10.1145/1707790.1707796","url":null,"abstract":"This paper presents a resource typing framework for the Guru verified-programming language, in which abstractions for various kinds of program resources can be defined. Implemented examples include reference-counted data, mutable arrays, and heap-allocated mutable aliased data. The approach enables efficient, type-safe programming with mutable and aliased data structures, with explicit deallocation (not garbage collection). We evaluate performance of the approach with two verified benchmarks, one involving mutable arrays, and another involving FIFO queues.","PeriodicalId":153056,"journal":{"name":"Programming Languages meets Program Verification","volume":"12 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2010-01-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"128051051","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Pragmatic equivalence and safety checking in Cryptol","authors":"Levent Erkök, John Matthews","doi":"10.1145/1481848.1481860","DOIUrl":"https://doi.org/10.1145/1481848.1481860","url":null,"abstract":"Cryptol is programming a language designed for specifying and programming cryptographic algorithms. In order to meet high-assurance requirements, Cryptol comes with a suite of formal-methods based tools allowing users to perform various program verification tasks. In the fully automated mode, Cryptol uses modern off-the-shelf SAT and SMT solvers to perform verification in a push-button manner. In the manual mode, Cryptol produces Isabelle/HOL specifications that can be interactively verified using the Isabelle theorem prover. In this paper, we provide an overview of Cryptol's verification toolset, describing our experiences with building a practical programming environment with dedicated support for formal verification.","PeriodicalId":153056,"journal":{"name":"Programming Languages meets Program Verification","volume":"1 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-01-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"130178537","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}