gleiss/saturation-visualization

Refactor get_layout

Closed this issue · 0 comments

We use different visual representations for different nodes, e.g. for hidden nodes, nodes from preprocessing, theory axioms, ...

It would be good if we have an enum of all the possible representations (hidden, preprocessing, theoryAxiom, passive, active, maybe other stuff in the future).

We then can refactor the main functionality of get_layout into two sub-methods:

  • computeRepresentation(node, history_state), which returns for each node the appropriate representation
  • formatNode(node, representation) / formatEdge(node, representation), which returns the json-encoding for a node and a given representation