3,200 research outputs found
Action semantics in retrospect
This paper is a themed account of the action semantics project, which Peter Mosses has led since the 1980s. It explains his motivations for developing action semantics, the inspirations behind its design, and the foundations of action semantics based on unified algebras. It goes on to outline some applications of action semantics to describe real programming languages, and some efforts to implement programming languages using action semantics directed compiler generation. It concludes by outlining more recent developments and reflecting on the success of the action semantics project
Recommended from our members
Experience with a Production Compiler Automatically Generated from an Attribute Grammar
This paper relates our experience implementing a production compiler from an attribute grammar. The compiler is Intel Corporation's Pascal-80 compiler. It runs on a microcomputer-based development system without virtual memory. An attribute grammar was written describing semantic analysis, storage allocation, and translation to intermediate code. Attribute evaluation is done in two alternating passes and the program tree is kept in intermediate files on disk. The first version of the compiler was manually implemented from the attribute grammar. Using what was learned from this experience, an automatic attribute evaluator-generator was then written and a new version or the compiler was mechanically created from the attribute grammar. Various techniques for optimizing the evaluator were tried. Their degree or success is reported and they are compared with other ideas from the literature. Complex attribute-values, such as sets, sequences and finite functions, were carefully implemented using applicative data structure in order to conserve memory. The attribute grammar was designed using the principles or data abstraction and information-hiding. The internal organization or many types or attributes is completely hidden from the attribute grammar author and the attribute evaluator. These values are manipulated only by specific out-of-line semantic functions that can be viewed as the operators or an abstract data type for this attribute. This also contributed to an efficient use of memory
Formalizing the Expertise of the Assembly Language Programmer
A novel compiler strategy for generating high quality code is described. The quality of the code results from reimplementing the program in the target language using knowledge of the program's behavior. The research is a first step towards formalizing the expertise of the assembly language programmer. The ultimate goal is to formalize code generation and implementation techniques in the same way that parsing and code generation techniques have been formalized. An experimental code generator based on the reimplementation strategy will be constructed. The code generator will provide a framework for analyzing the costs, applicability, and effectiveness of various implementation techniques. Several common code generation problems will be studied. Code written by experienced programmers and code generated by a conventional optimizing compiler will provide standards of comparison.MIT Artificial Intelligence Laborator
Translating programming languages for intermediate codes
Many of the important data structures used in a compiler are intermediate representations of the program being compiled. Often these representations take the form of trees, with several node types, each of which has different attributes. Tree representations can be described with grammars, just like programming languages. For each grammar rule, there is one constructor that belongs to the class for its left-hand-side symbol. I simply extend the abstract class with a concrete class for each grammar rule. Each grammar rule has right hand side components that must be represented in the data structures.compiler, lexical analysis, abstract syntax, intermediate representation, abstract machine language
Hardware acceleration of reaction-diffusion systems:a guide to optimisation of pattern formation algorithms using OpenACC
Reaction Diffusion Systems (RDS) have widespread applications in computational ecology, biology, computer graphics and the visual arts. For the former applications a major barrier to the development of effective simulation models is their computational complexity - it takes a great deal of processing power to simulate enough replicates such that reliable conclusions can be drawn. Optimizing the computation is thus highly desirable in order to obtain more results with less resources. Existing optimizations of RDS tend to be low-level and GPGPU based. Here we apply the higher-level OpenACC framework to two case studies: a simple RDS to learn the āworkingsā of OpenACC and a more realistic and complex example. Our results show that simple parallelization directives and minimal data transfer can produce a useful performance improvement. The relative simplicity of porting OpenACC code between heterogeneous hardware is a key benefit to the scientific computing community in terms of speed-up and portability
- ā¦