Commits (6)
......@@ -13,7 +13,6 @@ with Ada.Strings.Unbounded,
Locations,
Ocarina.Namet,
Ocarina.Types,
System.Assertions,
Ocarina.Analyzer,
Ocarina.Backends.Properties,
Ocarina.Configuration,
......@@ -1224,7 +1223,7 @@ procedure BuildSupport is
(ATN.Component_Type_Identifier
(Corresponding_Declaration (Tmp_CI2)))));
exception
when System.Assertions.Assert_Failure =>
when others =>
Put_Line
("Detected DV from TASTE version 1.2");
Bound_APLC_Name := US
......
......@@ -86,43 +86,41 @@ void Create_script()
FOREACH (fv, FV, get_system_ast()->functions, {
if (qgenada == fv->language) {
FOREACH(i, Interface, fv->interfaces, {
switch (i->direction) {
case PI: {
fprintf (script, "\n");
fprintf (script, "# Call QGen to generate Ada code\n");
fprintf (script, "printf \"Calling QGen to generate Ada code from %s.mdl with the following command line:\\n\"\n", i->name);
fprintf (script, "printf \"qgenc %s.mdl --typing %s_types.txt --incremental --no-misra --language ada --output %s\\n\"\n", i->name, i->name, i->distant_qgen->fv_name);
fprintf (script, "printf \"Output from QGen\\n\\n\"\n");
fprintf (script, "qgenc %s.mdl --typing %s_types.txt --incremental --no-misra --language ada --output %s\n", i->name, i->name, fv->name);
fprintf (script, "printf \"\\nEnd of output from QGen\\n\\n\"\n\n");
} break;
case RI: break;
default: break;
}
});
FOREACH(i, Interface, fv->interfaces, {
switch (i->direction) {
case PI: {
fprintf (script, "\n");
fprintf (script, "# Call QGen to generate Ada code\n");
fprintf (script, "printf \"Calling QGen to generate Ada code from %s.mdl with the following command line:\\n\"\n", i->name);
fprintf (script, "printf \"qgenc %s.mdl --typing %s_types.txt --incremental --no-misra --language ada --output %s\\n\"\n", i->name, i->name, i->distant_qgen->fv_name);
fprintf (script, "printf \"Output from QGen\\n\\n\"\n");
fprintf (script, "qgenc %s.mdl --typing %s_types.txt --incremental --no-misra --language ada --output %s\n", i->name, i->name, fv->name);
fprintf (script, "printf \"\\nEnd of output from QGen\\n\\n\"\n\n");
} break;
case RI: break;
default: break;
}
});
}
else if (qgenc == fv->language) {
FOREACH(i, Interface, fv->interfaces, {
switch (i->direction) {
case PI: {
fprintf (script, "\n");
fprintf (script, "# Call QGen to generate C code\n");
fprintf (script, "printf \"Calling QGen to generate C code from %s.mdl with the following command line:\\n\"\n", i->name);
fprintf (script, "printf \"qgenc %s.mdl --typing %s_types.txt --incremental --no-misra --language c --output %s\\n\"\n", i->name, i->name, i->distant_qgen->fv_name);
fprintf (script, "printf \"Output from QGen\\n\\n\"\n");
fprintf (script, "qgenc %s.mdl --typing %s_types.txt --incremental --no-misra --language c --output %s\n\n", i->name, i->name, fv->name);
fprintf (script, "printf \"\\nEnd of output from QGen\\n\\n\"\n\n");
fprintf (script, "# Add QGen generated C code to C_INCLUDE_PATH\n");
fprintf (script, "export C_INCLUDE_PATH=../../%s/%s/:$C_INCLUDE_PATH\n", fv->name, fv->name);
} break;
case RI: break;
default: break;
}
});
FOREACH(i, Interface, fv->interfaces, {
switch (i->direction) {
case PI: {
fprintf (script, "\n");
fprintf (script, "# Call QGen to generate C code\n");
fprintf (script, "printf \"Calling QGen to generate C code from %s.mdl with the following command line:\\n\"\n", i->name);
fprintf (script, "printf \"qgenc %s.mdl --typing %s_types.txt --incremental --no-misra --language c --output %s\\n\"\n", i->name, i->name, i->distant_qgen->fv_name);
fprintf (script, "printf \"Output from QGen\\n\\n\"\n");
fprintf (script, "qgenc %s.mdl --typing %s_types.txt --incremental --no-misra --language c --output %s\n\n", i->name, i->name, fv->name);
fprintf (script, "printf \"\\nEnd of output from QGen\\n\\n\"\n\n");
fprintf (script, "# Add QGen generated C code to C_INCLUDE_PATH\n");
fprintf (script, "export C_INCLUDE_PATH=../../%s/%s/:$C_INCLUDE_PATH\n", fv->name, fv->name);
} break;
case RI: break;
default: break;
}
});
}
});
......
......@@ -37,10 +37,10 @@ void Process_Context_Parameters(FV *fv)
ASN1_Filename *filename = NULL;
/* For the moment context parameters only apply to C, Ada and
* Blackbox_Device (= C ) languages
/* For the moment context parameters only apply to C/C++, Ada and
* Blackbox_Device (= C) languages
*/
if (c != fv->language && ada != fv->language &&
if (c != fv->language && ada != fv->language && cpp != fv->language &&
blackbox_device != fv->language && qgenada != fv->language) {
return;
}
......
......@@ -39,7 +39,7 @@ void Create_New_SDL_Structure(FV * fv)
dataview_uniq = make_string ("dataview-uniq.asn");
}
char *command = make_string("mono $(which asn1.exe) -customStg $(taste-config --prefix)/share/asn1scc/python.stg:%s/DataView.py -customStgAstVerion 4 %s/%s", path, dataview_path, dataview_uniq);
char *command = make_string("mono $(which asn1.exe) -customStg $(taste-config --prefix)/share/asn1scc/python.stg:%s/DataView.py -customStgAstVersion 4 %s/%s", path, dataview_path, dataview_uniq);
if (system(command)) {
ERROR ("[ERROR] Command \"%s\" failed in generation of SDL skeleton\n", command);
}
......
......@@ -338,7 +338,7 @@ DECLARE_LIST(Package)
*/
typedef struct t_system
{
char *name;
char *name; // always "deploymentview"
Context *context;
FV_list *functions;
Process_list *processes;
......