Change search
Link to record
Permanent link

Direct link
Publications (8 of 8) Show all publications
Drejhammar, F. & Rasmusson, L. (2014). BEAMJIT: a just-in-time compiling runtime for Erlang (7ed.). In: : . Paper presented at The Thirteenth ACM SIGPLAN Workshop on Erlang (pp. 61-72).
Open this publication in new window or tab >>BEAMJIT: a just-in-time compiling runtime for Erlang
2014 (English)Conference paper, Published paper (Refereed)
Abstract [en]

BEAMJIT is a tracing just-in-time compiling runtime for the Erlang programming language. The core parts of BEAMJIT are synthesized from the C source code of BEAM, the reference Erlang abstract machine. The source code for BEAM's instructions is extracted automatically from BEAM's emulator loop. A tracing version of the abstract machine, as well as a code generator are synthesized. BEAMJIT uses the LLVM toolkit for optimization and native code emission. The automatic synthesis process greatly reduces the amount of manual work required to maintain a just-in-time compiler as it automatically tracks the BEAM system. The performance is evaluated with HiPE's, the Erlang ahead-of-time native compiler, benchmark suite. For most benchmarks BEAMJIT delivers a performance improvement compared to BEAM, although in some cases, with known causes, it fails to deliver a performance boost. BEAMJIT does not yet match the performance of HiPE mainly because it does not yet implement Erlang specific optimizations such as boxing/unboxing elimination and a deep understanding of BIFs. Despite this BEAMJIT, for some benchmarks, reduces the runtime with up to 40\%.

National Category
Computer and Information Sciences
Identifiers
urn:nbn:se:ri:diva-24378 (URN)10.1145/2633448.2633450 (DOI)2-s2.0-84907398577 (Scopus ID)
Conference
The Thirteenth ACM SIGPLAN Workshop on Erlang
Available from: 2016-10-31 Created: 2016-10-31 Last updated: 2025-09-23Bibliographically approved
Castaneda Lozano, R., Hjort Blindell, G., Carlsson, M., Drejhammar, F. & Schulte, C. (2013). Constraint-based Code Generation (6ed.). In: : . Paper presented at Sixteenth International Workshop on Software and Compilers for Embedded Systems (pp. 93-95).
Open this publication in new window or tab >>Constraint-based Code Generation
Show others...
2013 (English)Conference paper, Published paper (Refereed)
Abstract [en]

Compiler back-ends generate assembly code by solving three main tasks: instruction selection, register allocation and instruction scheduling. We introduce constraint models and solving techniques for these code generation tasks and describe how the models can be composed to generate code in unison. The use of constraint programming, a technique to model and solve combinatorial problems, makes code generation simple, flexible, robust and potentially optimal.

National Category
Computer and Information Sciences
Identifiers
urn:nbn:se:ri:diva-24216 (URN)10.1145/2463596.2486155 (DOI)2-s2.0-84893342426 (Scopus ID)
Conference
Sixteenth International Workshop on Software and Compilers for Embedded Systems
Projects
Unison
Available from: 2016-10-31 Created: 2016-10-31 Last updated: 2025-09-23Bibliographically approved
Castañeda Lozano, R., Carlsson, M., Drejhammar, F. & Schulte, C. (2012). Constraint-based register allocation and instruction scheduling. In: Lecture Notes in Computer Science: . Paper presented at 8 October 2012 through 12 October 2012, Quebec City, QC (pp. 750-766). , 7514
Open this publication in new window or tab >>Constraint-based register allocation and instruction scheduling
2012 (English)In: Lecture Notes in Computer Science, 2012, Vol. 7514, p. 750-766Conference paper, Published paper (Refereed)
Abstract [en]

This paper introduces a constraint model and solving techniques for code generation in a compiler back-end. It contributes a new model for global register allocation that combines several advanced aspects: multiple register banks (subsuming spilling to memory), coalescing, and packing. The model is extended to include instruction scheduling and bundling. The paper introduces a decomposition scheme exploiting the underlying program structure and exhibiting robust behavior for functions with thousands of instructions. Evaluation shows that code quality is on par with LLVM, a state-of-the-art compiler infrastructure. The paper makes important contributions to the applicability of constraint programming as well as compiler construction: essential concepts are unified in a high-level model that can be solved by readily available modern solvers. This is a significant step towards basing code generation entirely on a high-level model and by this facilitates the construction of correct, simple, flexible, robust, and high-quality code generators.

