src/HOL/Tools/Predicate_Compile/code_prolog.ML
changeset 51704 0b0fc7dc4ce4
parent 51314 eac4bb5adbf9
child 51709 19b47bfac6ef
equal deleted inserted replaced
51703:f2e92fc0c8aa 51704:0b0fc7dc4ce4
   789         SWI_PROLOG => ("ISABELLE_SWIPL", "\"$ISABELLE_SWIPL\" -f ")
   789         SWI_PROLOG => ("ISABELLE_SWIPL", "\"$ISABELLE_SWIPL\" -f ")
   790       | YAP => ("ISABELLE_YAP", "\"$ISABELLE_YAP\" -L "))
   790       | YAP => ("ISABELLE_YAP", "\"$ISABELLE_YAP\" -L "))
   791   in
   791   in
   792     if getenv env_var = "" then
   792     if getenv env_var = "" then
   793       (warning (env_var ^ " not set; could not execute code for " ^ string_of_system system); "")
   793       (warning (env_var ^ " not set; could not execute code for " ^ string_of_system system); "")
   794     else fst (Isabelle_System.bash_output (cmd ^ File.shell_path file))
   794     else
       
   795       (case Isabelle_System.bash_output (cmd ^ File.shell_path file) of
       
   796         (out, 0) => out
       
   797       | (_, rc) =>
       
   798           error ("Error caused by prolog system " ^ env_var ^
       
   799             ": return code " ^ string_of_int rc))
   795   end
   800   end
   796 
   801 
   797 
   802 
   798 (* parsing prolog solution *)
   803 (* parsing prolog solution *)
   799 
   804