private List<Program> getValidProgramsByArchitecture() {
		List<Program> validList = new ArrayList<>(programs);

		ProgramID protoTypeProgramID = new ProgramID(prototypeProgram);

		for (Program program : programs) {
			ProgramID programID = new ProgramID(program);
			if (!protoTypeProgramID.equals(programID)) {
				validList.remove(program);
			}
		}

		return validList;
	}
Returns a list of all programs that should be analyzed. 
<p>
This will always include the currently selected program, as well as any 
other programs that have a similar architecture. Those programs with 
different architectures will be filtered out.

@return the list of programs to analyze
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/AnalyzeAllOpenProgramsTask.java