src/HOL/Tools/ATP/watcher.ML
changeset 17150 ce2a1aeb42aa
parent 17121 4c225f640b89
child 17216 df66d8feec63
equal deleted inserted replaced
17149:e2b19c92ef51 17150:ce2a1aeb42aa
   272 
   272 
   273     (*** only include problem and clasimp for the moment, not sure how to refer to ***)
   273     (*** only include problem and clasimp for the moment, not sure how to refer to ***)
   274     (*** hyps/local axioms just now                                                ***)
   274     (*** hyps/local axioms just now                                                ***)
   275     val whole_prob_file = Unix.execute("/bin/cat", [clasimpfile,(*axfile, hypsfile,*)probfile,  ">", (File.platform_path wholefile)])
   275     val whole_prob_file = Unix.execute("/bin/cat", [clasimpfile,(*axfile, hypsfile,*)probfile,  ">", (File.platform_path wholefile)])
   276     (*** check if the directory exists and, if not, create it***)
   276     (*** check if the directory exists and, if not, create it***)
   277     val _ = 
   277    (* val _ = 
   278 	if !SpassComm.spass
   278 	if !SpassComm.spass
   279 	then 
   279 	then 
   280 	    if File.exists dfg_dir then warning("dfg dir exists")
   280 	    if File.exists dfg_dir then warning("dfg dir exists")
   281 	    else File.mkdir dfg_dir
   281 	    else File.mkdir dfg_dir
   282 	else
   282 	else
   290     val newfile =   if !SpassComm.spass 
   290     val newfile =   if !SpassComm.spass 
   291 		    then 
   291 		    then 
   292 			    dfg_path^"/ax_prob"^"_"^(probID)^".dfg" 
   292 			    dfg_path^"/ax_prob"^"_"^(probID)^".dfg" 
   293 
   293 
   294 		    else
   294 		    else
   295 			    (File.platform_path wholefile)
   295 			    (File.platform_path wholefile)*)
       
   296 
       
   297     (* if using spass prob_n already contains whole DFG file, otherwise need to mash axioms*)
       
   298     (* from clasimpset onto problem file *)
       
   299     val newfile =   if !SpassComm.spass 
       
   300 		    then 
       
   301 			 probfile
       
   302                     else 
       
   303 			(File.platform_path wholefile)
       
   304 
   296     val _ =  File.append (File.tmp_path (Path.basic"thmstring_in_watcher"))
   305     val _ =  File.append (File.tmp_path (Path.basic"thmstring_in_watcher"))
   297 	       (thmstring^"\n goals_watched"^(string_of_int(!goals_being_watched))^newfile^"\n")
   306 	       (thmstring^"\n goals_watched"^(string_of_int(!goals_being_watched))^newfile^"\n")
   298   in
   307   in
   299     (prover,thmstring,goalstring, proverCmd, settings,newfile)	
   308     (prover,thmstring,goalstring, proverCmd, settings,newfile)	
   300   end;
   309   end;
   514 			(* childCmd is the .dfg file that the problem is in *)
   523 			(* childCmd is the .dfg file that the problem is in *)
   515 			val childCmd = fst(snd (cmdchildInfo childProc))
   524 			val childCmd = fst(snd (cmdchildInfo childProc))
   516                         val _ = File.append (File.tmp_path (Path.basic "child_command")) 
   525                         val _ = File.append (File.tmp_path (Path.basic "child_command")) 
   517 			           (childCmd^"\n")
   526 			           (childCmd^"\n")
   518 			(* now get the number of the subgoal from the filename *)
   527 			(* now get the number of the subgoal from the filename *)
   519 			val sg_num = if (!SpassComm.spass )
   528 			val sg_num = (*if (!SpassComm.spass )
   520 				     then 
   529 				     then 
   521 					int_of_string(ReconOrderClauses.get_nth 5 (rev(explode childCmd)))
   530 					int_of_string(ReconOrderClauses.get_nth 5 (rev(explode childCmd)))
   522 				     else
   531 				     else*)
   523 					int_of_string(hd (rev(explode childCmd)))
   532 					int_of_string(hd (rev(explode childCmd)))
   524 
   533 
   525 			val childIncoming = pollChildInput childInput
   534 			val childIncoming = pollChildInput childInput
   526  			val _ = File.append (File.tmp_path (Path.basic "child_check_polled")) 
   535  			val _ = File.append (File.tmp_path (Path.basic "child_check_polled")) 
   527 			           ("finished polling child \n")
   536 			           ("finished polling child \n")