KEML is an Eclipse EMF project meaning it consists of a set of Eclipse Plugins that create several handy editors and analyzers for KEML files. Each of these plugins forms a project of the KEML group. You are currently viewing the KEML model project. It basically holds the central definition of the KEML metamodel as an .ecore file and can be used to generate the model java classes and further projects (see Code Generation).
KEML is designed to document LLM conversations (i.e. messages) and the knowledge gained from them. It combines two well-known modelling techniques, that is sequence diagrams for the message part and argumentation graphs for the knowledge part. Both techniques have been adapted to fit the specific needs of KEML.
An in depth introduction of KEML will be available in our introductory paper - that will be published in September 2024.
This project is an Eclipse Modeling project, meaning that it should be opened with Eclipse Modeling Tools. You can add those to an existing Eclipse installation or install them from scratch. More information on this is best retrieved by the eclipse foundation.
When using this project in Eclipse, make sure that it is correctly recognized as a Modeling Project (indicated by a small M on the project icon):
- Right-click on the project and select Properties
- Choose Project Natures
- Add the Modeling Nature
- Apply and Close
Also check if the Maven nature is correctly configured. You will get class not found errors if it is not. Just adding the maven nature like the modeling nature before did not work on Eclipse 2023-12. Instead one should:
- Right-click on the project and select Configure
- Choose Convert to Maven Project
Afterwards, the project can be compiled and executed.
Based on the ecore file, you can generate code:
- for all KEML java classes (data types), stored under src-gen
- for the helper project keml.edit
- for the keml.editor
To generate code:
- Open the ecore file under model/keml.ecore/keml/keml in Eclipse Modeling Tools. This should open the graphical view you see above.
- On the graphical view right-click to open a dialogue.
- Choose the dialogue option Generate -> All to generate all relevant code of all three projects or single parts to generate just those.
If you generate "Model Code" (or "All") this will (re-)generate all code in this project's folder src-gen. This folder is deliberately not checked in, since it just holds generated code. The generated code follows the Factory Pattern: There are java interfaces for each KEML type under src-gen/keml, and Impls for the types under src-gen/keml.impl.
Since the keml edit project has some customizations, it is recommended to get it from the keml.edit repository. A later code generation does not overwrite the changes brought in by the keml.edit repository. For more details, check keml.edit's repository documentation.
To read more about working with modeling projects and code generation, we highly recommend the Eclipse tutorial on Domain Models.
The license of this project is that of the group.
