Class DotExporter
java.lang.Object
ca.mcscert.jpipe.visitor.AbstractModelExporter
ca.mcscert.jpipe.visitor.DotExporter
- All Implemented Interfaces:
JustificationVisitor<Void>
Serialises a single
JustificationModel to Graphviz DOT text, ready to
be compiled by dot. Both Justification and Template
produce a valid digraph; AbstractSupport nodes in templates
are rendered as dotted rectangles.
This visitor operates on one model at a time. Use SelectModel in the
compilation pipeline to extract the desired model from a Unit before
invoking this exporter.
When a model has a parent template, each ancestor is rendered in its own
labelled subgraph cluster (including AbstractSupport placeholders).
Concrete elements that override an abstract support are rendered outside the
cluster, connected to their placeholder by a dashed inv/inv arrow.
Node visual styles are defined in DotNodeStyle. Label escaping and
word-wrapping utilities live in DotLabel.
-
Field Summary
Fields inherited from class AbstractModelExporter
builder, currentModelName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexport(JustificationModel<?> model) Serialisemodelto DOT text.protected voidexportModel(JustificationModel<?> model) Performs the actual serialisation ofmodel.visit(AbstractSupport abstractSupport) visit(Conclusion conclusion) visit(SubConclusion subConclusion) Methods inherited from class AbstractModelExporter
qualify, visit, visit, visit
-
Constructor Details
-
DotExporter
public DotExporter()
-
-
Method Details
-
export
Serialisemodelto DOT text.- Parameters:
model- the justification or template to serialise.- Returns:
- DOT source text ready to be piped to
dot.
-
visit
-
visit
-
visit
-
visit
-
visit
-
exportModel
Description copied from class:AbstractModelExporterPerforms the actual serialisation ofmodel. Implementations must setAbstractModelExporter.currentModelName= model.getName()before calling any element visit methods.- Specified by:
exportModelin classAbstractModelExporter
-