Title
Statically safe program generation with SafeGen
Abstract
SafeGen is a meta-programming language for writing statically safe generators of Java programs. If a program generator written in SafeGen passes the checks of the SafeGen compiler, then the generator will only generate well-formed Java programs, for any generator input. In other words, statically checking the generator guarantees the correctness of any generated program, with respect to static checks commonly performed by a conventional compiler (including type safety, existence of a superclass, etc.). To achieve this guarantee, SafeGen supports only language primitives for reflection over an existing well-formed Java program, primitives for creating program fragments, and a restricted set of constructs for iteration, conditional actions, and name generation. SafeGen's static checking algorithm is a combination of traditional type checking for Java, and a series of calls to a theorem prover to check the validity of first-order logical sentences, constructed to represent well-formedness properties of the generated program under all inputs. The approach has worked quite well in our tests, providing proofs for correct generators or pointing out interesting bugs.
Year
DOI
Venue
2011
10.1016/j.scico.2008.09.007
Sci. Comput. Program.
Keywords
Field
DocType
domain-specific languages,existing well-formed java program,statically safe generator,traditional type checking,statically safe program generation,language extensions,correct generator,safegen compiler,generator input,static checking algorithm,program fragment,meta-programming,program generator,java program,first order logic,meta programming,domain specific language,theorem prover,type safety,generic programming,domain specific languages
Type system,Scala,Programming language,Computer science,Java annotation,Java concurrency,Real time Java,Theoretical computer science,Generics in Java,Java Modeling Language,Type safety
Journal
Volume
Issue
ISSN
76
5
Science of Computer Programming
ISBN
Citations 
PageRank 
3-540-29138-5
31
2.10
References 
Authors
19
3
Name
Order
Citations
PageRank
Shan Shan Huang120214.60
David Zook2886.24
Yannis Smaragdakis32247147.50