Common Logic Controlled English

Draft, 15 March 2007

John F. Sowa

Abstract:  Common Logic Controlled English (CLCE) is a formal language with an English-like syntax. Anyone who can read ordinary English can read sentences in CLCE with little or no training. Writing CLCE, however, requires practice in learning to stay within its syntactic and semantic limitations. This version of CLCE supports first-order logic with equality, any number of levels of metalanguage, an ontology for time and situations, and an ontology for sets, sequences, and integers. The fundamental semantic limitation of CLCE is that the meaning of every CLCE sentence is formally defined by its translation to logic.

7 Grammar

CLCE grammar rules are written in Extended Backus-Naur Form (EBNF), as specifed by International Standard ISO/IEC 14977. Each EBNF rule is preceded by an informal English paraphrase. In any question of interpretation, the EBNF rule takes precedence over the English statement. This section uses EBNF to define three kinds of grammar rules for CLCE:  lexical rules, which define the categories of words that occur in CLCE sentences; syntactic rules, which define the combinations of words in phrases and sentences; and declaration rules, which define the statements that declare CLCE words and their mapping to FOL or other notations.

7.0 Changes to the 2004 CLCE specifications

The major changes include metalanguage and ontology. These features support the IKL extensions for propositions, metalanguage, and ontology about times, places, causes, and situations. Although times have been added, tenses have not yet been added to the verb syntax. For a sample narrative that uses some of these features, see Section 7.6. Many of the grammar rules of the 2004 specifications have been revised or replaced, either to simplify the grammar or to add new features that make CLCE more readable and writable. Following is a brief summary.

7.1 Lexical Categories

CLCE lexical rules define the permissible combinations of characters that may occur in words, names, numbers, and character strings. No whitespace is permitted inside any lexical unit, except when explicitly stated by the grammar. In the CLCE grammar, the only lexical categories that permit whitespace are CharString, Comment, and Quotedstring .

Character string.
Zero or more characters delimited by double quotes. Any double quote in a character string shall be doubled.
CharString = """", {Character - """" | """"""}, """";
Any string delimited by /* and */ that does not contain */ as a substring.
Comment = "/*", {Character - "*" | "*", Character - "/"}, ["*"], "*/";

A string of three periods.
Ellipsis = "...";

The letter E in upper or lower case followed by an optional sign and an unsigned integer.
Exponent = ("e" | "E"), ["+" | "-"], UnsignedInt;

Floating-point number.
An optional sign followed either by an unsigned integer and an exponent or by an optional unsigned integer, a decimal point, an unsigned integer, and an optional exponent.
Floating = ["+" | "-"], ( UnsingedInt, Exponent
                        | [UnsignedInt], ".", UnsignedInt, [Exponent]);

An optional sign followed by an unsigned integer.
Integer = ["+" | "-"], UnsignedInt;

Either an integer or a floating-point number.
Number = Integer | Floating;

Quoted name.
Zero or more characters delimited by single quotes. Any single quote in a quoted name shall be doubled.
QuotedName = "'", {Character - "'" | "''"}, "'";

Unsigned integer.
A sequence of one or more digits.
UnsignedInt = Digit, {Digit};

A letter followed by an optional unsigned integer. To avoid ambiguity, any variable beginning with an upprercase I or the letter A in either case shall be followed by an unsigned integer. Since names in Common Logic are case sensitive, names and variables in CLCE are also case sensitive; i.e., x and X are treated as distinct variables.
Variable = (Letter, [UnsignedInt]) - ("a" | "A" | "I");

Any string beginning with a letter or a digit and followed by zero or more letters, digits, or underscores.
Word = (Letter | Digit), {Letter | Digit | "_"};

7.2 Parts of Speech

The CLCE parts of speech have a large overlap with English parts of speech. Unless otherwise specified, all English nouns, verbs, and proper names can be used in CLCE; the major restrictions are for the verbs be and have and the modal auxiliaries, such as may, can, and must. Most English adjectives, adverbs, and prepositions can be used in CLCE, but many of them are restricted by the grammar rules. The most restricted parts of speech are pronouns, conjunctions, articles, and quantifying words, such as some or every. Those restrictions are specified by the rules in Section 7.3. Some multiword phrases in English can be declared as single nouns or names in CLCE; examples include family member, social security number, and Statue of Liberty. As in English, such multiword phrases can be written in CLCE with blanks or other whitespace between words.

