public void removeCompilerSpecExtension(String optionName, TaskMonitor monitor)
			throws LockException, CancelledException {
		program.checkExclusiveAccess();
		Type type = SpecExtension.getExtensionType(optionName, false);
		Options specOptions = program.getOptions(SpecExtension.SPEC_EXTENSION);
		if (!specOptions.contains(optionName)) {
			throw new SleighException("Extension does not exist: " + optionName);
		}
		int progVersion = specOptions.getInt(SpecExtension.VERSION_COUNTER_OPTIONNAME, 0);
		progVersion = (progVersion + 1) % 0x40000000;	// Change version number associated with the CompilerSpec
		String extName = SpecExtension.getFormalName(optionName);
		switch (type) {
			case CALL_FIXUP:
				removeCallFixup(extName, monitor);
				break;
			case CALLOTHER_FIXUP:
				removeCallotherFixup(extName, monitor);
				break;
			case MERGE_MODEL:
				removePrototype(extName, monitor);
				break;
			case PROTOTYPE_MODEL:
				removePrototype(extName, monitor);
				break;
		}
		specOptions.removeOption(optionName);
		specOptions.setInt(SpecExtension.VERSION_COUNTER_OPTIONNAME, progVersion);
		program.installExtensions();
	}
Remove the indicated spec extension from the program.
Depending on the type, references to the extension are removed or altered
first, to facilitate final removal of the extension.
All changes are made in a single transaction that can be cancelled.
@param optionName is the option name where the extension is stored
@param monitor is a provided monitor that can trigger cancellation
@throws LockException if the caller does not have exclusive access to the program
@throws CancelledException if the caller cancels the operation via the task monitor
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/SpecExtension.java