Package edu.mit.csail.sdg.alloy4compiler.ast

Examples of edu.mit.csail.sdg.alloy4compiler.ast.Expr.product()


    private Expr parseType(XMLNode node) throws IOException, Err {
        Expr expr = null;
        if (!node.is("types")) throw new IOException("<types>...</type> expected");
        for(XMLNode n:node) if (n.is("type")) {
            Sig sig=parseSig(n.getAttribute("ID"), 0);
            if (expr==null) expr=sig; else expr=expr.product(sig);
        }
        if (expr==null) throw new IOException("<type ID=../> expected");
        return expr;
    }
View Full Code Here


         } else {
            Expr mask = null;
            List<AlloyType> types = new ArrayList<AlloyType>(ps.size());
            for(int i=0; i<ps.size(); i++) {
               types.add(sig(ps.get(i)));
               if (mask==null) mask=ps.get(i); else mask=mask.product(ps.get(i));
            }
            AlloyRelation rel = makeRel(label, isPrivate, isMeta, types);
            Set<AlloyTuple> ts = new LinkedHashSet<AlloyTuple>();
            for(A4Tuple tp: (A4TupleSet)(sol.eval(expr.intersect(mask)))) {
               AlloyAtom[] atoms = new AlloyAtom[tp.arity()];
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.