The following EBNF rules specify generic information; e.g., every adjective is a word. The fact that a particular word happens to be an adjective is declared separately, either in a lexicon or in statements called declarations. See Section 7.5 for the syntax of declarations.

A word that has been declared as an adjective.
Adjective = Word;
A word that has been declared as an adverb.
Adverb = Word;

An adjective that has been declared as a comparative or the word "more" followed by an adjective.
Comparative = Adjective | "more", Adjective;

Functional noun.
A noun that has been declared as a functional noun.
FunctionalNoun = Noun;

Either a quoted name, a variable, a number, a character string, or one or more words that have been declared as a name.
Name = QuotedName | Variable | Number | CharString | Word, {Word};

One or more words that have been declared as a noun.
Noun = Word, {Word};

One or more words that have been declared as a preposition.
Preposition = Word, {Word};

A word that has been declared as a verb.
Verb = Word;

7.3 Phrase-Structure Rules

Phrase-structures rules specify how words are grouped in phrases. Unlike the lexical rules, phrase-structure rules permit one or more whitespace characters to occur between any two constituents. Words and numbers shall be separated by at least one character of whitespace or punctuation, but whitespace is optional before and after punctuation. Unlike English, which allows different styles for the placement of commas, CLCE commas are required in some cases where they would be optional in English. The major difference between English and CLCE punctuation is that CLCE requires curly braces around chapters and parentheses to avoid ambiguity in deeply nested sentences.

Zero or more prefixes followed by a sequence of one or more paragraphs or chapters enclosed in curly braces.
Chapter = {Prefix},
          "{", (Paragraph | Chapter), {Paragraph | Chapter}, "}";
A comparative followed by the word than and a simple noun phrase.
Comparison = Comparative, "than", SimpleNP;

Complex declarative sentence.
Either a conditional clause followed by ", then" and a parenthesized declarative sentence or a parenthesized declarative sentence followed by either "only" and a conditional or "if and only" and a conditional. Either a conditional clause followed by , then and a parenthesized declarative sentence or a parenthesized declarative sentence followed by either only and a conditional or if and only and a conditional.
ComplexDS = Conditional, ", then", ParenDS
          | ParenDS, ( "only", Conditional
                    | "if and only", Conditional);

Compound declarative sentence.
Two or more parenthesized declarative sentences connected by and or by or. If the connector is or, the first sentence shall be preceded by either. Each sentence except the last shall be followed by a comma, and the last sentence shall be preceded by the connector (and or or).
CompoundDS = "either", ParenDS, {"," ParenDS}, ", or" ParenDS
           | ParenDS, {"," ParenDS}, ",", ("and" | "but"), ParenDS;

Conditional clause.
The word if followed by a declarative sentence.
Conditional = "if", Declarative;

Declarative sentence.
A a simple declarative, a complex declarative, or a compound declarative:
Declarative = SimpleDS | ComplexDS | CompoundDS;

Existential noun phrase.
Either the word something or someone followed by an optional name declaration, the word the followed by a functional noun, an optional name declaration, the word of, and a list; or one of the four words a, an, some, or another followed by a term.
ExistentialNP = ("something" | "someone"), [NameDecl]
              | "the", FunctionalNoun, [NameDecl], "of", List
              | ("a" | "an" | "some" | "another"), Term;

Interrogative sentence.
An optional conditional clause and comma followed by either a WH-phrase and a verb phrase or the phrase is it true that and a declarative sentence.
Interrogative = [Conditional, ","],
                ( WhPhrase, VerbP
                | "is it true that", Declarative);

Either one simple noun phrase, optionally followed by the word and and another simple noun phrase, or a parenthesized list of one or more simple noun phrases, each followed by a comma, and either an ellipsis or the word and followed by either the word others, the phrase nothing else, the phrase no one else, or a simple noun phrase.
List = SimpleNP, ["and", SimpleNP]
     | "(", SimpleNP, ",", {SimpleNP, ","},
       ( Ellipsis
       | "and", ("others" | "nothing else" | "no one else" | SimpleNP)), ")";

Logical prefix.
Either the word for followed by a universal noun phrase and a comma, the words there is followed by an existential noun phrase and the words such that, or the words it is false that.
LogPrefix = "for", UniversalNP, ","
          | "there is", ExistentialNP, "such that"
          | "it is false that";
Name declaration.
A variable or the word "named" followed by a word or a quoted name.
NameDecl = Variable | "named", (Word | QuotedName);

