On: raising the semantic level of a program
Stan Sieler
sieler at allegro.com
Fri Jun 26 19:20:19 CDT 2020
A friend kindly searched and found an interesting paper from 1973,
Programming by semantic refinement
<https://dl.acm.org/doi/abs/10.1145/390014.808298> JB Morris - ACM SIGPLAN
Notices, 1973 - dl.acm.org.
https://dl.acm.org/doi/pdf/10.1145/390014.808298
While an interesting paper, it's going the opposite direction (essentially,
going from an English language description down to a final programming
language).
But, using the L1 (highest level language), L2, ..., Ln (lowest level
language) concept, I can phrase my concept better ... so ...
Most programmers write at, say, the level of L3.
They might write something like:
mem [foo].head = something
My "raising the semantic level" would be:
#define HEAD(x). mem [x].head
...
HEAD (foo) = something
With a fair set of macros like that (HEAD, TAIL, etc), the program is now
effectively written in a "new" language, L2 (a higher level language than
L1).
Being written in L2, the resulting code is more readable to everyone,
partially because they aren't continually seeing the implementation of how
".head" / "mem" work/interact.
In effect, the programmer has added a feature (linked list handling,
perhaps) to L3 ... for that particular program, seemingly extending/raising
the level of the language.
It's that concept that I thought I saw sometime in the early 1970s :)
thanks,
Stan
More information about the cctech
mailing list