Wiki
Clone wikiinf225 / 2013 / Introduction
Software Language Engineering
What's a language? A software language? What makes it engineering?
Languages
Wikipedia says: Language is the human capacity for acquiring and using complex systems of communication, and a language is any specific example of such a system. The scientific study of language is called linguistics.
Anya's definition:
- A language is a system of communication. It carries meaning (semantics), and has abstractions that allow you to communicate usefully at different levels (i.e., more than just pointing at concrete things or showing a picture of something).
A general-purpose language will allow you to define your own abstraction (e.g., by defining a class in Java, or by defining the term 'language' in English).
Formal Languages
A formal language has a formal definition:
- Given an alphabet Sigma = {a, b, ...} (the basic letters and characters of the language)
- then Sigma* is the set of all possible strings over the alphabet,
- and L subsetof Sigma* is a language (e.g., those strings over the alphabet that are valid)
For example:
- Sigma_sheep = {"b", "æ"}
- L_sheep = {"bæ", "bææ", "bææææ", "bæbæ", "bæbæææ", and so on} = /(bæ+)*/ is the language of sheep (the thing in between the slashes is a regular expression, a simple grammar for simple languages, which we'll learn more about later).
A language is typically not defined by listing all valid strings, but rather by defining:
- the lexical syntax (giving the alphabet)
- a grammar for the sentence structure
and possibly also
- typing rules (excludes some sentences as meaningless)
- semantics (defines the meaning of sentences)
Software Languages
A software language
- is an artificial language (constructed by particular humans, not by cultural evolution)
- which is used in software development.
A language can be a software language even though it's not a programming language (it could be a specification language, for example). A natural language is not a software language, even though it's used in development.
Software languages are also formal languages, though we will only have to deal with some aspects of formal language theory.
There are many kinds of software languages:
- General-purpose programming languages; e.g., Java, Lisp, C, Python, ...
- Domain-specific languages; e.g., SQL, HTML, CSS
- Modelling and meta-modelling languages; e.g. UML, XML Schema
- Data representation; e.g., HTML, markup languages, XML, JSON
- Ontologies
- APIs? For example, Java Collections, Python standard library. Maybe – an API gives you communication, semantics and abstraction, but is typically not "stand-alone"; needs to be embedded in another language.
Engineering
Software Language Engineering means we deal with software languages in a way that is:
- systematic,
- disciplined,
- quantifiable,
- informed by science.
What's SLE really about?
What we do, research-wise:
- Development (design, implementation, testing, deployment), and
- maintenance (evolution, recovery, retirement)
of
- formal descriptions, and
- tooling
of/for software languages.
Typical SLE Activities
- Compiler construction [Wikipedia]
- Domain-specific languages [Wikipedia]
- Model-driven engineering [Wikipedia]
- Program generation [Wikipedia]
- Reverse engineering [Wikipedia]
- Reengineering, refactoring [Wikipedia]
Things to learn (maybe) in this course
- languages, grammar – syntax [Lecture 2: Syntax and Grammars]
- trees, parse-trees, abstract syntax trees
- semantics
- static semantcs / typechecking
- dynamic semantics / evaluation / compilation
- scopes, environments, parameter passing
- state; memory layout, execution model
- typing systems
- data abstraction, classes, structs
- dynamic vs static typing
- domain-specific languages
- data-flow analysis
- optimisation, slicing
- macro systems
- code generation
- intermediate languages / representations
- three-address code; trees; SSA form
- code transformation
- mapping between different abstraction levels
You should learn enough that you can get started on
- designing / evolving SLE technologies
- test and evaluate your work
- figure out what went wrong and do better next time
You won't learn:
Futher reading
- SLE conference – definition of the term software language engineering
Updated