Class DomconOzPluggingOutputCodec

java.lang.Object
de.saar.chorus.domgraph.codec.OutputCodec
de.saar.chorus.domgraph.codec.MultiOutputCodec
de.saar.chorus.domgraph.codec.plugging.DomconOzPluggingOutputCodec

public class DomconOzPluggingOutputCodec extends MultiOutputCodec
An output codec for pluggings in Oz syntax. This codec will print an Oz list containing a term plug(x y) for each dominance edge (x,y) in the solved form.

Notice that even if the dominance graph was obtained by applying a node substitution to the original graph, this output codec will not represent this substitution in its output. It is meant to output graphs in solved form and with the empty substitution.

An example output looks as follows:
[plug(x y) plug(u v)]

Author:
Alexander Koller
  • Constructor Details

    • DomconOzPluggingOutputCodec

      public DomconOzPluggingOutputCodec()
  • Method Details

    • encode

      public void encode(DomGraph graph, NodeLabels labels, Writer writer) throws IOException, MalformedDomgraphException
      Description copied from class: OutputCodec
      Encodes a dominance graph into a string representation for this output codec. The dominance graph is defined by the arguments graph and labels. The USR is written to the writer.

      Specified by:
      encode in class OutputCodec
      Parameters:
      graph - the dominance graph
      labels - the node labels for this dominance graph
      writer - the writer to which the encoded USR will be written
      Throws:
      IOException - if an I/O error occurred while writing to the writer
      MalformedDomgraphException - if the graph cannot be encoded by this codec