Mapping Theory To Runnable Models

last modified: November 3, 2014

Based on discussion at TypesAndAssociations.

Re: "I am summarising..." - That's the problem, the reader can't see the details that go into the summary. And one book does not a canon make. It is possible to do proper textual analysis of multiple sources, but you have skipped that work, and then harass me for not accepting your authoritative summary. Either do it right or pipe down about canons. Put some real details behind your claims like the "proper" academic you claim to be. [reworked from original]

See pages 12, 13 and 283 of http://www.dcs.warwick.ac.uk/~hugh/TTM/DTATRM.pdf Their terminology (and writing style) is slightly nuanced, as reflects its academic audience and subject matter. Almost any standard 1st year text on ComputerScience will provide equivalent conventional explanations.

It describes a theoretical or conceptual model. I have no problem with that per se, but one book does not make it a canon, nor says anything about runnable models. We can pretend there is only one integer value "12" in the universe in a kind of existential sense (as described by the link, particularly page 13), but it's usually not PRACTICAL for a runnable model to reference a single instance of that "12" in order to mirror this existential uniqueness. Your model doesn't do it nor does mine. (For example, we could make a giant list of all known integers, or at least a "test set", and only reference them via pointers/ID's instead of putting values like "12" directly "in" our data structure for a variable/value.) -t

Even IF one accepts the existential canon that there is one and only one value "12" in the universe, no practical model can mirror that conceptual view. Even YOU chose not to in your model, duplicating "12" if two more variables share the "same value" of 12. I'm not going to complicate my model to mirror an existential view either. You took the practical route for "12", but why won't you accept the same "reality/practicality adjustment" for the structuring of a "variable"? -t

It appears to be hypocrisy at face value. I suppose you could argue that mirroring the (alleged) existential canon view of "values" (with type indicator and "representation" packaged closely together) is far easier than modeling the existential uniqueness of integer values (and reals, gulp) and thus you follow existential theory (ET) for the easier-to-model portions but not the hard-to-model portions of ET. This is a reasonable rule in my opinion, but I'd like confirmation this is the case with your design. My model is optimized for behavior prediction (IoProfile) and not ET. Thus, I chose not to complicate it to match ET. Most production developers don't care about ET and are not going into academics. -t

I have no idea what that means. "Existential theory"???

Perhaps there is a better word for it. Quote from page 13 of your link:

We "pretend" there is only one "instance" of 12 in the universe, per theory of integers.

How many different twelves are there? Last time I checked, there was only one, between eleven and thirteen.

In existential theory-land, yes. But not in Practical Land. You didn't choose to model values around that uniqueness concept.

It simply isn't an issue; the standard model doesn't consider it or not consider it. It is sufficient for a variable to be a reference to a value. Whether two variables reference the same value or different values is immaterial.

I'm not clear on this. Are you saying in some cases it's "okay" to violate OnceAndOnlyOnce, but not in others (outside of wrong final results)?

It simply doesn't apply. It's an abstraction, not an implementation. There's no need, at an abstract level, to define how (or if) OnceAndOnlyOnce is implemented, because even if we define a system in which there are multiple value implementations that each represent the integer 12, we presume they all demonstrate equality, and thus the perception will be that there is one 12.

If only the final perception (I/O) matters, then why complain about other models that have matching IoProfiles (match interpreter behavior), but don't (allegedly) "fit" the abstraction notions very well. You seem to be cherry-picking which deviations from the "proper abstract model" are acceptable deviations for runnable models and which are not.

This has nothing to do with I/O. I didn't mention I/O. It's about semantics. At an abstract level, semantically, every integer value 3 is the same integer value 3.

What do you mean by "perception" then? Who's perception? The language user (runner of the emulator) or the model administrator/analyst? And we have a very different viewpoint about what "semantics" means such that using that word around me from you is unlikely to convey any useful communication. Per prior ThreadMesses, to me, semantics happens "in the head", not (typical) machines. It's not something that can (currently) be objectively and/or scientifically analyzed.

I mean the user's (i.e., the reader's) perception of the model. If the model is implemented, then it's the user's perception of the resulting system. As a user of a typical imperative programming language, I can't see whether the 3 in variable V is represented by the same internal object as the 3 in variable P or a different one, but it doesn't matter. 3 is 3.

If semantics "happens in the head, not (typical) machines", then it seems we're imagining a lot of working interpreters and compilers. Semantics is a mapping from syntax to meanings. "Meaning" (I use the term loosely, here) happens in two places. One is what syntax means to us, e.g., "v = 3" means "3 is assigned to v". The other is what happens in the machine, e.g., "v = 3" results in a sequence of operators to be executed that causes a value 3 to be stored at a memory location associated with the variable identifier 'v'. Obviously, there needs to be an alignment between these, so that the semantics defined by a language designer are sufficiently detailed -- or make obvious reference to conventional semantics -- that a language implementer can translate the syntax into machine operations that recognisably and consistently implement the semantics.

