Package org.jakstab.analysis.procedures

Examples of org.jakstab.analysis.procedures.ProcedureAnalysis


      // If procedure abstraction is active, detect procedures now
      if (cfr.isCompleted() && Options.procedureAbstraction.getValue() == 2) {
        cfr = null;
        reached = null;
        ProcedureAnalysis procedureAnalysis = new ProcedureAnalysis();   
        CPAAlgorithm cpaAlg = CPAAlgorithm.createForwardAlgorithm(program, procedureAnalysis);
        runAlgorithm(cpaAlg);
        reached = cpaAlg.getReachedStates().select(1);
        Set<Location> procedures = procedureAnalysis.getCallees();

        SetMultimap<Location, Location> callGraph = HashMultimap.create();

        // Procedure analysis and thus this callgraph only works with --procedures 2
        // A broken callgraph does not affect the safety checks, though, as all
        // procedures are checked without any interprocedural abstraction anyway
        for (Pair<Location,Location> callSite : procedureAnalysis.getCallSites()) {
          ProcedureState procedureState = (ProcedureState)Lattices.joinAll(reached.where(callSite.getLeft()));
          for (Location procedure : procedureState.getProcedureEntries()) {
            callGraph.put(procedure, callSite.getRight());
          }
        }
View Full Code Here

TOP

Related Classes of org.jakstab.analysis.procedures.ProcedureAnalysis

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.