Officially, in well written English, you can follow the dependent clause construction marked by the commas and the succession of the pronouns.
- If A, [then] if B, [then] C
is always going to mean
- A → (B → C).
Hereafter, '{Coffee Store}' means '{Coffee Store} is open.' So 'Starbucks' means 'Starbucks is open', and 'not Starbucks' means 'Starbucks is closed.' For example:
- If you want coffee, then if Starbucks is closed, I suggest we make it ourselves.
Can be encoded only as
- Coffee ⟹ (not Starbucks ⟹ Make_Coffee)
And never with the other nesting order.
The less likely
- (A → B) → C
would have to be written
- If1 if2 A, [then1] B; [then2] C.
or
- If1 B if2 A, then C.
In 7, note: if2 is the '←' Logical Connective, with no comma.
You have to close clauses in order. Put short: like parentheses, references in most Latinate grammars are 'last-in, first-out'.
"Then" has a referent, and officially, references must bind to the closest available potential candidate, that is the rightmost "if" that is not already spoken for. So in 6, then1 must go with if2 and then2 with if1.
When the "then" is merely implied, the comma that closes the dependent clause must close the clause most recently opened that has not already been closed (by another comma or reference). Same rule, different official reason. So you can just read it as if the implied 'then' were inserted.
When each "if" does not come with a comma or a "then" of its own, the comma or pronoun must split the one that has a clause, not the one that is a connective. Connective conditions like "B whenever A" have to bind most tightly.
Of course, in practice one is seldom going to see the two 'ifs' in a row. One or the other is going to be since/when/while, or some equivalent.
Since when Hyperion is closed, Starbucks is also closed, we will have to make our own coffee.
or the equivalent
If Starbucks is closed whenever Hyperion is, then we will have to make our own coffee.
unwinds as
(not Starbucks ⟹ not Hyperion) ⟹ Make_Coffee
And never the other order. The 'when' clause here must be closed before the preceding 'since' and connectives bind tighter than clauses.