Examples of highLevelCore()


Examples of edu.mit.csail.sdg.alloy4compiler.translator.A4Solution.highLevelCore()

        String corefilename="", formulafilename="";
        if (originalFormula.length()>0 && tempfile!=null) {
            formulafilename=tempfile+".java";
            try { Util.writeAll(formulafilename, originalFormula); formulafilename="CNF: "+formulafilename; } catch(Throwable ex) { formulafilename=""; }
        }
        Pair<Set<Pos>,Set<Pos>> core = sol.highLevelCore();
        if ((core.a.size()>0 || core.b.size()>0) && tempfile!=null) {
            corefilename=tempfile+".core";
            OutputStream fs=null;
            ObjectOutputStream os=null;
            try {
View Full Code Here

Examples of edu.mit.csail.sdg.alloy4compiler.translator.A4Solution.highLevelCore()

                rep.tempfile=tempCNF;
                cb(out, "bold", "Executing \""+cmd+"\"\n");
                A4Solution ai=TranslateAlloyToKodkod.execute_commandFromBook(rep, world.getAllReachableSigs(), cmd, options);
                if (ai==null) result.add(null);
                else if (ai.satisfiable()) result.add(tempXML);
                else if (ai.highLevelCore().a.size()>0) result.add(tempCNF+".core");
                else result.add("");
            }
            (new File(tempdir)).delete(); // In case it was UNSAT, or canceled...
            if (result.size()>1) {
                rep.cb("bold", "" + result.size() + " commands were executed. The results are:\n");
View Full Code Here

Examples of kodkod.engine.Proof.highLevelCore()

           try {
              lCore = new LinkedHashSet<Node>();
              Proof p = sol.proof();
              if (sol.outcome()==UNSATISFIABLE) {
                 // only perform the minimization if it was UNSATISFIABLE, rather than TRIVIALLY_UNSATISFIABLE
                 int i = p.highLevelCore().size();
                 rep.minimizing(cmd, i);
                 if (opt.coreMinimization==0) try { p.minimize(new RCEStrategy(p.log())); } catch(Throwable ex) {}
                 if (opt.coreMinimization==1) try { p.minimize(new HybridStrategy(p.log())); } catch(Throwable ex) {}
                 rep.minimized(cmd, i, p.highLevelCore().size());
              }
View Full Code Here

Examples of kodkod.engine.Proof.highLevelCore()

                 // only perform the minimization if it was UNSATISFIABLE, rather than TRIVIALLY_UNSATISFIABLE
                 int i = p.highLevelCore().size();
                 rep.minimizing(cmd, i);
                 if (opt.coreMinimization==0) try { p.minimize(new RCEStrategy(p.log())); } catch(Throwable ex) {}
                 if (opt.coreMinimization==1) try { p.minimize(new HybridStrategy(p.log())); } catch(Throwable ex) {}
                 rep.minimized(cmd, i, p.highLevelCore().size());
              }
              for(Iterator<TranslationRecord> it=p.core(); it.hasNext();) {
                 Object n=it.next().node();
                 if (n instanceof Formula) lCore.add((Formula)n);
              }
View Full Code Here

Examples of kodkod.engine.Proof.highLevelCore()

              }
              for(Iterator<TranslationRecord> it=p.core(); it.hasNext();) {
                 Object n=it.next().node();
                 if (n instanceof Formula) lCore.add((Formula)n);
              }
              Map<Formula,Node> map = p.highLevelCore();
              hCore = new LinkedHashSet<Node>(map.keySet());
              hCore.addAll(map.values());
           } catch(Throwable ex) {
              lCore = hCore = null;
           }
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.