# Tefkat

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Tefkat
> Markdown URL: https://mediated.wiki/source/Tefkat.md
> Source: https://en.wikipedia.org/wiki/Tefkat
> Source revision: 1133351084
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{Short description|Model transformation language}}
'''Tefkat''' is a [model transformation language](/source/model_transformation_language) and a model transformation engine.  The language is based on [F-logic](/source/F-logic) and the theory of stratified logic programs.  The engine is an [Eclipse](/source/Eclipse_(software)) plug-in for the [Eclipse Modeling Framework](/source/Eclipse_Modeling_Framework) (EMF).

== History ==

Tefkat was one of the sub-projects of the Pegamento project at the [Distributed Systems Technology Centre](/source/Distributed_Systems_Technology_Centre) (DSTC), Australia.  Although the project was already underway, the most active research occurred for the submission of a response to the [OMG](/source/Object_Management_Group)'s [MOF](/source/Meta-Object_Facility) 2.0 [Queries / Views / Transformations](/source/QVT) Request for Proposals.

Tefkat was open-sourced before the closure of the DSTC in June 2006.

== Brief description ==

Tefkat defines a mapping from a set of source metamodels to a set of target metamodels.  A Tefkat transformation consists of ''rules'', ''patterns'' and ''templates''.  Rules contain a ''source term'' and a ''target term''.  Patterns are simply named composite source terms, and templates are simply named composite target terms.  These elements are based on F-logic and pure logic programming, however the absence of function symbols means a significant reduction in complexity.

Tefkat has two more significant language elements: ''trackings'' and ''injections''.  Trackings allow arbitrary relationships to be preserved in a trace model.  Injections allow the identity of target objects to be specified in terms of a function symbol.  Thus injections are similar (but more powerful) to QVT's keys, which specify a target object's identity to be a function of its type and some of its properties.

The declarative semantics of a Tefkat transformation is the ''perfect'' model of traces and targets that satisfies all the rules.  A more imperative semantics of a Tefkat transformation is the ''iterated least fixed-point'' of the immediate consequence of each rule.  Due to stratification, these semantics are equivalent and unambiguous.  Tefkat does not use explicit rule-calling; all (non-abstract) rules fire independently from all others, however rules can be loosely coupled using trackings, injections, rule extension and/or rule superseding.

== Concrete syntax ==

Tefkat has an SQL-like concrete syntax designed to concisely convey the intent of each rule, pattern or template.

 RULE ClassToTable
 FORALL  Class c { name: n; }
 MAKE    Table t { name: n; }
 ;

== Compliance ==

The Tefkat language is defined in terms of (E)MOF 2.0, however the engine is implemented in terms of Ecore, the EMOF-like metametamodel at the centre of EMF.  The language is very similar to the Relations package of QVT, however it is not strictly compliant.

== See also ==

* [Model Driven Architecture](/source/Model_Driven_Architecture) (MDA): OMG's vision of MDE
* [QVT](/source/QVT): the OMG's adopted QVT specification
* [Stratification (mathematics)](/source/Stratification_(mathematics))
* [Logic programming](/source/Logic_programming)

== References ==

* Tefkat [http://tefkat.sourceforge.net project page]
* [http://sosym.dcs.kcl.ac.uk/events/mtip05/submissions/lawley_steel__practical_declarative_model_transformation_with_tefkat.pdf Practical Declarative Model Transformation with Tefkat]

Category:Specification languages

---
Adapted from the Wikipedia article [Tefkat](https://en.wikipedia.org/wiki/Tefkat) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Tefkat?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
