edu.mit.csail.sdg.alloy4whole
Class Helper

java.lang.Object
  extended by edu.mit.csail.sdg.alloy4whole.Helper

public final class Helper
extends java.lang.Object

This class contains convenient methods for people using Alloy4 API. These methods are provided for your convenience, and any discovered bug will be fixed, but these methods are not part of the official Alloy4 API and individual methods may be removed in the future if necessary.


Method Summary
static java.util.Map<java.lang.String,Sig.PrimSig> atom2sig(A4Solution solution)
          Given an A4Solution, return a map that maps every atom to its most specific signature.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

atom2sig

public static java.util.Map<java.lang.String,Sig.PrimSig> atom2sig(A4Solution solution)
                                                            throws Err
Given an A4Solution, return a map that maps every atom to its most specific signature.

For example, suppose we have "sig Animal { }" and "sig Dog, Cat extends Animal { }". Suppose the solution says Animal={A$1, A$2, A$3, A$4} and Dog={A$1} and Cat={A$2, A$3}. This method will return a map that maps A$1 to Dog, A$2 to Cat, A$3 to Cat, and A$4 to Animal. (A$1 is both an Animal and a Dog, but Dog is a subtype of Animal, so Dog is A$1's most specific signature)

Throws:
Err