Content deleted Content added
m Reverted edit(s) by 163.150.137.124 identified as test/vandalism using STiki |
→English language use of Boolean terms: reformat |
||
Line 155:
Care should be taken when converting an English sentence into a formal boolean statement. Many English sentences have imprecise meanings.
*In certain cases, '''AND''' and '''OR''' can be used interchangeably in English: ''I always carry an umbrella for when it rains '''and''' snows'' has the same meaning as ''I always carry an umbrella for when it rains '''or''' snows''. An alternate phrasing would be ''I always carry an umbrella for when precipitation is forecast.''
*Sometimes the English words "and" and "or" have a meaning that is apparently opposite of its meaning in boolean logic: "Give me all the red '''and''' blue berries
*Depending on the context, the word "or" may correspond with either logical '''OR''' (which corresponds to the English equivalent "and/or") or logical '''XOR''' (which corresponds to the English equivalent "either/or"):▼
** ''The waitress asked, "Would you like cream '''or''' sugar with your coffee?"''
** ''The waitress asked, "Would you like soup '''or''' salad with your meal?"''
** This can be a significant challenge when providing precise specifications for a computer program or electronic circuit in English. The description of such functionality may be ambiguous. Take for example the statement, "The program should verify that the applicant has checked the male '''or''' female box." This is usually interpreted as an '''XOR''' and so a verification is performed to ensure that one, and only one, box is selected. In other cases the intended interpretation of English may be less obvious; the author of the specification should be consulted to determine the original intent.▼
▲* "Give me all the red '''and''' blue berries," usually means, "Give me all berries that are red '''or''' blue". (The former might have been interpreted as a request for berries that are each both red and blue.) An alternative phrasing for this request would be, "Give me all berries that are red and all berries that are blue."
▲Depending on the context, the word "or" may correspond with either logical '''OR''' or logical '''XOR''':
▲* ''The waitress asked, "Would you like cream '''or''' sugar with your coffee?"'' (Logical '''OR'''.)
▲* ''The waitress asked, "Would you like soup '''or''' salad with your meal?"'' (Logical '''XOR'''.)
▲This can be a significant challenge when providing precise specifications for a computer program or electronic circuit in English. The description of such functionality may be ambiguous. Take for example the statement, "The program should verify that the applicant has checked the male '''or''' female box." This is usually interpreted as an '''XOR''' and so a verification is performed to ensure that one, and only one, box is selected. In other cases the intended interpretation of English may be less obvious; the author of the specification should be consulted to determine the original intent.
==Applications==
|