generating semantic rules for modelica