Blog » Programming Language Semiotics
Posted on 10 Feb 2009 13:20
In a recent posting to the haskell-cafe mailing list, Richard O'Keefe put his finger on a major problem that afflicts most if not all expositions of Haskell's evaluation semantics with respect to IO operations:
We need some standard terminology to distinguish between *evaluating* an expression and *performing* the result of an expression of type IO something.
This is a specific example of a more general problem with the standard idioms of programming language semantics. Traditional mathematical approaches - denotational, operational, algebraic, etc. - have one thing in common: they are purely "dyadic", to borrow a term of art from semiotics. They are founded on binary oppositions like language v. semantic domain, term v. denotation. But program texts resist such narrowly focussed conceptualizations. They have too many layers or dimensions of meaning. Terms like "evaluation" tend to be ambiguous, since they are so general.
Consider something as simple as the constant '3'. It's a symbol; it denotes a well-known, cleanly delimited value. But it also "means" a bit pattern in memory (its physical representation); that bit pattern in turn may have multiple meanings. It may be an opcode that "means" addition or some other operation on the architecture. It may be an opcode with a different meaning on another machine. It may have a different meaning for various peripheral interfaces. More importantly, it has a meaning for the author of the text. It may be used with its "standard" (i.e. mathematical) meaning, but it also may be used as an element of some kind of code; it may mean "status complete" or "account suspended" or anything else. It may mean '7', if the author is a perverse obfuscator.
With IO terms the situation is even more complicated. A term like "putChar 'c'", as Richard pointed out, is associated with at least two things: a "value" (meaning, I believe, something like closure/suspension/thunk), and an event ('a' appears on the user's screen), corresponding to evaluation and performance, respectively, to use Richard's terminology.
The fundamental problem is that the meaning of a program text involves at least three elements, not just two; it always involves an interpreter (the author, reader, execution environment, or other) in addition to the text and its denotation. In other words, we should think of programs not as dyadic denotational systems, but as communication systems involving multiple players and relations. A program is not just a denotational text; it is a sign.
Semiotics is usually defined as the study of signs, signification, communication systems, and the like. Regardless of its academic status, it provides a rich stock of concepts and terminology that should be useful for both the formal and informal descriptions of programming language meanings (I almost wrote "semantics"). In particular, its elaboration of concepts like "expression", "sign", "denotation" and the like is highly sophisticated, and accommodates the communicative aspect of such terms that a "programming semantics" approach has trouble capturing. A sign involves not just the signifier and signified, but also an "interpretant" (meaning the idea the interpreter forms about the signified, if I'm not mistaken), a code, and various other elements. It covers just about every thing a semantics approach covers - extension, intension, expression, etc. - but from a different and valuable perspective. For semiotics, a semantic system is only one component of a larger system of meaning(s).
For a simple example, we can use it to make a distinction between terms like '3' and terms like "putChar 'a'". The former has a stable, conventional denotation; that makes it a symbol in Pierce's terminology. The latter is not a symbol by this definition; it would more appropriately be called a sign, or maybe an example of a particular sign class. We could elaborate further by describing the "codes" that construct the meanings of symbols and signs. In an exposition that defines its terminology using the language of semiotics, such distinctions may turn out to help avoid the ambiguities and code-shifts common to traditional semantics-based expositions. I can't yet say for sure, but it seems like a promising approach. It even seems possible that formal modeling (as opposed to notation and exposition) might find useful structuring devices in semiotics.
To sum up, semiotics might provide a clear, structured way to talk about the many elements and relations involved in the "meaning" of a program text, with a discipline that traditional approaches often lack.
A web search on "semiotics" will find many lexicons, tutorials, etc.
Like this entry?
Leave a comment
This is a really interesting idea. You might want to finish it out into a full paper and submit it here: http://onward-conference.org/calls/foressays . It seems like a perfect fit for that venue.
I am so grateful to read this such a wonderful post.
http://www.nikerbo.com
http://www.jordanhut.com
http://www.bestmonclerhut.com
Write very good! Back Up.
Discount Sunglasses http://www.bestsunglassesbrand.com
Moncler Down http://www.frbestmoncler.com
Sunglasses for Glasses http://www.worstsunglassesbrand.com
Discount Nike Sneakers http://www.nikerwo.com
If you are still searching such a replica handbags, cheap oakley sunglasses the Marc by Marc Jacobs Damisi Patchwork Hermes Bags is a nice choice to amp up your city look. Get on the bandwagon now, because the Chloe Cary Satchel has a ton of it bag potential. Because of the distinctive detailing around the bottom zippers, I could see this satchel being turned into lots of other LV Monogram Multicolor Bags shapes – hobos, totes, maybe even a mini crossbody. oakley sunglasses store cheap And the fresh orange color would be a vivid and fresh addition to your outfits of fall and winter seasons. The round outside zip pocket works harmoniously with the topstitching details, so special and interesting. Lined in fine cotton, the interior is designed with two inside open pockets for your cell phone, keys or cards etc. And finally I will tell you the most exciting news that this stylish, oakley sunglasses outlet cheap unique marc Jacobs Valentino Handbags is only sold at $398.
I earnestly hope to lead a healthy and prosperous life in the future. cheap oakley sunglasses Judging from my aptitude inclination and personality streaks, my ideal life will be that of a scientist, researching, lecturing, and writing books. As I am from a farming family, I particularly enjoy being close to earth. If I can afford to live a pastoral life in the countryside, I will feel most blessed. oakley sunglasses sale uk As far as social life is concerned, simplicity is what I intend to pursue, so I really don't need too many friends. All these will be mere talk if I am idle now. To attain my goal, I must make a point of training my body and mind. This is a highly competitive society in which everyone is eager to come out on top. That is not only a competition of physical strength and mental power, but a marathon of patience, faith, and perseverance. cheap oakley sunglasses uk Life is not all roses, but with what I am being equipped with by the top teachers in this elite school, I surely deserve a promising prospect.
However mean your life is,Best Gucci handbags sale meet it and live it; do not shun it and call it hard names. It is not so bad as you are. It looks poorest when you are richest. The fault-finder will find faults in paradise. Love your life,poor as it is. Cheap designer handbags share You may perhaps have some pleasant,thrilling,glorious hourss,even in a poor-house. The setting sun is reflected from the windows of the alms-house as brightly as from the rich man’s abode; the snow melts before its door as early in the spring. Online Brand Name Designer I do not see but a quiet mind may live as contentedly there,and have as cheering thoughts,as in a palace. The town’s poor seem to me often to live the most independent lives of any. May be they are simply great enough to receive without misgiving. Discount Overcoats Store Most think that they are above being supported by the town; but it often happens that they are not above supporting themselves by dishonest means. which should be more disreputable. Cultivate poverty like a garden herb,like sage. Do not trouble yourself much to get new things,whether clothes or friends,Turn the old,return to them. Things do not change; we change. Moncler Coat Sell your clothes and keep your thoughts.
Post preview:
Close preview