====== Kmelia Data Libraries ======
A Kmelia library includes
* [[kmelia:types:start|type definitions]] (predefined abstract data types or user-defined)
* [[kmelia:types:adt|functions]] definitions
* constants TODO to implement
A library is a directory that includes the above elements.
A library can be included in the scope of a component type definition with the ''USES'' clause.
USES {lib1, lib2...}
For each library name a directory is looked up in the default library location (''/KmlLibs'') and then in the current specification directory.
===== Type Description File =====
see the default "/KmlLibs/DEFAULT/types.txt"
the default types are implemented in the Java language by the Java class associated to the ''@classname'' expression.
KMLTYPE @ costo.graph.types.CostoInteger Integer::Integer
KMLTYPE @ costo.graph.types.CostoBoolean Boolean::Boolean
KMLTYPE @ costo.graph.types.CostoString String::String
KMLTYPE @ costo.graph.types.CostoChar Char::Char
KMLTYPE @ costo.graph.types.CostoVoid Void::Void
KMLTYPE @ costo.graph.types.AnyType ANYTYPE::ANYTYPE
KMLTYPE @ costo.graph.types.SameType LIKE::LIKE
=== Example of type creation ===
KMLTYPE Point:: struct {x:Integer; y:Integer; z:Integer}
===== Function Description File =====
see"/KmlLibs/DEFAULT/functions.txt"
examples
FUNCTION display : String -> Void .
FUNCTION union : setOf LIKE; setOf LIKE ->setOf LIKE .
FUNCTION count : setOf LIKE;LIKE ->Integer .