Negated existential noun phrase.
Either the word something or the phrase no one followed by an optional variable or the word no followed by either a term or a functional noun, an optional variable, the word of, and a list.
NegExistentialNP = ("nothing" | "no one"), [Variable]
              | "no", (Term | FunctionalNoun, [Variable], "of", List);

Noun Phrase.
One of four kinds:  existential, universal, negated existential, or referential.
NounP = ExistentialNP
      | UniversalNP
      | NegExistentialNP
      | ReferentialNP;

Parenthesized declarative sentence.
A declarative sentence in which any compound or complex declarative sentence is enclosed in parentheses:
ParenDS = (SimpleDS | "(", ComplexDS, ")" | "(", CompoundDS, ")" );
Zero or more prefixes followed by a sequence of one or more declarative sentences separated by semicolons and ending with a period.
Paragraph = {Prefix}, Declarative, {";", Declarative}, ".";

Predicate complement.
An optional not followed by either an adjective, a simple noun phrase, a comparison, or a prepositional phrase.
PredComp = ["not"], (Adjective | SimpleNP | Comparison | PrepP);
An place specification, a time specification, or a logical prefix.
Prefix = Place | Time | LogPrefix;

Prepositional phrase.
A preposition followed by a list.
PrepP = Preposition List;

Referential noun phrase.
Either a name or the word the or that followed by a noun and an optional name.
ReferentialNP = Name
              | ("the" | "that"), Noun, [Name];

The word that or who followed by a verb phrase.
RelativeClause = ("that" | "who"), VerbP;

Either declarative, interrogative, or imperative.
Sentence = Declarative | Interrogative | Imperative;

Simple declarative sentence.
Either a sequence of zero or more prepositional phrases, each followed by a comma (none of which may begin with the preposition for) followed by a noun phrase and a verb phrase; or the phrase there is followed by either an existential noun phrase or a negated existential noun phrase.
SimpleDS = {PrepP - ("for", SimpleNP), ","}, NounP, VerbP
         | "there is", (ExistentialNP | NegExistentialNP);

Simple noun phrase.
Either an existential noun phrase or a referential noun phrase.
SimpleNP = ExistentialNP | ReferentialNP

