Network


Latest external collaboration on country level. Dive into details by clicking on the dots.

Hotspot


Dive into the research topics where Görel Hedin is active.

Publication


Featured researches published by Görel Hedin.


conference on object oriented programming systems languages and applications | 2007

The jastadd extensible java compiler

Torbjörn Ekman; Görel Hedin

The JastAdd Extensible Java Compiler is a high quality Java compiler that is easy to extend in order to build static analysis tools for Java, and to extend Java with new language constructs. It is built modularly, with a Java 1.4 compiler that is extended to a Java 5 compiler. Example applications that are built as extensions include an alternative backend that generates Jimple, an extension of Java with AspectJ constructs, and the implementation of a pluggable type system for non-null checking and inferenc. The system is implemented using JastAdd, a declarative Java-like language. We describe the compiler architecture, the major design ideas for building and extending the compiler, in particular, for dealing with complex extensions that affect name and type analysis. Our extensible compiler compares very favorably concerning quality, speed and size with other extensible Java compiler frameworks. It also compares favorably in quality and size compared with traditional non-extensible Java compilers, and it runs within a factor of three compared to javac.


language descriptions tools and applications | 2003

JastAdd: an aspect-oriented compiler construction system

Görel Hedin; Eva Magnusson

We describe JastAdd, a Java-based system for compiler construction. JastAdd is centered around an object-oriented representation of the abstract syntax tree where reference variables can be used to link together different parts of the tree. JastAdd supports the combination of declarative techniques (using Reference Attributed Grammars) and imperative techniques (using ordinary Java code) in implementing the compiler. The behavior can be modularized into different aspects, e.g. name analysis, type checking, code generation, etc., that are woven together into classes using aspect-oriented programming techniques, providing a safer and more powerful alternative to the Visitor pattern. The JastAdd system is independent of the underlying parsing technology and supports any noncircular dependencies between computations, thereby allowing general multi-pass compilation. The attribute evaluator (optimal recursive evaluation) is implemented very conveniently using Java classes, interfaces, and virtual methods.


Science of Computer Programming | 2007

The JastAdd system — modular extensible compiler construction

Torbjörn Ekman; Görel Hedin

The JastAdd system enables modular specifications of extensible compiler tools and languages. Java has been extended with the Rewritable Circular Reference Attributed Grammars formalism that supports modularization and extensibility through several synergistic mechanisms. Object-orientation and static aspect-oriented programming are combined with declarative attributes and context-dependent rewrites to allow highly modular specifications. The techniques have been verified by implementing a full Java 1.4 compiler with modular extensions for non-null types and Java 5 features.


european conference on object-oriented programming | 2004

Rewritable Reference Attributed Grammars

Torbjörn Ekman; Görel Hedin

Springer Jun 2004, 2004. Taschenbuch. Book Condition: Neu. 23.3x15.5x cm. Neuware ECOOP is the premier forum in Europe for bringing together practitioners, searchers, and students to share their ideas and experiences in a broad range of disciplines woven with the common thread of object technology. It is a collage of events, including outstanding invited speakers, carefully refereed technical pers, practitioner reports re ecting real-world experience, panels, topic-focused workshops, demonstrations, and an interactive posters session. The 18th ECOOP 2004 conference held during June 14-18, 2004 in Oslo, Norway represented another year of continued success in object-oriented pgramming, both as a topic of academic study and as a vehicle for industrial software development. Object-oriented technology has come of age; it is now the commonly established method for most software projects. However, an panding eld of applications and new technological challenges provide a strong demand for research in foundations, design and programming methods, as well as implementation techniques. There is also an increasing interest in the ingration of objectorientation with other software development techniques. We anticipate therefore that object-oriented programming will be a fruitful subject of research for many years to come. Thisyear,theprogramcommitteereceived132submissions,ofwhich25were acceptedforpublicationafterathoroughreviewingprocess.Everypaperreceived atleast4reviews.Paperswereevaluatedbasedonrelevance,signi cance,clarity, originality,...


Science of Computer Programming | 2007

Circular reference attributed grammars — their evaluation and applications

Eva Magnusson; Görel Hedin

This paper presents a combination of Reference Attributed Grammars (RAGs) and Circular Attribute Grammars (CAGs). While RAGs allow the direct and easy specification of nonlocally dependent information, CAGs allow iterative fixed-point computations to be expressed directly using recursive (circular) equations. We demonstrate how the combined formalism, Circular Reference Attributed Grammars (CRAGs), can take advantage of both these strengths, making it possible to express solutions to many problems in an easy way. We exemplify with the specification and computation of the nullable, first, and follow sets used in parser construction, a problem which is highly recursive and normally programmed by hand using an iterative algorithm. We also present a general demand-driven evaluation algorithm for CRAGs and some optimizations of it. The approach has been implemented and experimental results include computations on a series of grammars including that of Java 1.2. We also revisit some of the classical examples of CAGs and show how their solutions are facilitated by CRAGs.