Keywords
Code Generation, Code generators, Code quality, Compiler construction, Constraint model, Constraint programming, Constraint-based, Decomposition scheme, High quality, High-level models, Instruction scheduling, Program structures, Register allocation, Register bank, Robust behavior, Computer programming, Constraint theory, Flocculation, Network components, Program compilers
National Category
Engineering and Technology
Identifiers
urn:nbn:se:ri:diva-51170 (URN)10.1007/978-3-642-33558-7_54 (DOI)2-s2.0-84868266938 (Scopus ID)9783642335570 (ISBN)
Conference
8 October 2012 through 12 October 2012, Quebec City, QC
Available from: 2021-01-04 Created: 2021-01-04 Last updated: 2025-09-23Bibliographically approved
Castaneda Lozano, R., Carlsson, M., Drejhammar, F. & Schulte, C. (2012). Constraint-based Register Allocation and Instruction Scheduling (6ed.). In: : . Paper presented at Eighteenth International Conference on Principles and Practice of Constraint Programming (pp. 750-766).
Open this publication in new window or tab >>Constraint-based Register Allocation and Instruction Scheduling
2012 (English)Conference paper, Published paper (Refereed)
Abstract [en]

This paper introduces a constraint model and solving techniques for code generation in a compiler back-end. It contributes a new model for global register allocation that combines several advanced aspects: multiple register banks (subsuming spilling to memory), coalescing, and packing. The model is extended to include instruction scheduling and bundling. The paper introduces a decomposition scheme exploiting the underlying program structure and exhibiting robust behavior for functions with thousands of instructions. Evaluation shows that code quality is on par with LLVM, a state-of-the-art compiler infrastructure. The paper makes important contributions to the applicability of constraint programming as well as compiler construction: essential concepts are unified in a high-level model that can be solved by readily available modern solvers. This is a significant step towards basing code generation entirely on a high-level model and by this facilitates the construction of correct, simple, flexible, robust, and high-quality code generators.

National Category
Computer and Information Sciences
Identifiers
urn:nbn:se:ri:diva-24215 (URN)
Conference
Eighteenth International Conference on Principles and Practice of Constraint Programming
Projects
Unison
Available from: 2016-10-31 Created: 2016-10-31 Last updated: 2025-09-23Bibliographically approved
Drejhammar, F. & Haridi, S. (2012). Efficient simulation of view synchrony (6ed.). Kista, Sweden: Swedish Institute of Computer Science
Open this publication in new window or tab >>Efficient simulation of view synchrony
2012 (English)Report (Other academic)
Abstract [en]

This report presents an algorithm for efficiently simulating view synchrony, including failure-atomic total-order multicast in a discrete-time event simulator. In this report we show how a view synchrony implementation tailored to a simulated environment removes the need for third party middleware and detailed network simulation, thus reducing the complexity of a test environment. An additional advantage is that simulated view synchrony can generate all timing behaviours allowed by the model instead of just those exhibited by a particular view synchrony implementation.

Place, publisher, year, edition, pages
Kista, Sweden: Swedish Institute of Computer Science, 2012 Edition: 6
Series
SICS Technical Report, ISSN 1100-3154 ; 2012:07
National Category
Computer and Information Sciences
Identifiers
urn:nbn:se:ri:diva-24039 (URN)
Available from: 2016-10-31 Created: 2016-10-31 Last updated: 2025-09-23Bibliographically approved
Drejhammar, F. (2005). Flow Java: Declarative Concurrency for Java (1ed.). (Licentiate dissertation).
Open this publication in new window or tab >>Flow Java: Declarative Concurrency for Java
2005 (English)Licentiate thesis, monograph (Other academic)
Abstract [en]

