Title: Recent Advances in Compiler Generators: the LISA Approach Marjan Mernik
1Recent Advances in Compiler Generators the
LISA Approach Marjan Mernik
FACULTY OF ELECTRICAL ENGINEERING AND COMPUTER
SCIENCE
UNIVERSITY OF MARIBOR
2Outline of the Presentation
- Gentle introduction to compiler generators
- Generation of language-based tools from language
definition - Modular, reusable and extensible language
definition - LISA tool
3How to specify a programming language?
- Using the natural language
- Advantages
- descriptions are understandable
4How to specify a programming language?
- Using the natural language
- Disadvantages
- lack of clarity,
- ambiguities,
- various interpretations.
5How to specify a programming language?
- Using a formal method
- Advantages
- syntax and the semantics are defined in a precise
and unambiguous manner, - possibility for automatic generation of compilers
or interpreters, - tool for programming language design
- Disadvantages
- required deep knowledge
6Formal methods for programming language definition
- Lexicon (regular definitions, FSA)
- Syntax (BNF)
- Semantics (axiomatic, attribute grammars,
denotational, algebraic, structural
operational/natural, action, abstract state
machines, ....)
7Formal methods for programming language definition
- Possibility for automatic generation of compilers
or interpreters - Attribute Grammars Synthesizer Generator
- Denotational PSG
- Algebraic ASFSDF
- Structural operational/Natural Centaur
- Action ASD
- Abstract-state machines Gem-Mex
8Formal methods for programming language definition
- From formal language definitions many other
language-based tools can be automatically
generated, such as - syntax-directed editors,
- type checkers,
- dataflow analyzers,
- partial evaluators,
- debuggers,
- test case generators,
- animators, etc.
9Formal methods for programming language definition
- The core language definitions have to be
augmented or - Just a part of formal language definitions is
enough for automatic tool generation or - Implicit information must be extracted from
formal language definition
10Formal methods for programming language definition
- Automatic generation is possible whenever a tool
can be built from a fixed part and a variable
part and also the variable part, language
dependent, has to be systematically derivable
from the language specifications (Table 1).
11Table 1
12Table 1 (cont.)
13LISA ver. 1
- Developed 1994
- Mernik, Korbar, umer. LISA A Tool for Automatic
Language Implementation, ACM Sigplan Notices,
Vol. 30, No. 4, pp. 71 79, 1995.
14LISA ver. 2.0
- LISA ver. 2.0 (joint work with M. Lenic, E.
Avdicauevic) - started in summer 1997
- finished in summer 2000
- Incremental language development
- Educational tool
15LISA ver. 2.0
16LISA ver. 2.0
- LISA tool demo
- Robot.lisa
- RobotTime.lisa
- RobotSpeed.lisa
- CleaningRobot.lisa
17LISA ver. 2.0
- LISA generates also other language-based tools
- Editors,
- Inspectors,
- visualizers/animators (Joint work with P.
Henriques, M.J. Varanda Pereira from University
of Minho) - Debuggers (Joint work with J. Gray and H. Wu from
University of Alabama at Birmingham)
18LISA ver. 2.0
- Language knowledgable editor Inspectors
19LISA ver. 2.0
Visualizer/Animator
20LISA ver. 2.0
Debugger
21LISA ver. 2.1
- LISA ver. 2.1 (joint work with D. Rebernak, P.
Henriques, M.J. Varanda Pereira, D. da Cruz) - started in 2005
22LISA ver. 2.1
- AspectLISA
- WebLISA
- http//www.cs.feri.uni-mb.si/
- VisualLISA
23LISA ver. 2.1
- http//marcel.uni-mb.si/lisa
- marjan.mernik_at_uni-mb.si
- mernik_at_cis.uab.edu