The coNCePTuaL language was designed to produce precise specifications of network correctness and performance tests yet read like an English-language document that contains a hint of mathematical notation. Unlike more traditional programming languages, coNCePTuaL is more descriptive than imperative. There are no classes, functions, arrays, pointers, or even variable assignments (although expressions can be let-bound to identifiers).9 The language operates primarily on integers, with support for string constants and floating-point numbers in only a few constructs. A coNCePTuaL program merely describes a communication pattern and the coNCePTuaL compiler generates code to implement that pattern.
As a domain-specific language, coNCePTuaL contains primitives to send and receive messages. It is capable of measuring time, computing statistics, and logging results. It knows that it will be run in a shared-nothing SPMD10 style with explicit message-passing. As a result of its special-purpose design coNCePTuaL can express communication patterns in a clearer and terser style than is possible using a general-purpose programming language.
The coNCePTuaL language is case-insensitive. Hello
is the same as HELLO
or hello
.
Furthermore, whitespace is insignificant; one space has the same
meaning as multiple spaces. Comments are designated with a
‘#’ character and extend to the end of the line.
We now describe the coNCePTuaL grammar in a bottom-up manner, i.e., starting from primitives and working up to complete programs. Note that many of the sections in this chapter use the following syntax to formally describe language elements:
• Primitives: | Identifiers, strings, and integers | |
• Expressions: | Ways to combine primitives | |
• Task descriptions: | Selecting groups of tasks at once | |
• Communication statements: | Sending and receiving messages | |
• I/O statements: | Relaying status and logging results | |
• Counter and timer statements: | Measuring how long an operation takes | |
• Complex statements: | Combining statements into larger entities | |
• Other statements: | Statements for neither communication nor I/O | |
• Header declarations: | Language versioning and command-line parsing | |
• Complete programs: | Arguments + complex statements = programs | |
• Summary of the grammar: | Repeat of the EBNF rules that appeared above |
coNCePTuaL is not even Turing-complete. That is, it cannot perform arbitrary computations.
Single Program, Multiple Data