Re: "we're imagining a lot of working interpreters..." - In a sense, yes. Our human brains define "working". The machines are just idiot savants. And "what happens in the machine" shouldn't matter as long as it processes the inputs (source and data) into the proper (human expected) output. If it uses gerbils, Osmond action figures, dental floss, and sun-dials, it shouldn't matter as long as it gives the right answer. If the guts do matter, then we need to identify when and why they matter. "Expected behavior" != Semantics. ("Behavior" being patterns of response to a given environment, where "environment" is typically the source code and any input data in this context.)

I've not mentioned anything about how a language implements the semantics of the language. You're right, it shouldn't matter, and it is orthogonal to this discussion.

You seem rather inclined to add complexity and philosophy to what is very simple and mechanical: Popular imperative programming languages have parts, and those parts have conventional names and behaviour, which are generalisations of what bits of code mean in source code, and what happens when the source code is executed.

We disagree on what this "conventional" is, where it is documented, and how to "properly" interpret such documents. They are vague, per my understanding of the English they use. And your arguments do appear to depend on philosophy. I didn't make that dependency happen.

That dependency appears to be solely your own interpretation, and you appear to erroneously conflate "abstract" with "vague".

If the writing is INTENDED to have a relationship to abstract theory, that relationship is not made clear. I have no problem with authors tying documentation of specific languages to abstract theory; but IF they go that route, then do it right: write clear, make relationships clear, don't assume anything. If you are going to tie, then tie right. Don't use a lazy slippery knot. If "has" in your book means something special beyond regular English, then friggen STATE SO.

I have no idea what that means.

Let's take it one word at a time. What's the first word or phrase that stumps you?

The words make sense, but the overall meaning is lost. What is the problem with "has"? What is not clear about relationships? If you want the concise clarity of a formal notation -- which shows relationships and associations as tuples -- it's at the bottom of TypeSystemCategoriesInImperativeLanguages.

But you are choosing an arbitrary representation/model, per VagueOrArbitrary. I've already explained the problem with "relationship" multiple times. EVERYTHING in a program is related to each to some degree, for example, because being in the same program is a relationship itself.

The framing of the relationship is self-evident, and it's neither vague nor arbitrary. Again you appear to be confusing "abstract" with "vague". If I say a value is associated with a type, it's quite evident that I mean something more than they're in the same program, especially if I haven't otherwise mentioned programs.

No, it's not "self-evident". Based on historical patterns and experience-based "intuition" around certain programming language families or topics, I may be able to make a similar guess to yours, but that's not the same as "self evidence". Spell out any assumptions: put everything on the table.

It is spelled out. Given "A is associated with B", or "A is related to B", or "A has B", if we know A, we know B.

What do you mean by "know"? Had drinks with after work?

In any context where "A is associated with B", or "A is related to B", or "A has B" is used, it always means the same thing: Given an A, we can answer questions about B. If it helps, pretend it's a table with two columns A and B where A is the primary key.

The devil is in what A and B actual "are" in a given model, and what questions we can answer both on a practical level and in theory.

No, "the devil" isn't in what A and B actually "are". If we say "A is associated with B", or "A is related to B", or "A has B", then we mean precisely that given A we know B, just as if we were given B.


[1] Re: "consistent form" - For example it may internally simplify an expression using logical or mathematical and/or "caching" deduction so that it internally only needs say 2 intermediate values, where-as we would need 5 if we did it "traditionally" on paper without the expression simplification or caching cheats. I will agree that existing technology needs some kind of value(s) to perform computations, but the nature of them and their relationship to syntax and data that the language user can actually see is open-ended. The machines' solving steps and processes don't have to match the "semantics" we learn in school on paper.


CategoryMostlyOffTopic

The topic is the page name.

Phew - I thought it may develop into another argument sub-thread. I only added the category because I liked the PageName and was a little disappointed at the contents. I know I could put in my opinion of what the page could contain (and I may later), at present I am reluctant because I don't want to be involved in the arguments. I liked the PageName because MappingTheoryToRunnableModels is, to me, a good summary of ApplicationDevelopment.

{MappingTheoryToRunnableModels describes the actual problem better, in my opinion. Others seem to see "the problem" in a different light, however. Titles sometimes make or echo assumptions that different contributors may not agree with. That's life in virtual CyberLand. -t},


Loading...