The Journal of Object Technology | 2007

Pluggable checking and inferencing of nonnull types for Java

Torbjörn Ekman; Görel Hedin

We have implemented a non-null type checker for Java and a new non-null inferencing algorithm for analyzing legacy code. The tools are modular extensions to the JastAdd extensible Java compiler, illustrating how pluggable type systems can be achieved. The resulting implementation is compact, less than 230 lines of code for the non-null checker and 460 for the inferencer. Non-null checking is a local analysis with little effect on compilation time. The inferencing algorithm is a whole-program analysis, yet it runs sufficiently fast for practical use, less than 10 seconds for 100.000 lines of code. We ran our inferencer on a large part of the JDK library, and could detect that around 70% of the dereferences, and around 24% of the method return values, were guaranteed to be non-null.


Lecture Notes in Computer Science | 2005

Modular name analysis for java using jastadd

Torbjörn Ekman; Görel Hedin

Name analysis for Java is challenging with its complex visibility rules involving nested scopes, inheritance, qualified access, and syntactic ambiguities. We show how Java name analysis including ambiguities related to names of variables, fields, and packages, can be implemented in a declarative and modular manner using the JastAdd compiler construction system. Declarative attributes and context-dependent rewrites enable the implementation to be modularized in the same way as the informal Java language specification. The individual rules in the specification transfer directly to equations in the implementation. Rewrites are used to define new concepts in terms of existing concepts in an iterative manner in the same way as the informal language specification. This enables equations to use both context-free and context-dependent concepts and leads to improved separation of concerns. A full Java 1.4 compiler has been implemented to validate the technique.


Science of Computer Programming | 2010

Implementation of a Modelica compiler using JastAdd attribute grammars

Johan kesson; Torbjörn Ekman; Görel Hedin

We have implemented a compiler for key parts of Modelica, an object-oriented language supporting equation-based modeling and simulation of complex physical systems. The compiler is extensible, to support experiments with emerging tools for physical models. To achieve extensibility, the implementation is done declaratively in JastAdd, a metacompilation system supporting modern attribute grammar mechanisms such as reference attributes and nonterminal attributes. This paper reports on experiences from this implementation. For name and type analyses, we illustrate how declarative design strategies, originally developed for a Java compiler, could be reused to support Modelicas advanced features of multiple inheritance and structural subtyping. Furthermore, we present new general design strategies for declarative generation of target ASTs from source ASTs. We illustrate how these strategies are used to resolve a generics-like feature of Modelica called modifications, and to support flattening, a fundamental part of Modelica compilation. To validate that the approach is practical, we have compared the execution speed of our compiler to two existing Modelica compilers.


international conference on pervasive services | 2009

Ad-hoc composition of pervasive services in the PalCom architecture

David Svensson Fors; Boris Magnusson; Sven Gestegård Robertz; Görel Hedin; Emma Nilsson-Nyman

We present an architecture supporting ad-hoc composition of pervasive services, an open-source framework that implements it, and the key design principles behind it. The architecture focuses on direct human interaction, supporting combination of devices and services that are not explicitly designed to work together. The focus is on local networks, but extension is possible to wide area networks, interconnecting several local networks. The information about how services are connected and coordinated is collected in a new construct called assemblies. Separating this information from the services themselves allows combination of existing services in new creative ways without changing them. Assemblies can provide new services and in this way be organized hierarchically. The assembly makes the architecture of a pervasive system explicit, providing an overview understandable to users. Discovery and connections across different network technologies is supported. The architecture has been used for applications in large scale networks, and offers mechanisms useful for system integration in general.


compiler construction | 1994

An Overview of Door Attribute Grammars

Görel Hedin

An extension to attribute grammars is introduced which allows objects and references to be specified as part of a syntax tree attribution. Practical advantages of these grammars include a simpler specification of many problems in static-semantic analysis, including the specification of object-oriented languages, and a highly reduced number of affected attributes after syntax tree modifications. The resulting attributions are space-efficient and allow efficient incremental attribute evaluation in interactive language-based editors.

Collaboration


Dive into the Görel Hedin's collaboration.

Top Co-Authors

Avatar
Top Co-Authors

Avatar
Top Co-Authors

Avatar
Top Co-Authors

Avatar
Top Co-Authors

Avatar
Top Co-Authors

Avatar
Top Co-Authors

Avatar
Top Co-Authors

Avatar
Top Co-Authors

Avatar
Top Co-Authors

Avatar

Eric Van Wyk

University of Minnesota

View shared research outputs
Researchain Logo
Decentralizing Knowledge