This thesis presents the design, implementation, and evaluation of Flow Java, a programming language for the implementation of concurrent programs. Flow Java adds powerful programming abstractions for automatic synchronization of concurrent programs to Java. The abstractions added are single assignment variables (logic variables) and futures (read-only views of logic variables). The added abstractions conservatively extend Java with respect to types, parameter passing, and concurrency. Futures support secure concurrent abstractions and are essential for seamless integration of single assignment variables into Java. These abstractions allow for simple and concise implementation of high-level concurrent programming abstractions. Flow Java is implemented as a moderate extension to the GNU gcj/libjava Java compiler and runtime environment. The extension is not specific to a particular implementation, it could easily be incorporated into other Java implementations. The thesis presents three implementation strategies for single assignment variables. One strategy uses forwarding and dereferencing while the two others are variants of Taylor's scheme. Taylor's scheme represents logic variables as a circular list. The thesis presents a new adaptation of Taylor's scheme to a concurrent language using operating system threads. The Flow Java system is evaluated using standard Java benchmarks. Evaluation shows that in most cases the overhead incurred by the extensions is between 10% and 50%. For some pathological cases the runtime increases by up to 150%. Concurrent programs making use of Flow Java's automatic synchronization, generally perform as good as corresponding Java programs. In some cases Flow Java programs outperform Java programs by as much as 33%.

Publisher
p. 72
National Category
Computer and Information Sciences
Identifiers
urn:nbn:se:ri:diva-21052 (URN)
Projects
Vinnova PPC (Peer to Peer Computing, 2001-06045)
Available from: 2016-10-31 Created: 2016-10-31 Last updated: 2025-09-23Bibliographically approved
Drejhammar, F. & Schulte, C. (2004). Implementation strategies for single assignment variables (1ed.). In: : . Paper presented at CICLOPS 2004, Colloquium on Implementation of Constraint and LOgic Programming System, 8 Sep 2004, Saint Malo, France.
Open this publication in new window or tab >>Implementation strategies for single assignment variables
2004 (English)Conference paper, Published paper (Refereed)
Publisher
p. 12
National Category
Computer and Information Sciences
Identifiers
urn:nbn:se:ri:diva-22335 (URN)
Conference
CICLOPS 2004, Colloquium on Implementation of Constraint and LOgic Programming System, 8 Sep 2004, Saint Malo, France
Available from: 2016-10-31 Created: 2016-10-31 Last updated: 2025-09-23Bibliographically approved
Drejhammar, F., Haridi, S., Brand, P. & Schulte, C. (2003). Flow Java: declarative concurrency for Java. (1ed.). In: Proceedings of the Nineteenth International Conference on Logic Programming: . Paper presented at Nineteenth International Conference on Logic Programming, 9-13 Dec 2003, Mumbai, India.
Open this publication in new window or tab >>Flow Java: declarative concurrency for Java.
2003 (English)In: Proceedings of the Nineteenth International Conference on Logic Programming, 2003, 1Conference paper, Published paper (Refereed)
Abstract [en]

Logic variables pioneered by (concurrent) logic and concurrent constraint programming are powerful mechanisms for automatically synchronizing concurrent computations. They support a declarative model of concurrency that avoids explicitly suspending and resuming computations. This paper presents Flow Java which conservatively extends Java with single assignment variables and futures as variants of logic variables. The extension is conservative with respect to object-orientation, types, parameter passing, and concurrency in Java. Futures support secure concurrent abstractions and are essential for seamless integration of single assignment variables into Java. We show how Flow Java supports the construction of simple and concise concurrent programming abstractions. We present how to moderately extend compilation and the runtime architecture of an existing Java implementation for Flow Java. Evaluation using standard Java benchmarks shows that in most cases the overhead is between 10% and 40%. For some pathological cases the runtime increases by up to 75%.

National Category
Computer and Information Sciences
Identifiers
urn:nbn:se:ri:diva-22403 (URN)
Conference
Nineteenth International Conference on Logic Programming, 9-13 Dec 2003, Mumbai, India
Available from: 2016-10-31 Created: 2016-10-31 Last updated: 2025-09-23Bibliographically approved
Organisations
Identifiers
ORCID iD: ORCID iD iconorcid.org/0000-0002-2637-2991

Search in DiVA

Show all publications