Interpretive Interface

This section is about problem solving with layers of software. To discus software we begin with the hardware. The general purpose computer really is an amazing machine. It has a few hundred instructions it can execute and can do about anything that can be done with sequential logic. The computer operates by changing stored voltage levels between a few tenths of a volt and a couple of volts. These are interpreted as the logical values false and true or the numeric values 0 and 1.


Machine Code

The computer is programmed by various combinations of 1s and 0s which it interprets as machine instructions. General purpose computers operate on binary numbers.


Have you seen the T-shirt that says; There are just 10 kinds of people. Those that understand binary and those that don't.
When I was much younger, I could program a computer by entering 1s and 0s into a console of switches on the front of the computer called the console one instruction at a time. This is not to hard to do, but is almost impossible to understand once you have programmed it. My first professional software project was writing machine code for 3 years.

Assembler

Later we procured an assembler which is a computer language and program that directly corresponds to the computers hardware instruction set. You write instructions like add, mov, jmp into a file and let a program called an assembler convert the words into the numeric equivalents. The 1s and 0s output called the object or binary is then loaded into the computer much faster than by hand. Ultimately the consoles went away, along with all the lights, and computers got really boring.

Don't fall asleep I am going to make a point here. Now then you could write fairly long programs but it took long programs to do about anything. So we are now 2 levels removed from the hardware.

Compiler

One day someone came up with the idea that you could combine short sets of assembler instructions into more abstract operations. A compiler interprets higher level constructs into sequences of assembler instructions. Then the assembler is called to convert these into binary which is loaded into the computer to execute. We still use compilers some of which were written 30+ years ago. Most compilers are very general and are suited for solving a wide range of problems. The problem is that their generality requires many many instructions to solve significant problems. An improvement over assembler languages, but not by very much. Some years back someone thought we needed a new generation of languages called 4GL, later still the notion of 5GL appeared. The idea was good.

InterpretiveInterface.gif

New levels of abstraction to solve higher level problems. SQL might fit in one of these categories.

Each layer provides an interpretive interface for the language above it. I am not the first to think of this but what if you tried to carve off a set of problems, say by industry sector, and asked what language would suit this set of problems? IBM did just that several decades ago by declaring there shall be COBOL, PL1 and FORTRAN. COBOL was to be for business accounting, FORTRAN for science and PL1 for everyone else. The reason you rarely hear of PL1 is that it was so large no one but IBM could produce a compiler for it. Great ideas but they did not go far enough.

Domain Specific

Then back in the 80s some guys came up with VisiCalc, one of the first spreadsheets. This was an amazing program, an accountant's dream. Why? because it worked the way accountants have always worked, with rows and columns of numbers. I would guess that most accountants in industrialized countries are familiar with the electronic spreadsheet.

Unfortunately, almost every engineer uses spreadsheets as well. This is unfortunate because it is not exactly the paradigm of the engineer, but it is close enough that it is very widely used. This says to me that there is a missing language, no a large number of missing languages that address the concepts of various problem domains. This is not to say that there are not such languages today, but that there are many developers who think that there are already too many languages when the truth is that there are not enough. Lab View is an example of domain specific languages. It has the same control constructs as general purpose languages but they are represented in a form more familiar to hardware designers.

So, if your job is to solve problems in a significant problem domain, then try to write the language that operates in it then build interpreters back down to the compilers and interpreters of your choice.

Back | Next



Copyright Spidel Tech Solutions, Inc. 2004 All Rights Reserved.  Updated: 7/11/2009 12:15:13 AM Idx: 2054 Site Design STS

This site is the home of Spidel School of Design
Please visit the Spidel Tech Blog.