IO refactor

8 views
Skip to first unread message

Aleks Kissinger

unread,
Mar 26, 2014, 7:44:38 AM3/26/14
to quant...@googlegroups.com
I've updated and simplified the way IO works. Graphs/rules/rulesets
now carry their own annotations (which are now fixed to be Json.jobj),
so the old annotation and annotation I/O structures are no longer
necessary. These were introduced to reduce some (negligible) overhead
when working with graphs and to add some flexibility to work with
multiple file formats (namely XML, which has now been scrapped).

The new IO structures are lumped in to GRAPHICAL_THEORY, which now
makes sense as they are much simpler. Also, a single structure has
both input and output functions, e.g.

Theory.GraphJSON.input
Theory.GraphJSON.output

As a result, the GraphicalTheory functor now depends on IO code, so
this introduces a (minor) change in how theories should be defined.
They should now contain three files:

theory_name/data.ML --- implement GRAPH_DATA
theory_name/io.ML --- implement GRAPH_COMPONENT_DATA_IO
theory_name/theory.ML --- invoke GraphicalTheory functor

I've already updated all the theories in (integration), but quanto
"consumers" (i.e. Gudmund & co) should have a look at the new format
if they are intending to pull a later version of quanto.


a
Reply all
Reply to author
Forward
0 new messages