If the compilation cannot still be completed you are confronted to a difficult problem. Most probably the compilation problems are due to the size of the expressions that you are manipulating for your problem. A first solution is to try to simplify the generated expression using auxiliary variables for terms that appear at least twice in the code. ALIAS-Maple proposes a mechanism that may allow to perform part of this task automatically. But many time it will be still necessary to edit by hand the C++ program. If you are using ALIAS-Maple the procedure involving the expressions, their jacobian and Hessian are named usually F, J and H respectively and are located usually in the files _F_.c, _J_.c, _H_.c.
Another possibility is to compile separately the files that involves the interval evaluation of your expressions that you may have included directly in your main program.
This is the case for the C++ code produced by ALIAS-Maple which include the expressions files in the main program. Let us consider the example of the general solving procedure. The main program is named _GS_.C and is compiled with the makefile _makefile. This main program includes the expressions evaluation file _F_.c and eventually the jacobian and hessian evaluation files (_J_.c , _H_.c). To compile separately the expressions evaluation file first rename this program _F_.C and add the following header:
#include <fstream> #include "Functions.h" #include "Vector.h" #include "IntervalVector.h" #include "IntervalMatrix.h" #include "IntervalMatrix.h" #include "IntegerVector.h" #include "IntegerMatrix.h"and remove the #include "_F_.c" in the main program _GS_.C.
Then the makefile should be modified so that _F_.o will appear in the dependency. Hence the line:
_GS_:_GS_.C $(LIB_SOLVE)will be changed to:
_GS_:_GS_.C _F_.o $(LIB_SOLVE)Then indicate that _F_.o should be linked by adding this file name before the library flag LIB_SOLVE. Hence:
$(CC) -I$(INCL) -I$(INCLI) _GS_.C -o _GS_ \ $(LIB_SOLVE) -L$(LIB) $(LD) -lmwill be changed to:
$(CC) -I$(INCL) -I$(INCLI) _GS_.C -o _GS_ \ _F_.o $(LIB_SOLVE) -L$(LIB) $(LD) -lm
If the previous method does not work, then there is an alternative that will always work but at the expense of an increased computation time: instead of compiling your expression you may rather use the ALIAS-C++ parser to interpret all the expressions (see chapter 12). Basically you will have to write the analytical form of each expression you will have to evaluate in a text file and execute specific procedures of the parser library that will perform the interval evaluation of these expressions by reading this text file. Note that ALIAS-Maple is able to produce code that performs this operation (see the MakeF, MakeJ, MakeH procedures.