|Budget Amount *help
¥2,000,000 (Direct Cost : ¥2,000,000)
Fiscal Year 1994 : ¥900,000 (Direct Cost : ¥900,000)
Fiscal Year 1993 : ¥1,100,000 (Direct Cost : ¥1,100,000)
In this research we developed methods for testing and debugging the formal specification of programming languages and their translation(e.g., compilers).
There are several ways to describe such a specification. Among others, we adopted the attribute grammar which can express the semantics(static semantics), execution(dynamic semantics and interpretation), and translation(e.g., code generation) of programming languages.
In order to test and debug a formal specification, the following two kinds of tools are necessary from the practical point of view : (a) tools to assist debugging the specification when we find errors(in semantics, execution, and translation) in the specification, and(b) tools to generate source programs, to be used to test the specification, from the formal specification of the programming language and its translation.
1.As for(a), we developed a bug locating method by applying the algorithmic debugging technique, originally proposed in debugging logic programming languages, to attribute grammars. We further made extensions to the algorithm and clarified the relation of the algorithm to attribute grammar classes. We made a prototype system using a generator called Jun, which is based on a class of attribute grammars. We think this research has high originality, since previous work rarely deals with systematic debugging of attribute grammars.
2.As for(b), we developed a method for generating both syntactically and semantically correct/incorrect source programs, given the syntax and semantics of a programming language. A prototype system is made using Prolog. A characteristic feature of our research is that we can generate semantically correct/incorrect test programs by setting the context condition(semantic condition that a programming language must satisfy) of attribute grammars true/false.