Simple verb phrase.
One of five kinds:  be-VP, have-VP, cause-VP, active-VP, passive-VP. A be-VP consists of is and either a predicate complement optionally followed by and and another predicate complement or the word either, a predicate complement, zero or more occurrences of a comma and a predicate complement, an optional comma, the word or, and a predicate complement. A have-VP consists of either has or does not have, a simple NP, and an optional word as followed by a noun. A cause-VP consists of either causes or does not cause, an existential NP, an optional not, the word to, an infinitive verb, and a verb complement. An active-VP consists of either a singular verb or does not and an infinitive verb, and a verb complement. A passive-VP consists of is, an optional not, a past participle, an optional simple NP, and zero or more prepositional phrases.
SimpleVP = "is", ( PredComp, ["and" PredComp]
                 | "either", PredComp, {",", PredComp},
                   [","], "or", PredComp;
         | ("has" | "does not have"), SimpleNP, ["as", Noun]
         | ("causes" | "does not cause"), ExistentialNP
           ["not"], "to", VerbInf, VComplement
         | (VerbSing | "does not", VerbInf), VComplement
           [SimpleNP, [SimpleNP]], {PrepP}
         | "is", ["not"], VerbPastPart, [SimpleNP], {PrepP};

Zero or more adjectives followed by a noun, an optional name declaration, and an optional prepositional phrase or a relative clause.
Term = {Adjective}, Noun, [NameDecl], [PrepP | RelativeClause].

A sequence of any number of headings and extended sentences. An empty text consisting of none is permitted.
Text = {ExtendedSentence | Heading};

Universal noun phrase.
Either one of the words everything or everyone followed by an optional variable; or the word every followed by a term.
UniversalNP = ("everything" | "everyone"), [Variable]
            | "every", Term;

Verb complement.
Either an optional name and a "that"-clause as the object of the verb or an optional indirect object an optional direct object and zero or more prepositional phrases that modify the verb.
VComplement = [Name] "that" Declarative
            | [SimpleNP, [SimpleNP]], {PrepP}

Verb phrase.
One of four options:  (1) a simple verb phrase, optionally followed by and and another simple verb phrase; (2) the word either followed by one or more simple verb phrases separated by commas followed by an optional comma, the word or, and a simple verb phrase; (3) the word is followed by a predicate complement, the word and, and a predicate complement; or (4) the words is either followed by a predicate complement, zero or more occurrences of a comma and a predicate complement, and finally an optional comma, the word or, and a predicate complement.
VerbP = SimpleVP ["and", SimpleVP]
      | "either", SimpleVP, {",", SimpleVP}, [","], "or", SimpleVP
      | "is", PredComp, "and" PredComp
      | "is", "either", PredComp, {",", PredComp}, [","], "or", PredComp;

Either one of the words who, what, or when or the word which followed by a term.
WhPhrase = ("who" | "what" | "when")
         | "which", Term;

7.4 Ontological Extensions

The ontological extensions to CLCE add syntactic categories that depend on ontologies for space, time, and modality.

A date, such as "4 July 2007" or "Thursday, 15 March".
Date = ( DayOfWeek, ["," DayOfMonth, Month, [Year]]
       | DayOfMonth, Month, [Year]), ",";
An hour, such as 17:30:07.3268 UTC with seconds optional. This is a lexical category, in which no internal blanks are permitted.
Hour = Digit, [Digit], ":", Digit, Digit,
       [":", Digit, Digit, [".", Digit, {Digit}]];
A preposition followed by an existential NP that names or describes a place.
Place = ("at" | "in" | "on"), ExistentialNP.
A time specified by a name of a particular time or by a date and/or an hour.
Time = ( "at", Name
       | "on", Date, [ ",", "at", Hour, [TimeZone]]
       | "at", [Date, ","] Hour,
       | "in", [Month, [Year] | "the Year", Year],

7.5 Declarations

7.6 Example

Following is a sample narrative that uses the new features.

There is an organization named 'The National Hurricane Center';

In a city named 'New Orleans', in August 2005, {

   There is a mayor of New Orleans named Nagin;
   There is a hurricane named Katrina.

   On Friday, 26 August,
   The National Hurricane Center predicts
   that Katrina hits New Orleans.

   On Saturday,
   Mayor Nagin calls for a voluntary evacuation of the city.

   On Sunday,
   Mayor Nagin orders an evacuation of New Orleans.

   On Monday,
   Hurricane Katrina hits New Orleans;
   The hurricane causes a breach in a levee;
   Water flows through the breach;
   The water floods the city.
Note the following points about the sample CGIF below.
[Situation *g_1] [City *g_2 "New Orleans"] (Loc ?g_1 ?g_2)
[Month *g_3 "August 2005"] (In ?g_1 ?g_3)
[Situation ?g_1

   [Organization "National Hurricane Center"]
   [Mayor Nagin] (Has ?g_2 Nagin)
   [Hurricane Katrina]

   [Situation *g_4] [Friday *g_5 "26 August 2005"] (Dur ?g_4 ?g_5)
      [Predict *g_6] [Proposition *g_7]
      (Agnt ?g_6 "National Hurricane Center") (Thme ?g_6 ?g_7)
         [Hit *g_8] (Efct ?g_8 Katrina) (Ptnt ?g_8 ?g_2)] ]

   [Situation *g_9] (Next ?g_4 ?g_9) [Saturday *g_10 "27 August 2005"] (In ?g_9 ?g_10)
      [CallFor *g_11] [Evacuate *g_12] [Voluntary *g_13]
      (Agnt ?g_11 Nagin) (Attr ?g_12 ?g_13) (Thme ?g_12 ?g_2) ]

   [Situation *g_13] (Next ?g_9 ?g_13) [Sunday *g_14 "28 August 2005"] (In ?g_13 ?g_14)
      [Order *g_14] [Evacuate *g_15]
      (Agnt ?g_14 Nagin) (Thme ?g_14 ?g_2) ]

   [Situation *g_16] [Monday *g_17 "29 August 2005"] (Dur ?g_16 ?g_17)
      [Hit *g_17] (Efct ?g_17 Katrina) (Ptnt ?g_2)
      [Cause *g_18] [Breach *g_19] [Levee *g_20]
      (Efct ?g_17 Katrina) (Rslt ?g_18 ?g_19) (In ?g_19 ?g_20)
      [Water *g_21] [Flow *g_22] (Matr ?g_22 ?g_21) (Thru ?g_22 ?g_19)
      [CauseFlood ?g_23] (Efct ?g_23 ?g_21) (Loc ?g_23 ?g_2) ]