QVTO

1 program Added 2026-03-17T10:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: QVT-O, QVT Operational, QVT Operational Mappings
Provenance: commit 046a7c2b87 · authored 2026-03-17T03:18:55+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

JX (0.16)ROSCOE (0.15)kOS (0.15)Ratfor (0.15)Ratfiv (0.14)

LLM-contributed programs

UML Class Model to Relational Database Transformation

Provenance: commit 046a7c2b87 · authored 2026-03-17T03:18:55+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.qvto · added: 2026-03-17T10:00:00Z
-- QVT Operational (QVTO) transformation: UML Classes to Relational Tables
-- Classic UML2RDBMS example from the OMG QVT specification

transformation UML2RDBMS(in uml : UML, out rdb : RDB);

-- Map a persistent UML Class to a relational Table
mapping UML::Class::class2table() : RDB::Table
    when { self.isPersistent = true }
{
    name    := self.name;
    columns += self.attribute->map attribute2column();
    key     := self.attribute->select(a | a.isId)->map attribute2column();
}

-- Map a UML Attribute to a relational Column
mapping UML::Attribute::attribute2column() : RDB::Column {
    name := self.name;
    type := self.type.name;
}

-- Map a UML Association to a foreign-key Column
mapping UML::Association::assoc2foreignKey() : RDB::Column {
    name := self.source.name.concat("_fk");
    type := "INTEGER";
}

-- Main entry point: transform all persistent classes
main() {
    uml.objectsOfType(UML::Class)->map class2table();
}

Contribute — propose a file extension

Tell us where to find evidence about QVTO (mapped to pl/qvto). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/QVTO/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Quylthulg Qwerty →