"We plan to push the boundaries of code generation even further"
Licentiate interview
Roberto Castañeda Lozano from Spain came to Sweden and KTH in 2007 as an exchange student. He enjoyed his time and decided to stay and finish his degree at KTH. Shortly after the graduation he ended up at SICS where he is doing research in collaboration with KTH as an industrial doctoral student. Now he has defended his licentiate thesis "Integrated Register Allocation and Instruction Scheduling with Constraint Programming".
![](/polopoly_fs/1.524414.1599182769!/image/roberto_artikel.jpg)
Where are you from and where did you study before coming to KTH?
– I was born and grew up in Valencia, a medium-sized city by the Spanish Mediterranean coast. I studied the three first years of my computer science engineering degree at the Technical University of Valencia (Universitat Politècnica de València). In 2007 I landed at KTH as an exchange student and ended up studying the remaining two years of my degree here. I worked in the industry for some months before I joined the Swedish Institute of Computer Science (SICS) where I conduct my current research in collaboration with KTH School of ICT as an industrial doctoral student.
What is your topic and why did you choose it?
– I study the application of constraint programming (a "mathematical" optimization technique) to compiler problems. The area of compiler construction is very broad, and my focus lies within the generation of high-quality assembly code. I got interested in constraint programming and its multiple applications - ranging from scheduling sports competitions to solving Sudoku puzzles - when I took professor Christian Schulte's course in Constraint Programming at KTH.
Describe your topic in short.
– Compilers are tools that translate programs written by humans in high-level programming languages (such as C or Python) into low-level programs (assembly code) that computers can understand. There are many possible "translations", and some are better than others in that they yield faster, smaller, or more energy-efficient assembly programs. We study whether we can obtain better translations than those delivered by today's compilers by formulating different aspects of the process as mathematical optimization problems and solving them with constraint programming techniques.
Tell us something about your results.
– Our latest experiments show that using constraint programming for generating assembly code is practical and effective. Practical, since we can handle programs of about one order of magnitude larger than in related research approaches; effective, since we can generate faster assembly code (7% in average, up to 41% in some cases) than state-of-the-art compilers for certain processors. Generally, our approach is most suitable for complex processors such as Qualcomm's Hexagon, a processor that is present in many of today's mobile devices and that imposes many challenges on today's compilers.
What will the future bring for your research, how will you continue and what focus will you have on your PhD thesis?
– In the future, we plan to push the boundaries of code generation even further, by targeting bigger programs and formulating more aspects of compilation as mathematical optimization problems. We would also like to explore the application of other mathematical optimization techniques since these have often complementary strengths.
The licentiate thesis by Roberto Castañeda Lozano can be found here .