@SuppressWarnings("unchecked")
	private DataType readParameter(Map<String, Object> result, Function function,
			List<Variable> formalParams) {

		String name = (String) result.get("name");
		// int ordinal = (int) (double) result.get("ordinal");
		int size = (int) (double) result.get("size");
		String regularComment = (String) result.get("comment");

		Map<String, Object> type = (Map<String, Object>) result.get("formalType");
		DataType dt = findDataType(type);
		if (dt == null) {
			log.appendMsg("Missing datatype: " + type.get("name"));
			dt = Undefined.getUndefinedDataType(size);
		}

		try {
			ParameterImpl var;

			ProgramContext context = program.getProgramContext();
			List<String> rnames = (List<String>) result.get("registers");
			if (rnames != null) {
				if (formalParams != null) {
					for (String r : rnames) {
						Register register = context.getRegister(r);
						var = new ParameterImpl(name, dt, register, program);
						var.setComment(regularComment);
						formalParams.add(var);
					}
				}
				return dt;
			}

			int offset = (int) (double) result.get("stackOffset");
			if (formalParams != null) {
				var = new ParameterImpl(name, dt, offset, program);
				var.setComment(regularComment);
				formalParams.add(var);
			}
			return dt;
		}
		catch (InvalidInputException e) {
			log.appendException(e);
			return null;
		}
	}
Parses a list of {@link Function function} definitions from SARIF and creates
then, adding them to the current {@link Program program}.
<p>
Information from a TYPEINFO_COMMENT is used in preference to information from
RETURN_TYPE and STACK_FRAME/STACK_VARs that are tagged as parameters.
<p>
DTD for the FUNCTION element:

<pre>
<code>
&lt;!ELEMENT FUNCTION (RETURN_TYPE?, ADDRESS_RANGE*, REGULAR_CMT?, REPEATABLE_CMT?, TYPEINFO_CMT?, STACK_FRAME?, REGISTER_VAR*)&gt;
</code>
</pre>

@param result             the parser
@param options
@param monitor            the task monitor
@throws AddressFormatException if any address is not parsable
@throws CancelledException     if the operation is cancelled through the
                               monitor
Ghidra/Features/Sarif/src/main/java/sarif/managers/FunctionsSarifMgr.java