Package edu.mit.csail.sdg.alloy4compiler.sim

Examples of edu.mit.csail.sdg.alloy4compiler.sim.SimInstance


        return SimTupleset.make(list);
    }

    /** Converts an A4Solution into a SimInstance object. */
    private static SimInstance convert(Module root, A4Solution ans) throws Err {
       SimInstance ct = new SimInstance(root, ans.getBitwidth(), ans.getMaxSeq());
        for(Sig s: ans.getAllReachableSigs()) {
            if (!s.builtin) ct.init(s, convert(ans.eval(s)));
            for(Field f: s.getFields())  if (!f.definedct.init(f, convert(ans.eval(f)));
        }
        for(ExprVar a:ans.getAllAtoms())   ct.init(a, convert(ans.eval(a)));
        for(ExprVar a:ans.getAllSkolems()) ct.init(a, convert(ans.eval(a)));
        return ct;
    }
View Full Code Here

TOP

Related Classes of edu.mit.csail.sdg.alloy4compiler.sim.SimInstance

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.