call_promela_parser2(MCH,PL) :-
absolute_file_name(prob_lib('.'), LibDir),
atom_concat('-Djava.library.path=', LibDir, JLibpath),
absolute_file_name(prob_lib('Promela.jar'),Jar),
once(absolute_file_name(path(java),
JavaCmd,
[access(exist),extensions(['.exe','']),solutions(all),file_errors(fail)])),
replace_windows_path_backslashes(JavaCmd,JavaCmdW),
replace_windows_path_backslashes(Jar,JarW),
replace_windows_path_backslashes(MCH,MCHW),
process_create(JavaCmdW,
%['-jar',JarW,MCHW],
[JLibpath,'-jar',JarW,'-ltl',MCHW],
[process(Java),stdout(pipe(JStdout))]),
read_all(JStdout,Text),
process_wait(Java,JExit),
(JExit=exit(0) -> true;
(name(T,Text),JExit=exit(1) ->
throw(parse_error(T));
add_error(ltl,'Error while parsing predicates',Text),fail)),
atom_chars(MCH,FilenameM),append(Core,['.','m','c','h'],FilenameM),
append(Core,['.','p','l'],FilenameP),atom_chars(PL,FilenameP).