public synchronized boolean openProgram(Program prog) {
		decompileMessage = "";
		program = prog;
		Language lang = prog.getLanguage();
		if (!lang.supportsPcode()) {
			decompileMessage = "Language does not support PCode.";
			return false;
		}
		pcodelanguage = (SleighLanguage) lang;
		CompilerSpec spec = prog.getCompilerSpec();
		if (!(spec instanceof BasicCompilerSpec)) {
			decompileMessage =
				"Language has unsupported compiler spec: " + spec.getClass().getName();
			return false;
		}
		compilerSpec = spec;

		NameTransformer transformer =
			(options == null) ? new IdentityNameTransformer() : options.getNameTransformer();
		dtmanage = new PcodeDataTypeManager(prog, transformer);
		try {
			decompCallback =
				new DecompileCallback(prog, pcodelanguage, program.getCompilerSpec(), dtmanage);
			initializeProcess();
			if (!decompProcess.isReady()) {
				throw new IOException("Unable to start decompiler process");
			}
			decompileMessage = decompCallback.getNativeMessage();
			if (!isErrorMessage()) {
				return true;
			}
		}
		catch (Exception ex) {
			decompileMessage = ex.getMessage();
			if (decompProcess == null) {
				return false;
			}
			stopProcess();
		}
		program = null;
		decompCallback = null;
		baseEncodingSet = null;

		return false;
	}
This call initializes a new decompiler process to do
decompilations for a new program. This method only
needs to be called once per program.  Even if the
underlying decompiler process crashes, the interface
will automatically restart and reinitialize a new
process when it needs it, and the openProgram call
does not need to be made again. The call can be made
multiple times, in which case, each call terminates
the process initialized the last time and starts a
new process
@param prog = the program on which to perform decompilations
@return true if the decompiler process is successfully initialized
Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/DecompInterface.java