I'm very pleased to announce that Tefkat version 2.0.10.01 is now
available on the update site.
This version adds a number of new features and includes a new and
improved execution engine that handles rules with both cyclic and
non-cyclic dependencies through tracking classes. This means that the
order of rules in your transformation specification is no longer
important. It also means the engine should be much faster in cases
where it used to perform fixpoint computations.
Other new features include:
* IF-THEN-ELSE now supported on the "target-side"
- SET clauses can now contain IF-THEN-ELSE statements
- the THEN and ELSE clauses can then contain MAKE, SET, and LINKING
clauses
* Added ELSEIF for cascaded conditions
* The ELSE clause is now optional (as is the THEN clause)
* Resources are now loaded on a separate thread to avoid lock-ups
* The MAP keyword is now highlighted in the editor
* 'Anonymous variables' are now anything that starts with an
underscore (previously they could only be a single underscore)
* Stratification of rules & patterns is now checked
* Editor now warns about some forms of target-side querying (the
semantics of which are undefined)
Major bugfixes include:
* Issues with Resource loading
* backslash in a string literal can now escape itself
Example IF-THEN-ELSE usage
==========================
RULE SourceITE
WHERE
println("SourceITE") AND
y = 1 AND
IF x = 1 AND println(x)
THEN
println("xxx", x)
ENDIF AND
z = 1
;
RULE TargetITE
WHERE println("TargetITE") AND z = 1
MAKE EObject y
SET
IF x = 1 AND println(x)
THEN
MAKE println("xxx"),
EObject _e FROM f("a"),
println("aaa")
ELSE
SET TRUE
ENDIF
;
Example MAP usage
=================
// MAPs are useful when you need tables of values and don't
// want to use an extra source model
MAP foo {
11 : 12,
1 : "bar",
"abc" : "def",
321 : [1, 2, "3"]
};
RULE map_it
// The map() function does a lookup in the named map for
// the value corresponding to the supplied key
WHERE println(map("foo", 11))
AND println(map("foo", "abc"))
AND println(map("foo", 321))
;
Cheers,
michael