WARNING: Compilation error, verify your source file

"; die("Please click 'back' on your browser."); } } function show_methods($list,$context,$file_name) { $acm=substr_count($list,'main([Ljava/lang/String;)V'); $acm_cmd=substr_count($list,'commandAction(Ljavax/microedition/lcdui/Command;Ljavax/microedition/lcdui/Displayable;)V'); if(substr_count($list,',')>0) { $method_signature=explode(',',$list); }else { $method_signature=explode(" ",$list); } $limit=count($method_signature); if ($limit>1) { $limit=$limit-1; } if ($acm == 1 || $acm_cmd == 1) { // there is a main or cmdAction for($i=0; $i < $limit; $i ++) { // bubble if(substr_count($method_signature[$i],'main([Ljava/lang/String;)V')==1 || substr_count($method_signature[$i],'commandAction(Ljavax/microedition/lcdui/Command;Ljavax/microedition/lcdui/Displayable;)V')==1) { $aux=$method_signature[0]; $method_signature[0]=$method_signature[$i]; $method_signature[$i]=$aux; } } if (substr_count($file_name,'x10') != 1){ ?> or Select All "; } echo "
"; for($i=0; $i < $limit; $i ++) { $method_sign=htmlentities($method_signature[$i]); if($i==0) { //if(substr_count($method_sign,'main([Ljava/lang/String;)V')==1 || substr_count($method_sign,'commandAction(Ljavax/microedition/lcdui/Command;Ljavax/microedition/lcdui/Displayable;)V')==1){ //echo " $method_signature[$i]"."
"; echo " $method_signature[$i]"."
"; } else { echo " $method_signature[$i] "."
"; } } if($context!="") { $size=strlen($context); echo "
Context Info (Classes)
"; } // else { // echo "
Context Info (Classes)
"; // } }else { // not main if (substr_count($file_name,'x10') != 1){ ?> or Select All "; } echo "
"; for($i=0; $i < $limit; $i ++) { $method_sign=htmlentities($method_signature[$i]); if($i==0) { // echo " $method_signature[$i] "."
"; echo " $method_signature[$i] "."
"; }else { // echo " $method_signature[$i] "."
"; echo " $method_signature[$i]"."
"; } } if($context!="") { $size=strlen($context); echo "
Context Info (Classes)
"; } // else { // echo "
Context Info (Classes)
"; // } } } //function parse_dot_seetings($examples,$filename){ function parse_dot_seetings($path,$filename) { $define_settings=array('-m','-c','cost_model','-u','compute_asymptotic_ub','gc_model','-p'); $flags=array(); $values_settings=array(); //$path_to_settings_file=$examples."/".$filename.".settings"; $path_to_settings_file=$path."/".$filename.".settings"; if (file_exists($path_to_settings_file)) { $values=file_get_contents($path_to_settings_file); $settings=explode(PHP_EOL,chop($values)); for($i=0;$i',$file_contents);// for($j=0; $j until //for ($i=0; $i=1){ /// looking if the flag exsits in option
  • if(substr_count($each_option_web[$j],$flags[$i])>=1) { /// looking if the flag exsits in option
  • $eachline_opt=explode(' $restline[0]=array_pop($new_value); ///
    } $tmp[0]= implode(" ",$new_value); array_splice($eachline_opt, 1,1, $tmp); $tmp[1]=implode(" ",$old_default); array_splice($eachline_opt, $pos,1, $tmp); array_splice($eachline_opt, $pos,1); } //if($i<=count($values_flags)){$each_option_web[$j]=implode('", $each_option_web); $remove1=str_replace('
  • ', '', $implode); $remove2=str_replace('', '', $remove2); $remove4=str_replace('
  • ', '', $remove3); $remove5=str_replace('', '', $remove4); $remove6=str_replace(' > ',' > ',$remove5); echo $remove6; echo ""; } ?> COSt Termination Analyzer for Java Bytecode
    COSTA: COSt and Termination Analyzer for Java Bytecode
        
        package x10;
    
    
    public class KMeansDist {
    
        //static int DIM=2;
        //static int CLUSTERS=4;
        static final int POINTS=2000;
        static final int ITERATIONS=50;
    
        //static int points_region[][] = new int[POINTS-1][DIM-1];
    
        public static void main(String args[]) {
    	
    	int PLACES=args.length; //DZ: this is supposed to be static
    				//(as the number of processors)
    				//through the execution; anyway, we
    				//leave it as a parameter
    
    
            //val rnd = PlaceLocalHandle.make[Random](Dist.makeUnique(), () => new Random(0));
            //val local_curr_clusters = PlaceLocalHandle.make[Rail[Float]](Dist.makeUnique(), 
    	//() => Rail.make[Float](CLUSTERS*DIM, (i:Int) => 0 as Float));
    	//val local_new_clusters = PlaceLocalHandle.make[Rail[Float]](Dist.makeUnique(),
    	//() =>  Rail.make[Float](CLUSTERS*DIM, (i:Int) => 0 as Float));
            //val local_cluster_counts = PlaceLocalHandle.make[Rail[Int]](Dist.makeUnique(), 
            //                                                            ()=> Rail.make[Int](CLUSTERS, (i:Int) => 0));
    	//int local_cluster_counts[];
    
            //val points_dist = Dist.makeBlock(points_region, 0);
            //val points = DistArray.make[Float](points_dist, (p:Point)=>rnd().nextFloat());
    
            //val central_clusters = Rail.make[Float](CLUSTERS*DIM, (i:Int) => {
    	//val p = Point.make([i/DIM, i%DIM]);
    	//return at (points_dist(p)) points(p);
    	//});
    
            //val central_cluster_counts = Rail.make[Int](CLUSTERS, (i:Int) => 0); //DZ
    	//int central_cluster_counts[] = new int[CLUSTERS];
    
            for (int i=1; i<=ITERATIONS; i++) {
    
                //int central_clusters_copy[];
    	    //for (int j=0; j<CLUSTERS; j++) { central_clusters_copy[j] = central_cluster_counts[j]; };
    
                //for (int j=0; j<CLUSTERS; j++) { local_cluster_counts[][j] = 0; }
    
                Conc.finish_begin();
    	    main_1(PLACES);
    	    Conc.finish_end();
    
    	    Conc.finish_begin();
    	    main_2();
    	    Conc.finish_end();
    
    
                //for (var j:Int=0 ; j<DIM*CLUSTERS ; ++j) {
    	    //central_clusters(j) = 0;
    	    //}
    
                //for (var j:Int=0 ; j<CLUSTERS ; ++j) {
    	    //central_cluster_counts(j) = 0;
    	    //}
    
    	    Conc.finish_begin();
    	    main_3(PLACES);
    	    Conc.finish_end();
    
                //for (var k:Int=0 ; k<CLUSTERS ; ++k) { 
    	    //for (var d:Int=0 ; d<DIM ; ++d) { 
    	    //central_clusters(k*DIM+d) /= central_cluster_counts(k);
    	    //}
                //}
    
                // TEST FOR CONVERGENCE
                //var b:Boolean = true;
                //for (var j:Int=0 ; j<CLUSTERS*DIM ; ++j) { 
    	    //   if (Math.abs(central_clusters_copy(j)-central_clusters(j))>0.0001) {
                //        b = false;
                //        break;
                //    }
                //}
                //if (b) break;
    
            }
        }
        
        public static void main_1(int PLACES) {
    	// reset state
    	for (int d=0; d<PLACES; d++) {
    	    Conc.async_begin(); // async(d) {
    	    main_11();
    	    Conc.async_end();
    	}
        }
        
        public static void main_11() {
    	//for (int j=0 ; j<DIM*CLUSTERS; j++) {
    	//local_curr_clusters[][j] = central_clusters_copy[j];
    	//local_new_clusters[][j] = 0;
    	//}
    	//for (int j=0 ; j<CLUSTERS; j++) {
    	//local_cluster_counts[][j] = 0;
    	//}
        }
        
        public static void main_2() {
    	for (int p_=0; p_<POINTS; p_++) {
    	    int p = p_;
    	    Conc.async_begin();
    	    main_21();
    	    Conc.async_end();
    	}
        }
        
        public static void main_21() {
    	//async (points_dist(p,0)) {
    	//var closest:Int = -1;
    	//var closest_dist:Float = Float.MAX_VALUE;
    	//for (var k:Int=0 ; k<CLUSTERS ; ++k) { 
    	//var dist : Float = 0;
    	//for (var d:Int=0 ; d<DIM ; ++d) { 
    	//val tmp = points(Point.make(p,d)) - local_curr_clusters()(k*DIM+d);
    	//dist += tmp * tmp;
    	//}
    	//if (dist < closest_dist) {
    	//closest_dist = dist;
    	//closest = k;
    	//}
    	//}
    	//for (var d:Int=0 ; d<DIM ; ++d) { 
    	//local_new_clusters()(closest*DIM+d) += points(Point.make(p,d));
    	//}
    	//local_cluster_counts()(closest)++;
    	//}
        }
        
        public static void main_3(int PLACES) {
    	for (int d=0; d<PLACES; d++) {
    	    Conc.async_begin();
    	    main_31();
    	    Conc.async_end();
    	}
        }
        
        public static void main_31() {
    	//val local_new_clusters_copy =
    	//ValRail.make(CLUSTERS*DIM, (i:Int) => local_new_clusters()(i));
    	//val local_cluster_counts_copy =
    	//ValRail.make(CLUSTERS, (i:Int) => local_cluster_counts()(i));
    	//at (central_clusters) atomic {
    	//for (var j:Int=0 ; j<DIM*CLUSTERS ; ++j) {
    	//central_clusters(j) += local_new_clusters()(j);
    	//}
    	//for (var j:Int=0 ; j<CLUSTERS ; ++j) {
    	//central_cluster_counts(j) += local_cluster_counts()(j);
    	//}
    	//}
        }
        
    
    }