Automatic Construction of Java Programs from Functional Program Specifications
نویسنده
چکیده
This paper presents a novel approach to construct Java programs automatically from the input functional program specifications on natural numbers from the constructive proofs of the input specifications using an inductive theorem prover called Poiti′n. The construction of a Java program from the input functional program specification involves two phases. The theorem prover is used to construct a higher order functional (HOF) program from the input specification expressed as an existential theorem. A set of mapping rules for a Programming Language Translation System (PLTS) is defined for translating functional expressions to their semantic equivalent Java code. The generated functional program is translated into intermediate Java code in the form of a Java function using the PLTS module. The generated Java function requires a small refinement to obtain a syntactically correct Java function. This Java function is encapsulated within a user defined Java class as a member operation, which is invoked within a Java application class consisting of a main function by creating objects resulting in an executable Java program. The constructed functional program and the generated Java program both are correct with respect to the input specification as they produce the same output. Keywords—Functional Program Specification; Existential Theorems; Higher Order Functional Program; Mapping Rules; Programming Language Translation System; Java Program; Refinement
منابع مشابه
The CleanJava Language for Functional Program Verification
Unlike Hoare-style program verification, functional program verification supports forward reasoning by viewing a program as a mathematical function from one program state to another and proving its correctness by essentially comparing two mathematical functions, the function computed by the program and its specification. Since it requires a minimal mathematical background and reflects the way t...
متن کاملSynthesis of Distributed Programs
This paper presents a way for distributed program synthesis. We use Java programming language as a base language that is enchanted with declarative specifications. Program synthesizer that performs automated program construction uses these specifications. Several aspects are presented on how in this framework a new program can be synthesized and executed, taking advantage of the distributed com...
متن کاملUML Activity Diagram-Based Automatic Test Case Generation For Java Programs
Test case generation based on design specifications is an important part of testing processes. In this paper, Unified Modeling Language activity diagrams are used as design specifications. By setting up several test adequacy criteria with respect to activity diagrams, an automatic approach is presented to generate test cases for Java programs. Instead of directly deriving test cases from activi...
متن کاملProMoVer: A Tool for Modular Verification of Temporal Safety Properties
I will talk about ProMoVer, a tool for fully automated procedure-modular verification of Java programs equipped with method-local and global assertions that specify safety properties of sequences of method invocations. Modularity at the procedure-level is a natural instantiation of the modular verification paradigm, where correctness of global properties is relativized on the local properties o...
متن کاملAn Automatic Verifier for Java-Like Programs Based on Dynamic Frames
Data abstraction is crucial in the construction of modular programs, since it ensures that internal changes in one module do not propagate to other modules. In object-oriented programs, classes typically enforce data abstraction by providing access to their internal state only through methods. By using method calls in method contracts, data abstraction can be extended to specifications. In this...
متن کامل