discipl / flinteditor-mps

GNU General Public License v3.0
2 stars 3 forks source link

Outline RDF import-export #200

Closed bretelerjmw closed 2 years ago

bretelerjmw commented 2 years ago
label:documentation
label:ready

Introduction

We plan to make the FLINT-MPS IDE compatible with the knowledge models for sources and Flint that we are currently developing. This entails supporting RDF import of sources and interpretations, and export of (at least) the interpretations in FLINT-MPS.

We want to store the ideas for the technical implementation of this feature for future work.

Task breakdown

TristanAlbers commented 2 years ago

Which areas of the codebase are affected and why

Which major new functions need to be added

Open questions / things that might turn out to be very difficult

cblazo commented 2 years ago

@TristanAlbers Thank you. I understand the gist of it, could you elaborate a bit more on the new fuctions and how the FlintParser codebase would change?

TristanAlbers commented 2 years ago

@cblazo Below you can find a more comprehensive outline of the changes.

List of effected areas in the codebase

Which major new functions need to be added

FlintParser

The FlintParser reads the JSON and parses it into Java classes. These Java classes contain a certain mapping (Act/Fact/Duty) which are then passed to the IDE. The IDE parses these Java classes into nodes and stores them inside a model resulting in an editable Flintmodel.

Given the RDF functionality the JSON parsing is (probably) no longer needed, resulting in a refactor of everything related to importing. This means everything regarding reading JSON and parsing it into Java classes needs to be coded again. Main functionalities:

After this it is possible the IDE parsing of the Java classes into nodes needs to be updated/changed unless the Java classes stay the same. If they stay the same the mapping of the IDE parsing would still work.

Generators

Generators in MPS are used to map nodes to a specific output. The nodes are currently mapped to a JSON format which is then exported to a file. Given the RDF funtionality this mapping won't hold, meaning new mappings need to be created for everything that is exported to a file (In practice every single node in the project). These mappings would need to comply to a certain RDF format provided by the team. Main functionalities:

Research / Open questions

Currently the JSON mapping in the Generators is created using a dependency from mbeddr. This dependency makes it possible to write a JSON mapping and export it. Since we have no experience in making a RDF mapping this needs to be researched. Not only how to define the mapping but also how to include RDF defined links into the mapping. Furthermore since RDF is a different format than JSON research needs to be done about how to import the RDF data and parse it into Java classes which can be parsed by the IDE. Main research points:

cblazo commented 2 years ago

Thanks, Tristan. @bretelerjmw you can close this issue.