XMF and XMF-Mosaic
XMF is a programming language for Language Oriented Programming and
developing Domain Specific Languages. XMF is a fully featured language
that can be used to process XML, interface to Java (including EMF) and
connect to input/output data streams. XMF is a very high-level OO
language and supports a number of features that abstract away from
implementation details including: dynamic typing; dynamically loaded
definitions; sets and sequences; first-class functions; continuations;
pattern matching. XMF provides first-class grammars that are used to
define new language features which become immediately integrated into
the core language. XMF is based on a small VM written in Java. Most of
XMF is written in XMF.
XMF is available open-source under the Eclipse Public
License. XMF can be
following this link. The system is distributed as 4 eclipse
projects including all the source code. Uner normal use you should only
need com.ceteva.xmf.system. To run the language interpreter:
> cd xmf-src
> bin/compiler .
Sun May 01
11:37:38 BST 2011 (Built on Sun May 01 10:30:26 BST 2011)
Type ?h for
top level help.
 XMF> ?h
Level Loop Help
The XMF top
level loop is a command interpreter that reads
typed at a console, evaluates the commands and then
result. The interpreter understands any valid XMF syntax
XOCL) including language extensions that have been defined
and accessed using '@'. When you type these commands
terminate them with a ';' before pressing return (note that
';' is the
command terminator and commands may span several lines).
Note if a
single quote (') is used in a command it should be part of
of a pair. If
not, input will be halted until another one is entered.
interpreter has its own state: it remembers the most
evaluated values and the last error that occurred.
v0, v1 and v2 are the last three values produced
by the top
level. These variables can be useful when you want to
or compute a value and then use it in a subsequent
Errors may occur in commands typed at the top level.
When an error
occurs, an exception is thrown and caught by the top
The loop then prints out error diagnostics. The value
variable xx is the most recently raised exception.
Console uses the Escape key as an interrupt. This can be
useful if you
have caused XMF to enter an infinite loop or to start
calculation that you wish to terminate. Interrupts are
XMF on the next instruction cycle, the interrupt will
interpreter has its own command language.
level command starts with a '?'. Top level commands must
occur on a
single line and are terminated by return rather than ';'.
the syntax of patterns for ?a.
elements apropos the pattern.
?c and ?l.
most recently compiled file.
[+|-] <PATH>* Import(+) or remove(-) a
name space at the top level.
most recently loaded binary.
(b|l|d|bl) [<Dir>] Build, load or delete manifest entries.
<Dir> <File> Write boot file based
on manifest to file.
<Dir> (s|b) Touch binaries or
the current options.
saveSource bool Toggle compiler saving source code.
sourcePos bool Toggle compiler saving source
localNames bool Toggle compiler saving local names.
checkTypes bool Toggle compiler type checking code.
current pretty-printing settings.
(d|l,p,r) <INT> Set the pretty print depth, length, page or
(on|off) Toggle pretty
printing at the top level.
most recent exception in full.
dos shell. Enter exit to return.
system image in the file.
<FILE> <FILE> Saves an image that
boots from the second file.
last write date of the file.
 XMF> ?x
XMF-Mosaic is an Eclipse-based IDE for developing XMF applications. On
first inspection, XMF-Mosaic provides similar functionality to most
modelling tools that offer information modelling based on class
diagrams. However, because XMF-Mosaic is based on XMF, models can be
made executable through the XMF language. Furthermore, XMF-Mosaic
provides an open-architecture since it is all written in XMF on top of
a small collection of GEF primitives. Virtually all aspects of the
modelling IDE can be redefined and extended by loading new XMF code.
Documentation for XMF-Mosaic can be found here.