55 _realType(NotAssigned)
76 _realType(NotAssigned)
78 processModification();
98 _realType(NotAssigned)
100 processModification();
136 _hasAssigment =
false;
142 _hasAssigment =
true;
143 _exp = _m->getAsEqual()->exp();
145 AST_ArgumentList al = _m->getAsClass()->arguments();
146 AST_ArgumentListIterator it;
147 AST_Expression asgExp = _m->getAsClass()->exp();
148 if (asgExp->expressionType() !=
EXPNULL) {
149 _hasAssigment =
true;
152 if (!isParameter()) {
155 AST_Argument_Modification am =
current_element(it)->getAsModification();
156 if (am->modification()->modificationType() ==
MODEQUAL) {
157 _exp = am->modification()->getAsEqual()->exp();
160 }
else if (am->name()->compare(
"start") == 0) {
177 unsigned int total = 1;
178 for (vector<int>::const_iterator it = _size.begin(); it != _size.end(); it++) {
186 unsigned int total = 1;
187 for (
unsigned int it = dim + 1; it < _size.size(); it++) {
188 total *= _size.at(it);
196 if (isForType() || isInput() || isOutput() || isEqType() || isLocal()) {
198 }
else if (isConstant()) {
201 buffer <<
"_" << _name;
210 string cast_operator;
211 if (isDiscreteInteger()) {
212 cast_operator =
"(int)";
214 return cast_operator;
226 if (type()->print() ==
"Integer") {
231 buffer << prefix << name();
233 buffer <<
"[" << size() <<
"]";
242 if (hasAssignment() || hasStartModifier() || hasEachModifier()) {
243 auto range =
Range(*
this);
246 if (hasEachModifier()) {
248 buffer <<
TAB <<
TAB << var <<
" = " << ex <<
";" << endl;
249 buffer << range.end();
250 }
else if (hasAssignment() || hasStartModifier()) {
251 buffer << var <<
" = " << ex <<
";";
273 Variable t(ty[
"Real"].get(), 0,
nullptr,
nullptr, vector<int>(1, 0),
false);
277 Variable reinit(ty[
"Real"].get(), 0,
nullptr,
nullptr, vector<int>(1, 0),
false);
279 reinit.setName(
"reinit");
281 Variable terminate(ty[
"Real"].get(), 0,
nullptr,
nullptr, vector<int>(1, 0),
false);
282 terminate.setBuiltIn();
283 terminate.setName(
"terminate");
284 insert(
"terminate", terminate);
285 Variable chain_rule(ty[
"Real"].get(),
TP_LOCAL,
nullptr,
nullptr, vector<int>(1, 0),
false);
286 chain_rule.setBuiltIn();
287 chain_rule.setName(
"aux");
289 Variable row(ty[
"Integer"].get(),
TP_LOCAL,
nullptr,
nullptr, vector<int>(1, 0),
false);
310 std::map<string, Variable> table =
map();