src/HOL/Modelcheck/mucke_oracle.ML
changeset 7305 dad3b686941c
parent 7295 fe09a0c5cebe
child 14818 ad83019a66a4
equal deleted inserted replaced
7304:94c6f8f07631 7305:dad3b686941c
   498     val mucke =
   498     val mucke =
   499       if mucke_home = "" then error "Environment variable MUCKE_HOME not set"
   499       if mucke_home = "" then error "Environment variable MUCKE_HOME not set"
   500       else mucke_home ^ "/mucke";
   500       else mucke_home ^ "/mucke";
   501     val mucke_input_file = File.tmp_path (Path.basic "tmp.mu");
   501     val mucke_input_file = File.tmp_path (Path.basic "tmp.mu");
   502     val _ = File.write mucke_input_file s;
   502     val _ = File.write mucke_input_file s;
   503     val result = execute (mucke ^ " -nb " ^ (File.sysify_path mucke_input_file));
   503     val result = execute (mucke ^ " -nb -res " ^ (File.sysify_path mucke_input_file));
   504   in
   504   in
   505     if not (!trace_mc) then (File.rm mucke_input_file) else (); 
   505     if not (!trace_mc) then (File.rm mucke_input_file) else (); 
   506     result
   506     result
   507   end;
   507   end;
   508 
   508 
   559 fun extract_result goal answer =
   559 fun extract_result goal answer =
   560   let 
   560   let 
   561     val search_text_true = "istrue===";
   561     val search_text_true = "istrue===";
   562     val short_answer = delete_blanks_string answer;
   562     val short_answer = delete_blanks_string answer;
   563     val answer_with_info_lines = short_answer string_contains search_text_true;
   563     val answer_with_info_lines = short_answer string_contains search_text_true;
   564     val general_answer = short_answer string_at_post "true" 
   564     (* val general_answer = short_answer string_at_post "true" *) 
   565   in
   565   in
   566     (answer_with_info_lines) orelse (general_answer)
   566     (answer_with_info_lines) (* orelse (general_answer) *)
   567   end;
   567   end;
   568 
   568 
   569 end; 
   569 end; 
   570 
   570 
   571 (**************************************************************)
   571 (**************************************************************)