In most PL textbooks (even in language specifications) statments like if, while, for, break are categorized as flow of control statements.
However, it is not consistent; i.e. sometimes the same text uses control-flow statement (note the dash), or control flow statment, I read sentences that says control flows...

I understand those statements control the flow of execution, hence control of flow. But many texts (even wikipedia) says otherwise, implying control is something that flows in a program

What is the formal, language-agnostic definition of this concept in CS, if any?

  • $\begingroup$ Please note that 'control flow' means 'flow of control', not 'control of flow'! $\endgroup$ Oct 9 '12 at 10:40
  • $\begingroup$ Too bad we don't have a native English speaker in this thread. $\endgroup$
    – user3105
    Oct 9 '12 at 19:36
  • $\begingroup$ This is a basic law of English morphology (that applies to all Germanic languages). $\endgroup$ Oct 10 '12 at 11:21

I am not sure what you mean by "language-agnostic definition of this concept in CS"; such notions are rarely (if ever) rigorously defined. Someone uses them first, others pick them up and eventually they become standard vocabulary. That's ho we get conflicting notation all the time.

In this case, I don't see an either-or. Both makes sense, depending of how you look at it. The semantics of the language control the flow of execution, i.e. determine which statement is executed next. But as this control -- once it is implemented in a processor -- only looks at the current statement, it flows along, that is control flows.

  • $\begingroup$ I have a CS textbook on design of programming languages by Terrence Pratt. It mentions Sequence Control. It mentions structured control statements. But nowhere in that text I've seen the term control-flow or flow of control. So I'm curious where it comes from, since I have to do some explaining to students who constantly challenge and reason. $\endgroup$
    – user3105
    Oct 8 '12 at 13:52
  • $\begingroup$ @user1728338 Well, Google Scholar has 3.7 million hits, so it certainly is a relevant notion. I have no idea who coined it, though. I seem to remember Knuth using the term, but I'd have to look this up. $\endgroup$
    – Raphael
    Oct 8 '12 at 20:04
  • $\begingroup$ I'm aware of the wide-spread usage, but it seems to me people are just following suit without giving attention. I tend to think this was initially coined as "control-flow statement" as in "push-button ignition" (pushing of button, therefore controlling of flow). Then someone somewhere forgot to put the dash and things became mixed up afterwards. $\endgroup$
    – user3105
    Oct 9 '12 at 19:31
  • $\begingroup$ Meanings of words change all the time. There are plenty of redundant, inconsistent, and even contradicting terms in mathematics. So what are you after here? Do you want to use a word people understand, or do you think there is a "right" one, or are you just interested in the term's history? $\endgroup$
    – Raphael
    Oct 9 '12 at 22:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy