The Tunes metatranslator subproject
What is a meta-translator ?
Languages
(Computer) concepts are few; (computer) languages are many
(not to talk about dialects).
Every language has its own expressiveness,
with specificities that may have no equivalent in some other languages,
and defects, that make it difficult to say things
when other languages make it easy.
Though it is obvious that some languages are significantly
more expressive than others in many to all interesting domains,
there is no maximally expressive language is known to date.
Even when there was, it wouldn't be universal, at least at first,
and there would always be dialects, and old languages,
specialized languages and jargon.
Because one must be able to deal with all those languages,
and cannot choose what language the person opposite can use,
it is essential to be able to use several languages,
yet manipulate the "same" objects.
Translation
To translate from one language into another is to understand the
explicit (=structural,clear-cut,obvious)
and implicit (=background,nuances,ambiguities)
meanings of texts written (or spoken) in the first language,
and render them back as efficiently as possible in the other one,
with as few information creation or loss as possible,
and with proper translator's notes when needed.
It is much more than an "interface" between languages,
which would be just some way to cross-quote sentences
from one language into another,
though such an interface is useful for the translation.
Meta-translation
This project will try to provide a meta-translator, that is, some
piece of software that allows design of translators between languages of
the highest level of abstraction. The meta-translator project will also
deal with program manipulators, which are a generalization of translators,
that go from one language to itself, with irreversible or undeterministic
changes in the context or meta-context.
What to translate ?
The meta-translator will be used to compile the HLL into the LLL, to
translate any language (particularly widely used languages like C or LISP)
into our HLL,
and perhaps even to translate
subsets of human "natural" languages into computer languages or other
human languages.
Nota bene
Please always do remember that in an automatic translator,
like much any computer software or hardware, or human work,
it's the humans who wrote the translator who are doing the work,
so what an automatic translator can do is exactly what humans can do,
not more, not less.
And because one can't predict the future,
you can't expect a human who doesn't see the actual text to translate
to have the same insight as the one who does,
which is why any such software, like most software,
should allow the one who does to incrementally
(and not only interactively)
give this insight to the program
in forms of hints, extensions, and any kind of modifications needed.
Examples
see the
Sieve of Eratosthene for examples.
.....
Object-Oriented and Functional Programming
-
"Object-Oriented Programming"
and "Functional Programming"
are currently dominant programming
"Paradigms".
OOP is very faddy, and most people use it without really understanding
what it is about; confusion is king in the OOP world.
FP, though it is not free from fads, is a much more seriously studied
and understood paradigm.
-
OOP and FP can be typed, which corresponds to OO classes and
functional types, or there may be no differentiation of types between
objects (besides their observational behavior)
(see SELF
and LISP).
-
In OOP, you send messages....
Note that in both cases, computations can be pure or impure (with or
without side-effects).
-
In advanced OOP, methods are dispatched not only according to
their first arguments, but to all their arguments. Likely, in advanced
FP, functions take more than one argument, and are dispatched according
to all these.
To Do on this page
Expand on meta-translation.
Give a pointer to the proper entries in the Review Subproject
give examples of automatic translation of programs.
in particular,
show well-known isomorphisms between programming paradigms, such as
- functional programs/logical proofs (Curry-Howard),
- side-effect programs/functional programs (continuation passing),
- lazy-evaluation/strict evaluation,
- data-stream/code-stream processing,
- factored/inlined code,
- parallel/sequential programming,
- mathematical isomorphisms,
- static/dynamic resource allocation,
- etc.
Back to the Tunes
HLL subproject.
Down into the
C translator subproject.
Subproject maintainer:
Faré
-- rideau@clipper.ens.fr