There is nothing ungrammatical about this sentence. It contains a kind of non-sequitur. There are many of these. For example, zeugma involves a kind of non-sequitur. An example of this is as follows.
He walked into the kitchen wrapped in thought and a bath robe.
Here the zeugma involves the same word (wrapped) first metaphorically and then literally....
Strictly speaking, the title sentence is grammatical, but it sounds unidiomatic because there's no connection between the two predicates. To give some similar examples,
I am raising money and running for president
sounds fine, but
I am lifting weights and running for president
sounds funny. Similarly,
I am tired and thinking in circles
As with each other answer so far, I’ll confirm that the title sentence is perfectly grammatical. There is no real ambiguity or doubt on that score. In contrast to other answers, though, I find nothing odd, funny-sounding, or unidiomatic about the title sentence. I do not consider it a non sequitur.
In the example sentence, “I am tired and thinking in ...
There is nothing wrong with it, especially in colloquial English. Among friends,
Friend: Let's go out to the bar.
Me: I am tired and doing my homework.
[I can't go out.] I am tired and [, besides, I am] doing my homework.
I have multiple reasons reinforcing why I can't go out
But also, I suppose it could be used the next morning...
If you want to talk about an action as something that caused something, then the action is functioning as a noun (it's a thing that is doing stuff). A noun formed from a verb is a gerund. So it would be "Spending my life ..."
You could say:
Over the past ten years, I've eaten lunch at 1 pm.
Recently, I've been eating lunch at 1 pm.
If it's just about a single past action and you have a finished time phrase, use the past simple:
I had lunch at 1 pm.
If it's habitual, present simple would do:
I have lunch at 1 pm.
And no, we CAN'T use the present perfect ...
Let me break down the following [given] sentence.
The sentence is: "When a static or dynamic function call FC is evaluated with respect to a static context SC and a dynamic context DC, the result is obtained as follows.". This sentence is quoted from 126.96.36.199 Evaluating Static and Dynamic Function Calls
Static or dynamic function call FC is the noun.
"Call" isn't a verb here; "is evaluated" and "is obtained" are the verbs.
A "function call" is a thing, in this case a procedure, which is either unchanging (static) or dynamic (changing, depending on conditions).
If I rewrite the sentence for clarity, I get something like this:
"A function call (FC) can be evaluated in static (SC) or dynamic (DC) context. ...