Abstract

We present an approach to generating incremental threaded code for language-based programming environments from the specification of the runtime semantics of the programming language. Language-based environments (LBEs) that support incremental code generation have usually done so using ad hoc techniques for incremental recompilation. Our aim is to provide one uniform operational model based on attribute grammars that allows the specification of the runtime semantics, and thus code generation, to be incorporated with the specification of the syntax and static semantics of the language.The proposed semantic model of incremental code generation allows specification of compact code. It severely limits the repropagation of semantic information in the program tree due to changes in the code caused by modifications to the source program. Extended with interactive execution, this representation also facilitates the implementation of such debugging features as control-flow tracing, single-stepping and value-monitoring at the source level.We have demonstrated the feasibility of the proposed model by implementing a program editor for Pascal. The specification is written in the Synthesizer Specification Language (SSL) and forms the input to the Cornell Synthesizer Generator (CSG).KeywordsCode FragmentDenotational SemanticLoop BodyJoint IssueAttribute GrammarThese keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call