AMADEUS: ASPECTS AND COMPILER
OPTIMIZATIONS FOR MATLAB SYSTEM DEVELOPMENT
[December 1st, 2007-November 30th, 2012]
[MATLAB COMPILER] (to be available)
Abstract |
|
|
MATLAB is a high-level,
interpreted, domain-specific language (DSL), mainly based on matrix data
types and operations on them. The MATLAB environment, the richness of the
language, the existence of domain-oriented packages, and the associated
software tools, make the language one of the preferred choices to model and
simulate complex systems (it is widely used in scientific computing, control
systems, signal and image processing, system engineering, etc.). More than
800 books dedicated to MATLAB attest to its wide adoption. Suitable MATLAB properties
include no need to declare variables (floating-point
double precision representation is the default data type), operator
overloading, function polymorphism and dynamic type specialization. However,
tasks such as exploiting non-uniform fixed-point representations, monitoring
certain variables during a timing window, or including handlers to watch
specific behaviors are extremely cumbersome, error-prone and tedious. Each
time these features are necessary, invasive changes on the original code, as
well as insertion of new code need to be performed. This problem is felt in
other implementation issues as well, since MATLAB can be regarded as a
specification rather than an implementation language. Other open issues are
related to efficient automatic synthesis of MATLAB specifications to a
software language or a hardware description language. This project addresses the enrichment of
MATLAB with aspect-oriented extensions to include additional information
(e.g., type and shape of variables) and to experiment different
implementation features (e.g., different implementations for the same
function, certain type binding for variables, etc.). The proposed aspects aim
to configure the low-level data representation of real variables and
expressions, to specifically-tailored data representations that benefit from
a more efficient support by target computing engines (e.g., fixed- instead of
floating-point representations). The approach also aims to help developers to
introduce handlers (code triggered when certain conditions may occur and with
a richer functionality than assertions)
and monitoring features, and to configure function implementations. We
believe aspect-oriented extensions will help system modeling, simulation, and
exploration of features conceiving system implementation. One of the
advantages is related to the fact that a single version of the specification
can be used throughout the entire development cycle rather than maintaining
multiple versions, as is currently the case. The project includes research on: - aspect mining on MATLAB
specifications to identify crosscutting concerns in a system, to enable
migration of existing MATLAB specifications to aspect-oriented ones; - type inference analysis and memory
minimization techniques to generate high-performance code and to achieve
highly–abstract aspects; - specification and implementation of a
declarative language to complement MATLAB with aspect rules. To
automate the approach, a prototype weaver that generates optimized MATLAB code
from input MATLAB specifications and aspect rules will be developed.
Evaluation of the approach will be based on benchmarks from a number of
domains and on MATLAB specifications from industry (space applications). |
Main Achievements |
|
-
An aspect-oriented approach
for complementing MATLAB programming; -
The design of A-MATLAB, a new
aspect domain-specific language (DSL) for MATLAB programs; -
Aspect mining over MATLAB
complex programs; -
A framework for compiling
MATLAB code to C code ready for embedded systems; -
Te use of aspects to guide the
MATLAB to C compiler in order to achieve efficient code; -
Dataflow to Petri Nets models
and the C code generation from Petri Nets; |
|
Funding: |
|
-
Fundação para a Ciência e a Tecnologia (FCT): http://www.fct.mctes.pt -
FCT reference: PTDC/EIA/70271/2006 |
|
Contact: |
|
João M. P.
Cardoso Universidade do Porto Faculdade de Engenharia (FEUP) Departamento de Engenharia Informática Rua Dr. Roberto Frias, s/n 4200-465 Porto Portugal Email: jmpc@acm.org |
Participants |
Publications |
MSc
Thesis, Posters, and Technical Reports |
Institutions: Members: - João M. P.
Cardoso, UP/FEUP - Adriano
Sanches, UP/FEUP - Anikó Katalin
Horváth da Costa, UNINOVA - João Alexandre
Baptista Vieira Saraiva, UM - João
Miguel Lobo Fernandes, UM - José Inácio
Pinto Rosado Rocha, UNINOVA - Luis Filipe dos
Santos Gomes, UNINOVA - Miguel Jorge
Tavares Pessoa Monteiro, FCT/UNL - Pedro
Miguel Ribeiro Martins, UM - Ricardo Jorge
Ferreira Nobre, UP/FEUP - Rogério
Alexandre Botelho Campos Rebelo, UNINOVA - Rui
Manuel Carvalho Pais, UNINOVA - Tiago Diogo
Ribeiro de Carvalho, UP/FEUP - Helder
Nuno Ribeiro Macedo, UM - Luís Miranda da
Cruz, UP/FEUP - Paulo Alexandre
da Silva Lopes, UM - Prakher Anand, UM Collaborators: - Pedro C. Diniz,
INESC-ID, Lisboa, Portugal - Alexandre
Delbem, USP, Brasil |
Books:
1.
João M. P. Cardoso, and Pedro C. Diniz, Compilation Techniques for Reconfigurable Architectures,
Springer, 234 p., Outubro de 2008, ISBN 978-0-387-09670-4. Book Chapters: 1. Pedro C. Diniz, and João M. P. Cardoso, Code
Transformations for Embedded Reconfigurable Computing Architectures,
in Generative and Transformational Techniques in Software Engineering III,
International Summer School, GTTSE 2009, Braga, Portugal, July 6-11, 2009,
Revised Papers, Fernandes, J.M.; Lämmel, R.; Visser, J.; Saraiva, J. (Eds.), LNCS 6491, Springer,
Heidelberg, 2011, pp. 322-344. 2. Monteiro M.P.,
Fernandes, J.M. Aspect-oriented Refactoring of Java Programs. Book chapter accepted for publication in “Java
in Academia and Research”, iConcept (Ke Cai,
editor). Articles related to Tutorials: 1.
Pedro C. Diniz, João M. P. Cardoso, “Compilation for Embedded Reconfigurable
Computing Architectures,” GTTSE 2009: Pre-proceedings, Generative and
Transformational Techniques in Software Engineering, João M. Fernandes, Ralf
Lammel, João Saraiva, Joost Visser (eds.), June, 2009, Braga, Portugal, pp.
293-314. Journal Papers:
2.
João
M. P. Cardoso, Pedro Diniz, and Markus Weinhardt, Compiling for Reconfigurable Computing: A
Survey, ACM Computing Surveys (CSUR), Vol. 42, No. 4, Article
13, June 2010, pp. 1-65. International Conference/Workshop Papers: 1.
Pedro Martins, Paulo Lopes, João P. Fernandes, João Saraiva,
and João M. P. Cardoso, “Program and Aspect Metrics for MATLAB,” in 12th International Conference on
Computational Science and Applications (ICCSA 2012), June 18-21, 2012,
Salvador de Bahia, Brazil, LNCS Springer (to appear). 2.
João M. P. Cardoso, Tiago Carvalho, José Gabriel de F. Coutinho, Wayne Luk, Ricardo
Nobre, Pedro C. Diniz, Zlatko Petrov, “LARA: An Aspect-Oriented
Programming Language for Embedded Systems,” in International Conference on
Aspect-Oriented Software Development (AOSD’12), Potsdam, Germany, March
25-30, 2012. [in
cooperation with REFLECT] 3.
José Gabriel de F. Coutinho,
Tiago Carvalho, Sérgio Durand, João M. P. Cardoso, Ricardo
Nobre, Pedro C. Diniz, and Wayne Luk, “Experiments with the LARA
Aspect-Oriented Approach,” in International Conference on Aspect-Oriented
Software Development (AOSD’12), Potsdam, Germany, March 25-30, 2012. [demo
paper] [in cooperation with
REFLECT] 4.
Adriano K. Sanches, João M. P. Cardoso, Alexandre C. B. Delbem, “Identifying
Merge-Beneficial Software Kernels for Hardware Implementation”, in
Proceedings of the International Conference on Reconfigurable Computing and
FPGAs (ReConFig '11), November 30– December 2nd
2011, Cancún, Mexico, IEEE Computer Society, pp.
74-79. DOI: 10.1109/ReConFig.2011.51 5.
Miguel P. Monteiro. “On the Cognitive Foundations of
Modularity”. Psychology of Programming Interest Group Annual
Conference (PPIG 2011), York, UK, September 2011. 6.
“Bridge
Expansion Joints Monitoring System”; Hugo Guerreiro, Rogério Campos-Rebelo, Luís Gomes; in INES’2011 – 15th IEEE
International Conference on Intelligent Engineering Systems 2011; 23-25 June
2011, Poprad, Slovakia; DOI
10.1109/INES.2011.5954711 7.
José Rocha, Luís Gomes, Octávio Dias, “Dataflow
Model Property Verification Using Petri net Translation Techniques,” in
INDIN’2011 - 9th IEEE International Conference on Industrial Informatics,
July 26-29, 2011, Caparica, Lisbon, Portugal; DOI
10.1109/INDIN.2011.6034993 8.
José-Inácio
Rocha, Luis Gomes, Octávio Páscoa
Dias, “Petri Net Verification
Techniques on Synchronous Dataflow Models,” in IECON’2011 - The 37th
Annual Conference of the IEEE Industrial Electronics Society; November 7-10,
2011; Melbourne, Australia 9.
Pedro
C. Diniz, and João M. P. Cardoso, “Code Transformations
for Embedded Reconfigurable Computing Architectures,” in Generative and Transformational Techniques in Software Engineering
III, International Summer School, GTTSE 2009, Braga, Portugal, July 6-11,
2009, Revised Papers, Fernandes, J.M.; Lämmel, R.; Visser, J.; Saraiva, J. (Eds.), LNCS 6491, Springer,
Heidelberg, 2011, pp. 322-344. 10. Ricardo Nobre, João M. P. Cardoso, Pedro C. Diniz, "Leveraging Type
Knowledge for Efficient MATLAB to C Translation," in 15th Workshop on Compilers for Parallel Computing (CPC'10), Vienna
University of Technology, Vienna, Austria, July 7-9, 2010. [em colaboração com o projeto
VECTOR: PTDC/EEA-ELC/71556/2006] 11. Luís Gomes, Rogério Rebelo,
João Paulo Barros, Anikó Costa, Rui Pais; “From Petri net models to C
implementation of digital controllers”; ISIE’2010 - IEEE International Symposium on Industrial Electronics;
Bari, Italy; 4-7 July 2010. DOI: 10.1109/ISIE.2010.5637670 12.
João Gomes, Miguel P. Monteiro, Design Pattern
Implementation in Object Teams. Proceedings of the 25th ACM Symposium on Applied
Computing (SAC 2010), special track on Object Oriented Programming Languages
and Systems (OOPS), pp. 2119-2120, Sierre/Lausanne, Switzerland,
March 22-26, 2010. DOI: 10.1145/1774088.1774534, 13. João M. P. Cardoso, Pedro Diniz, Miguel P. Monteiro, João M. Fernandes,
and João Saraiva, "A
Domain-Specific Aspect Language for Transforming MATLAB Programs," in Domain-Specific Aspect Language Workshop (DSAL'2010), part of the
9th International Conference on Aspect-Oriented Software Development
(AOSD'2010), March 15-19, 2010, Rennes & Saint Malo,
France. 14.
Sousa E., Monteiro M.P., Implementing Design
Patterns in CaesarJ: an Exploratory Study, workshop on Software Engineering Properties of Languages and Aspect
Technologies (SPLAT 2008) at AOSD 2008, March 31, 2008. DOI:
10.1145/1408647.1408653 National Conference
Papers:
1.
Miguel Monteiro, João M. P. Cardoso, and Simona Posea, "Identification and
Characterization of Crosscutting Concerns in MATLAB Systems,"
in 2º Simpósio Nacional na Área da Informática (INForum'10), 9-10 Setembro,
2010, Braga, Portugal. Track: CoRTA2010:
Compilers, Programming Languages, Related Technologies and Applications. |
MSc Thesis:
1. Paulo
Alexandre da Silva Lopes (15944), “Program and aspect metrics for MATLAB:
Design and implementation,” Universidade
do Minho, 19 de Dezembro de 2011. [Orientador: João Saraiva,
co-orientador: João Cardoso] 2. Tiago
Diogo Ribeiro de Carvalho, “A Meta-Language and Framework for
Aspect-Oriented Programming,” Dissertação no âmbito do Mestrado Integrado
em Engenharia Informática e Computação (MIEIC), Faculdade de Engenharia da
Universidade do Porto (FEUP), Porto, July 2011. [orientador: João M. P.
Cardoso] 3.
Rogério Alexandre Botelho Campos Rebelo; “Geração automática de código ANSI C a partir de redes de Petri IOPT
– PNML2C -”; Mestrado concluído em 19 Setembro 2010; UNL-FCT.
[orientador: Luís Gomes] 4. Pedro Miguel
Ribeiro Martins, “A Domain Specific Aspect Language for Matlab”, Universidade do
Minho, orientador: João Saraiva, Dezembro de 2010. [Orientador: João
Saraiva] 5. Helder Nuno Ribeiro
Macedo, “A Strategic-Based Weaver for
Aspect-MatLab”, orientador: João Saraiva & Jácome Cunha, Universidade do Minho,
Dezembro 2010. [Orientador: João Saraiva]. Posters: 1.
A Domain-Specific Aspect Language for MATLAB and its
Strategic Programming Weaver, Ricardo Nobre, Tiago
Carvalho, João M. P. Cardoso and Pedro Diniz, DATE’2012, Friday Workshop on Designing for Embedded Parallel Computing
Platforms: Architectures, Design Tools, and Applications, March
16, 2012, Dresden, Germany. 2.
LARA: An Aspect-Oriented Approach for
Developing and Designing Embedded Systems, Tiago Carvalho, João M. P. Cardoso, Sérgio Durand, José Coutinho,
Ricardo Nobre, Pedro Diniz, Wayne Luk and Zlatko Petrov, DITAM2012: Workshop
on Design Tools and Architectures for Multi-Core
Embedded Computing Platforms, January 24th, 2012, part of the Int’l Conf. on
High-Performance and Embedded Architectures and Compilers (HiPEAC’2012),
Paris, France on Jan 23-25, 2012. [in
cooperation with REFLECT] 3.
MATLAB to C Conversion Targeting Embedded Computing
Systems, Ricardo Nobre, João M.
P. Cardoso, and Pedro Diniz, DITAM2012: Workshop on Design Tools and
Architectures for Multi-Core Embedded Computing Platforms, January 24th,
2012, part of the Int’l Conf. on High-Performance and Embedded Architectures
and Compilers (HiPEAC’2012), Paris, France on Jan 23-25, 2012. [Ricardo Nobre won a student poster
award] 4.
MATLAB to C Conversion Targeting
Embedded Systems, Ricardo Nobre, João M.
P. Cardoso and Pedro C. Diniz, Generative and Transformational Techniques in
Software Engineering III, Int’l Summer School, GTTSE 2009, Braga, Portugal,
July 6-11, 2009 5.
A Meta-Language and Framework for
Aspect-Oriented Programming, Tiago Carvalho, and João M. P. Cardoso, Generative and
Transformational Techniques in Software Engineering III, Int’l Summer School,
GTTSE 2009, Braga, Portugal, July 6-11, 2009. Technical Reports: 1. João M. P. Cardoso, AMADEUS ARCHITECTURE OVERVIEW,
AMADEUS Technical Report, TR-AMADEUS-01-2008, Universidade do Porto,
Faculdade de Engenharia (FEUP), July 2008. 2. João M. P. Cardoso, Pedro C. Diniz,
Miguel P. Monteiro, João M. Fernandes, João Saraiva, MATLAB ASPECTS, AMADEUS Technical Report, TR-AMADEUS-02-2009,
Universidade do Porto, Faculdade de Engenharia (FEUP), November 2009. 3. Prakher Anand, João M. Fernandes, and João Saraiva, "A Report On Construction Of Aspect Weaver For MATLAB," AMADEUS Technical
Report, TR-AMADEUS-01-2009, Dep. Informática / CCTC Universidade do Minho, Campus de Gualtar, Braga,
Portugal, July, 2009. 4. Ricardo Nobre, “A Modular MATLAB Compilation Framework,” AMADEUS Technical
Report, TR-AMADEUS-01-2011, Universidade do Porto, Faculdade de Engenharia
(FEUP), October 2011. 5. Ricardo Nobre, João M. P. Cardoso,
Pedro C. Diniz, “Leveraging Type/Shape
Knowledge for Efficient MATLAB to C Translation,” AMADEUS Technical
Report, TR-AMADEUS-01-2010, Universidade do Porto, Faculdade de Engenharia
(FEUP), October 2010. 6. Pedro Martins, Paulo Lopes, João P.
Fernandes, João Saraiva, and João M. P. Cardoso, “Program and Aspect Metrics for Matlab,” AMADEUS Technical
Report, TR-AMADEUS-04-2011, Dep. Informática / CCTC Universidade do Minho,
Campus de Gualtar, Braga, Portugal, October 2011. 7. Tiago Carvalho, Ricardo Nobre, João
M. P. Cardoso, Miguel P. Monteiro, and João M. Fernandes, “A-MATLAB: MATLAB plus Aspects,” AMADEUS
Technical Report, TR-AMADEUS-03-2011, Universidade do Porto, Faculdade de
Engenharia (FEUP), October 2011. 8. Ricardo Nobre, Tiago Carvalho, João
M. P. Cardoso, Pedro C. Diniz, “MATLAB
to C Translation Targeting Embedded Computing Systems,” AMADEUS Technical
Report, TR-AMADEUS-02-2011, Universidade do Porto, Faculdade de Engenharia
(FEUP), October 2011. |
© João M. P. Cardoso, January 2012