edu.mit.csail.sdg.alloy4compiler.translator
Class A4SolutionReader

java.lang.Object
  extended by edu.mit.csail.sdg.alloy4compiler.translator.A4SolutionReader

public final class A4SolutionReader
extends java.lang.Object

This helper class contains helper routines for reading an A4Solution object from an XML file.


Method Summary
static A4Solution read(java.lang.Iterable<Sig> sigs, XMLNode xml)
          Parse the XML element into an AlloyInstance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

read

public static A4Solution read(java.lang.Iterable<Sig> sigs,
                              XMLNode xml)
                       throws Err
Parse the XML element into an AlloyInstance.

The list of sigs, if not null, will be used as the sigs (and their fields) that we expect to exist;
if there's a sig or field X in the list but not in the XML, then X's tupleset will be regarded as empty;
if there's a sig or field X in the XML but not in the list, then X (and its value in XML file) is added to the solution.

Throws:
Err