Subject
Making languages bear-able:
For I am a bear of very little brain and long
words confuse me. [Milne 1926]
The premise of this subject is that computers should adapt to the ways of people, and
not the other
way around.
One method for doing this is a domain-specific langauge (DSL).
A DSL is a very high-level language that a user can learn and use
in less
than a day.
Such productivity can only be achieved by tailoring the language to
the special needs and skills of a particular class of users in a particular domain.
In a DSL-based software development process, the analyst:
- Identifies the users and their tasks;
- Identifies the common idioms used by those users;
- Invents a declarative language to handle those idioms;
- Generates sample sentences in that language;
- Shows those sentences to the user and trains them how to write their own.
That is, instead of the analyst writing the application, the analysts writes tools that let a user community write and maintain their own knowledge.
The benefits of DSL (productivity, explanatory, ownership by the users)
can be out-weighed by the cost of building the DSL. Traditional methods for DSL construction include writing interpreters of some domain-specific syntax into some procedural language (e.g. AWK, Perl, Java, etc). This subject offers a more general approach in which:
- The DSL syntax is expressed as logical horn clauses using Prolog's infix operator
notation.
- Interpreters and meta-interpreters are used to execute that syntax.
- The DSL system is explored using stochastic abduction (for what-if queries) and
treatment learners (to find controllers for that system).
In this subject,
students will:
- Study all the terms shown above in italics
- Examine case studies of successful DSLs.
- Build their own DSL, optimize it with a compiler, study it using
abduction, then learn controllers for their DSL system.