Abstract. Software testing is a labor-intensive and hence expensive, yet heavily used technique to control quality. In this paper we introduce Gast, a fully automatic test-tool. Properties from first order logic can be expressed in the system, Gast automatically generates appropriate test-data, evaluates the property for these values, and analyzes the test-results. In this way it becomes easier and cheaper to test software components. The distinguishing property of our system is that the test-data are generated in a systematic and generic way using generic programming techniques. This implies that there is no need for the user to indicate how data should be generated. Moreover, duplicated tests are avoided and for finite domains Gast is able to proof a property by testing it for all possible values. As an important side-effect, it also encourages stating formal properties of the software.
A.Alimarine@ cs.ru.nl, S.Smetsers@cs.ru.nl A b s tr a c t. Generic programming is accepted by the functional program ming community as a valuable tool for program development. Several functional languages have adopted the generic scheme of type-indexed values. This scheme works by specialization of a generic function to a concrete type. However, the generated code is extremely inefficient com pared to its hand-w ritten counterpart. The performance penalty is so big th at the practical usefulness of generic programming is compromised. In this paper we present an optimization algorithm th at is able to com pletely eliminate the overhead introduced by the specialization scheme for a large class of generic functions. The presented technique is based on consumer-producer elimination as exploited by fusion, a standard gen eral purpose optimization method. We show th a t our algorithm is able to optimize many practical examples of generic functions. K eyw o rd s: program transformation, fusion, generic/polytypic program ming.
Invertible programming occurs in the area of data conversion where it is required that the conversion in one direction is the inverse of the other. For that purpose, we introduce bidirectional arrows (biarrows). The bi-arrow class is an extension of Haskell's arrow class with an extra combinator that changes the direction of computation.The advantage of the use of bi-arrows for invertible programming is the preservation of invertibility properties using the biarrow combinators. Programming with bi-arrows in a polytypic or generic way exploits this the most. Besides bidirectional polytypic examples, including invertible serialization, we give the definition of a monadic bi-arrow transformer, which we use to construct a bidirectional parser/pretty printer.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
hi@scite.ai
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
Copyright © 2024 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.