public static boolean shouldAskToAnalyze(Program program) {

		// no need to ask if the program can't be saved (i.e. read-only)
		if (program == null || !program.canSave()) {
			return false;
		}

		Options options = program.getOptions(Program.PROGRAM_INFO);
		// older programs don't have a "Ask" property, so check analyzed flag
		boolean isAnalyzed = options.getBoolean(Program.ANALYZED_OPTION_NAME, false);
		if (isAnalyzed) {
			return false;
		}
		return options.getBoolean(Program.ASK_TO_ANALYZE_OPTION_NAME, true);
	}
Returns true if the user should be asked to analyze. They will only be asked if the program
hasn't already been analyzed (analyzed flag property is false or null) or the
"ask to analyze" flag property is true or null (default is true unless explicitly set to 
false).

@param program the program to check for the property
@return true if the user should be prompted to analyze the program
Ghidra/Features/Base/src/main/java/ghidra/program/util/GhidraProgramUtilities.java