Compositionality
All human languages have the property of productivity. This is simply the fact that the vocabulary of any given language can be used to construct a theoretically infinite number of sentences (not all of which will be meaningful), by varying the ways in which the words are combined. For example, given the words the, a, has, eaten, seen, passing, contemporary, novelist and buffalo, the following figure among the large number of meaningful sentences that can be constructed:

and so on. (We can also construct ungrammatical sentences like A the novelist eaten passing has, but since these are meaningless we will ignore them here.) Most people have probably never heard (32) before:

yet, as speakers of English, we understand immediately what it means. How does this ability arise? One answer is that meaning is compositional. This is to say that the meanings of sentences are made up, or composed, of the meanings of their constituent lexemes. We understand novel sentences because we understand the meanings of the words out of which they are constructed. Since we know the individual meanings of there, are, no, remains, of, Indian, and so on, we know the meaning of any grammatical sentence in which they are combined. On the contrary, if a novel sentence contains a word which we do not know, we do not know what the sentence means. Thus, if you are told that the distribution of seats was aleatory, and you do not know that aleatory means ‘random’, then the sentence, taken as a whole, will not be meaningful. It is important to note that not all combinations of words are necessarily compositional. One especially important category of non-compositional phrase is idioms. For example, if I say that so-and-so has thrown in the towel, most English speakers will recognize that I am not talking about anyone literally ‘throwing’ a ‘towel’, but that I simply mean that the person in question has given up on what ever venture is being spoken about. The phrase throw in the towel, then, is not compositional, since its overall meaning, ‘to give up’, does not derive from the meanings of its individual component lexemes.
QUESTION In the following sentences, which of the highlighted expressions can be considered compositional, and which are idioms? Do any belong to some third category?

Based on the distinction between the meanings of words and the meanings of sentences, we can recognize two main divisions in the study of semantics: lexical semantics and phrasal semantics. Lexical semantics is the study of word meaning, whereas phrasal semantics is the study of the principles which govern the construction of the meaning of phrases and of sentence meaning out of compositional combinations of individual lexemes.