In a mathematical integer optimization problem, if the objective function is represented as $\sum x_k \cdot M_k$, where $M_k$ is a non-linear function whose value is known and just plugged in to the objective function, thus acting as constant coefficients, is the objective function linear, since there are no product of variables are involved? When I try to feed in such a problem to an ILP solver, it doesn't complain of being not linear. What would be the explanation?
Assuming that $M$ depends on $x$, your function is non-linear. If not, it is linear and all is well.
If the dependency does exist, just because a linear solver doesn't support the proper input, that doesn't make the function linear, although sometimes people find that assumption good enough for some specific application.
The correct way to solve a problem like this is to use an MINLP solver that supports callbacks, such as Knitro, our own Octeract Engine (v 1.14 and above), and, if memory serves, BONMIN.
If (part of) the problem is treated as black box, then the solver will keep updating the values of your objective (through the callbacks) and its derivatives and use new constants for $M$ in every iteration, which will most likely result in a different answer.
This is vastly different than classic solver behaviour where the problem is defined in the beginning and can't be changed during the solving process.
What does it mean for a function to be linear?
It is actually short for the function is linear in its variables. One way to define linearity is to say, that the derivative is constant. For example $F(x)=5x+3$ is linear in $x$ as $F'(x)=5$. Is it linear in $y$? Well you can write it as $F(y) = 0y+5x+3$, then $F'(y)=0$. Because we treat $x$ as a constant.
So how do you know with respect to which variables you have to take the derivative? Well, the solver (e.g. Cplex) get a list of variables from you. These are your variables. The other term might be computed, but as your solver sees it, are just numbers, no matter how you came up with them.
So think about $M'_k(x)$. Is it constant? I think, this will answer your question.
Good luck and keep on solving problems:)