﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
4189	OMC compiles models with no parameter-binding equations without giving warning/errors	Francesco Casella	somebody	"Consider the following model
{{{
package TestParameter
  model M1
    parameter Real p;
  end M1;

  model M2
    M1 m;
  end M2;
end TestParameter;
}}}
If I compile it with OMC, I get no error or warnings. When the simulation runs, I get p = 0.

The Modelica Specification 3.3 r1, Section 8.6, states that
- For all variables declared as constant and parameter, with {{{fixed = true}}}; no equation is added to the initialization equations
- If a parameter has a  start-expression, does not have  fixed=false, and neither has a binding equation nor is part of a record having a binding equation, the  start-expression can be used as parameter-expression although a diagnostic message is recommended when initializing the model without setting the parameter value.

As {{{p}}} is a Real variable, Sect. 4.8.1 defines a default start-expression {{{0}}} - I guess this was used to define p = 0. However, according to the Specification, a warning message should be issued here. In fact, the intent of leaving parameter {{{p}}} in model {{{M}}} without a binding equation is precisely to force the user to set it in a modifier when instantiating the model, and to get at least a warning if this is not done.

Note that in this case, Dymola actually returns an error

  The following parameter doesn't have any value: m.p

implicitly ignoring the default start-expression of the Real type when looking for the start expression of parameter m.p, since the parameter has not been explicitly set by a modifier.

At least a warning should be issued in this case. IMHO, an error would be preferable, and maybe a clarification of the Specification in this respect could be useful."	defect	new	critical	1.12.0	Frontend				
