The Linguistic Approach to System DescriptionYou are doing a software project. How should you structure its documentation? What guiding principles should be used for creating and structuring its documentation? Should you include project-planning documents in it?
I propose the "Linguistic Paradigm for System Description" here. It may have been proposed before, but probably not in exactly the same form. It is a tool for thinking about not only of documentation, but the structure of "systems" in general.
Note that we have computer applications which we often call "systems". Then we have project planning (documents, models) to help the creation of such systems in an orderly manner. But a project plan can also be seen as a system on its own. It has components that relate to each other, rules for its actors to follow, conditions and events that trigger further actions. Executing a well-defined project plan is really executing a program.
I focus here on system descriptions in general, whether those systems be computer programs or procedures and plans for creating them.
Before getting too philosophical here's the structure of documentation I advocate:
And now the explanation and purpose of each:
A computer system is a "smart system" that helps us in some way. Because it is 'smart' we are able to control it via some kind of language. What kind of language? What primitives and command-sequences can we use to communicate with it? Describing that, means describing the SYNTAX of the language that controls the system.
For a graphical application (aren't they all?) this would mean describing its GUI controls and dialogs. In what sequence can they be exercised? As an example, to choose an item from a menu, you first need to click something else to get the menu to pop up. Thus we can see that a user-interface defines a SYNTAX for how you can interact with the system.
Therefore the SYNTAX -section of our documentation is there there to describe how users will and can INTERACT with the system. It is important to describe this 'boundary' of the system separately from what is inside it, to keep it not too dependent on how it is implemented.
The actions that users can perform on a GUI, or on a command-line have some MEANING, called its SEMANTICS. That means (pun intended) what those actions cause. What the user hopes to accomplish with them? What is the intention of the user, when activating certain UI controls?
For the user to hope to accomplish something by some action, they need a "mental model" of the concepts they are manipulating by their actions. That mental model, the available actions on it and expected results CREATES meaning, the semantics, of the user-actions.
Syntax describes what the user does or can do. Semantics describes why a user would do it.
So we have a language, described by both its syntax and its semantics. But who understands that language? The part of the system that reacts to the user interactions, implemented as code, is the part that 'understands' it. We call it the INTERPRETER.
We use the term interpreter here in a more general sense, than parser/lexer/interpreter/compiler used in computer science. Systems INTERPRET the messages they receive BY REACTING to them.
Think of calling a function or procedure as a linguistic act. It transforms the function-call to another form, consisting of other calls to other functions. Thus executing a computer program can be seen as a continuous, recursive process of interpretation.
The end-result of interpretation must be some way of arriving at the "meaning" of the commands used by the user. The system however does not need to produce some other final representation of the meaning. The meaning of the commands is really what they do, how they are executed, what is their effect.
Thus, meaning is born by the fact that the system reacts in a specific way to user-inputs, and that the user expects it will react that way. The part of the system that produces these reactions is the code that reacts to the inputs. In our paradigm we call that code the 'interpreter'.
In summary the meaning of user-actions is defined by their effects, and results.
- Syntax = What actions user can do
- Semantics = What effects user-actions have
You've gone through three out of four sections of the documentation. But nobody has even told you why the system exists at all. What are the benefits of it?
Maybe you can infer some of those benefits by having understood what a user can do with the system (SYNTAX), and how the system will react (SEMANTICS). But shouldn't we also tell WHY the system was created? Yes. But not in the first 3 sections. Why not? Because REASON the system was built is not PART of the system. But, describing why our system exists is a relevant for understanding it. Therefore that is explained in the META-section of the documentation.
The META -section is information "about" the system like why and how the documentation was created, which means describing why the system was created in the first place. It includes project plans, procedures, methodology, history, personnel, cost-benefit analyses etc.
Our purpose here is to come up with a rationale as to what information should be put into each section of documentation. Their order does not matter so much - except to make clear that META -section differs from others on a conceptual level. The META -section is not a 'blueprint' of one part of the system. The system does not have a PART called 'meta'.
Meta is information about the system, not part of it. The other three sections SYNTAX, SEMANTICS, INTERPRETER in contrast, are all "blueprints" of the system.
Recursive System Descriptions
One thing to note about the above way to describe and documents systems is that it can be applied recursively, on multiple levels of the system. The INTERPRETER is the part of the system where most of its work gets done. It is typically implemented as a set of interacting SW-modules.
But each such module can be described as a system of its own, with its SYNTAX, SEMANTICS, INTERPRETER and META. The SYNTAX of a software module describes its 'methods' and the data-structures they consume and produce. It SEMANTICS is described by telling for each method how its results related to its arguments, and what side-effects it has. The private sub-modules inside a module, are its INTERPRETER.
© 2013 Panu Viljamaa