home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / misc / 1006 < prev    next >
Encoding:
Text File  |  1993-01-06  |  15.3 KB  |  327 lines

  1. Xref: sparky comp.os.misc:1006 comp.theory:2803 comp.lang.misc:4088 alt.lang.asm:532
  2. Nntp-Posting-Host: gyda.ifi.uio.no
  3. Newsgroups: comp.os.misc,comp.theory,comp.lang.misc,alt.lang.asm
  4. Path: sparky!uunet!mcsun!sunic!ugle.unit.no!nuug!ifi.uio.no!olag
  5. From: olag@ifi.uio.no (Ola Fosheim Groestad)
  6. Subject: PROTOLO A FUTURISTIC OBJECT-CODE FORMAT
  7. Message-ID: <1993Jan6.172707.14435@ifi.uio.no>
  8. Keywords: languages,objectcode
  9. Sender: olag@ifi.uio.no (Ola Fosheim Gr|stad)
  10. Organization: Dept. of Informatics, University of Oslo, Norway
  11. Date: Wed, 6 Jan 1993 17:27:07 GMT
  12. Lines: 312
  13. Originator: olag@gyda.ifi.uio.no
  14.  
  15.  
  16.  
  17. GROESTAD93.1                                    Oslo, 6th of January 1993
  18.  
  19.         A SKETCH OF AN ARCHITECTURE-INDEPENDENT OBJECT-CODE-FORMAT
  20.                                     by
  21.                             Ola Fosheim Groestad
  22.                               (olag@ifi.uio.no)
  23.  
  24. You may use any information found in this document for whatever you want,
  25. but if you do you should provide a reference to this document and it should
  26. be refered to as "GROESTAD93.1".  This is to ensure that all references to
  27. it are consistent.
  28.  
  29.  
  30. PREFACE
  31. -------
  32.  
  33.     The trend in computer science is open systems.  This is reflected in
  34. the major computer languages and operating systems as well as the major
  35. graphical user-interfaces.  The only major part of a computer where there
  36. still is no sign of a common structure is the processor design and thus
  37. also in the binary object-code-formats.  This must indeed change in the
  38. future.  Since I don't believe in an unified processor-structure, I have
  39. worked out a sketch for an object-code-format that should be architecture
  40. independent, but still cater for special abilities in any given system.
  41. I've called this sketch PROTOLO.
  42.     I must emphasize that I have neither studied compiler- or language-
  43. theory, nor read anything about a similar project, so if you find elements
  44. in this document that is embedded in existing systems or planned in future
  45. systems it is purely coincidental.
  46.  
  47.  
  48. ****************************************************************************
  49.  
  50.              BACKGROUND (or FUTURISTIC COMPUTER ENVIRONMENTS):
  51.  
  52. ****************************************************************************
  53.  
  54.     The following section is a description of what I think the
  55. user-interface of the future will be like.  Some parts relate to PROTOLO
  56. and some do not.
  57.  
  58.  
  59. USER-INTERFACE OF THE FUTURE
  60. ----------------------------
  61.  
  62.     The computer displays will be extremely thin (LCD?).  They will be
  63. touch- sensitive and be able to change the contour of the screen surface by
  64. up to 5 mm (Which will aid visually impaired users).  New technology will
  65. open new possibilities for special user-groups.  Architects and designers
  66. will probably want a big screen shaped as a design table, where they can
  67. move virtual sheets of paper, draw with pencils etc.  The screen will also
  68. be able to show 3-d and it will contain thousands of small speakers, which
  69. enables localization of special events by sound.  Localization by shaking
  70. is achieved by changing the contour rapidly.
  71.     Keyboards will be superfluous for most users, except for writers and
  72. journalists (the qwerty standard will not be easy to replace though, unless
  73. one develops a system that is substantially easier to use).
  74.     Microphones/speech recognition and natural speech synthesis will be
  75. considered normal, but not used much for issuing commands to the computer.
  76. It will however be invaluable for tutorials and help functions.
  77.     In addition to this, the user will be wearing small sensors on each
  78. wrist and maybe on the head to help the computer guessing what the user's
  79. focus is.
  80.     Virtual reality will probably not become important in general purpose
  81. user-interfaces in the near future.  (It will be (is?) invaluable for
  82. doctors, space- and ocean-research though).
  83.     The current trend using windows (or sheets) will continue, but the new
  84. display-technology will make them more effective and intuitive than today.
  85. As an example:  To remove a calculator from the screen, I could grab the
  86. calculator-icon lift my hand and throw it away.  To move some sheets I just
  87. put my hand on the screen and drag them to another place.
  88.  
  89.  
  90. THE FILE-SYSTEM
  91. --------------
  92.  
  93.     The hierarchical file-system is coming to an end, it will be replaced
  94. by an advanced and flexible object-oriented database which enables the user
  95. and applications to interconnect objects by relations and bind descriptive
  96. information to objects.  e.g.:  I store a picture of myself, I want a
  97. relationship between this picture and other pictures, especially to those
  98. of myself.  I want a relationship to myself, the place where it was taken,
  99. when and the person that shot it as well.
  100.     To make an effective implementation it is immensely important that the
  101. system knows which roles and what information that usually pertains to a
  102. given object-type.  If not, the user will have to figure out what
  103. information could be useful to store about each object, and will probably
  104. not bother or be able to store the relevant information necessary to make
  105. the system useful and powerful.  Some common roles/information types are:
  106. describes, owned by, time, period of time, made by, physical, abstract,
  107. part of..
  108.     The advantages of an object-oriented file-system should be obvious.  It
  109. is not possible to group files hierarchically in an effective way without
  110. duplicating information and making searches difficult.
  111.  
  112.  
  113. ****************************************************************************
  114.  
  115.             A SKETCH OF A NEW OBJECT-CODE FORMAT CALLED PROTOLO
  116.  
  117. ****************************************************************************
  118.  
  119. PROTOLO THE OBJECT-CODE FORMAT OF THE FUTURE
  120. --------------------------------------------
  121.  
  122.     Today, we have many programming languages that enables us to write
  123. programs that will compile and run on machines with totally different
  124. architectures.  The problem is however that the programs often need to be
  125. tuned/fixed to compile on a new machine, which requires some knowledge in
  126. computer-science, and the compiling is slow if the compiler is to make
  127. effective object-code.
  128.     In my opinion, the only sensible thing, for those who develops software
  129. for the open systems of the future, is to agree upon a general object-code
  130. format where the program is compiled only half-way (p-code?), in other
  131. words a format where expressions are optimized/unrolled, parenthesis are
  132. evaluated, statements broken down to their atomic parts etc, but the
  133. statements is NOT converted to a specific machine-language.  I've decided
  134. to call this format PROTOLO which is a short for PROTOtyping Language
  135. Object-code.  This object-code is in essence source-code, but not readable
  136. for humans to enhance compilation performance.
  137.     Since PROTOLO is not optimized for a specific processor it should
  138. contain information that makes optimizing, faster, easier, and the
  139. resulting code more effective and appropriate.  This means that PROTOLO
  140. will have to impose certain restriction on the programming languages that
  141. can produce true PROTOLO, the most obvious is strong typing and function-
  142. definitions.
  143.     I believe that even in the future developers will want to write certain
  144. sections of a program in pure machine language, this should also be
  145. possible in PROTOLO, but the developer should also include alternative
  146. PROTOLO-code that performs the same task if possible.  A machine language
  147. section should always include a descriptive header defined by the
  148. processor-manufacturer.  This header should include information about the
  149. use of registers, how parameters is transferred, which external variables
  150. that are read, written or both.  This ensures that machines with the same
  151. processor will be able to run the same programs at maximum speed.
  152.     Even if open systems are the sign of the future, I guess manufacturers
  153. still will make system specific features that software developers want to
  154. use.  PROTOLO should also support this (but not encourage) by allowing
  155. system- specific headers.  This header should always contain information
  156. about whether the following code is necessary for the program to compile or
  157. if it could be omitted or replaced by more general code.  The best way to
  158. implement this is by setting up a set of rules (dependencies) that
  159. determines whether compilation is possible on a specific machine or not.
  160. This could include information about special capabilities like graphics,
  161. sound, special bus-layout.  But it must ONLY contain information that is
  162. specific to ONE manufacturer, e.g.:  If a program requires a
  163. screen-resolution of 1024x1024 this should be specified in the standard
  164. PROTOLO headers.
  165.     PROTOLO-programs are distributed in this general format made by
  166. 3-different groups:  The PROTOLO-consortium, processor-manufacturers and
  167. system-manufacturers.  In addition to the general PROTOLO-format the
  168. consortium also establishes a certain set of functions to perform standard
  169. operations (file-handling, user-interface etc).  This set will of course be
  170. expanded as the systems evolve, and this should be done in a fashion that
  171. enables older systems to emulate the new functions with the old set, even
  172. if it means very slow code.  In other words, at least within a minor
  173. revision of PROTOLO, it should remain downwards as well as upwards
  174. compatible.  This ensures that older system may run new programs and new
  175. system will be able to run old programs (makes hardware-upgrades more
  176. attractive to the users as they can use their old programs).
  177.  
  178.     Summary; Programs will be distributed halfway compiled and must be
  179. compiled (or interpreted?) and installed on every specific machine before
  180. they can run.  This makes upgrading to another brand easier as you still
  181. may run your old programs.  It also makes program development and
  182. distribution more cost efficient.  PROTOLO puts some constraints on both
  183. programming languages and operating systems, which in my opinion is a plus.
  184. One could of course allow variable "strength" of the variable-typing and
  185. thereby make certain tricks possible, but this would make good optimizing
  186. more difficult (or impossible).
  187.  
  188.  
  189. PROFILING INFORMATION AND OPTIMIZATION IN PROTOLO
  190. -------------------------------------------------
  191.  
  192.     To enhance reasonable optimizing PROTOLO programs can include profiling
  193. information that tells the PROTOLO compiler the priority and maximum
  194. execution time for different parts of the program, how often a part is
  195. likely to execute, which values are typical for a particular variable etc.
  196. This should ensure that the compiler doesn't optimize one section at
  197. another more vital section's expense.  Profiling information may also be
  198. added based on the user's typical use of the program.  The user should be
  199. able to tell a runtime "profiling-daemon" when program execution is too
  200. slow.
  201.     To enhance compilation time one might want to include profiling
  202. information about the possible domain of a variable.  For instance, after
  203. abs(x), x will certainly be a positive value.  This domain-profiler should
  204. however always be the one provided by the consortium so the PROTOLO-
  205. compilers could decide whether to ignore the existing information or not
  206. based on the revision number.  A bug in the domain-profiling info will
  207. often be fatal!
  208.     Additional profiling information could be statistical data on how often
  209. a variable is converted to different format and used in the given format.
  210. Maybe execution time would benefit if the variable changed format?
  211.    To make it possible to use many different languages to write a program a
  212. special linkable version of PROTOLO should be established.  This would make
  213. it possible for developers to use the best suited programming language for
  214. a given task including CASE-utilities.
  215.  
  216. REAL-TIME COMPILATION
  217. --------------------
  218.  
  219.     Usually the entire PROTOLO program will be compiled to a system
  220. specific object-code-format when it is installed, but certain loops with a
  221. core of heavy calculations may benefit from real-time compilation
  222. (depending on the processor), because one can then treat all variables that
  223. are not altered within the loop as constants.
  224.  
  225. PROTOLO EXAMPLE:
  226. ----------------
  227.  
  228.     Here is a couple of examples to illustrate how PROTOLO could be
  229. implemented.  I've used a C-like language as PROTOLO will not be
  230. human-readable, but mere opcodes and offsets.  (I have inserted
  231. "something..." in places where I couldn't figure out the correct value)
  232.  
  233. A program like:
  234.  
  235. int x,i;
  236.  
  237. x = 5;
  238. for(i = 1; i<100; i++) {
  239.     x = (x * i )+i*2;
  240. }
  241.  
  242. Could be translated into pseudo-PROTOLO as :
  243.  
  244. word x;             #domain x E something...;
  245. word i;             #domain i E [1..100]
  246. x = 5;              #domain x E {5}
  247. i = 1;              #domain i E {1}
  248. if (i<100) {                This one is of course redundant
  249.   do {              #block repeat-factor 99:1
  250.     x = x*i;        #domain x E something...
  251.     alloc word d1;          Create a temporary variable
  252.     d1 = i*2;       #domain d1 E [1..99]*2
  253.     x = x+d1        #domain x E something...
  254.     free d1;                Free the temporary variable
  255.     i = i+1;        #domain i E [1..100]
  256. } while (i<100);             All loops in PROTOLO are do-while loops
  257. }
  258.  
  259. Notice the loop construct.  PROTOLO will only contain the most elementary
  260. elements of a programming language.
  261.  
  262. This program should however not be generated as PROTOLO as all variables
  263. are known, neither should the if-sentence have been there.  It serves well
  264. as an example however.  The PROTOLO-end-processor should have noticed the
  265. unnecessary code and replaced the code above with:
  266.  
  267. i = 100;
  268. x = something...
  269.  
  270. Unnecessary code is never allowed in distributed PROTOLO-code since it
  271. isn't a programming language but an object-code format with focus on
  272. optimizing.
  273.  
  274. The development process of software distributed as PROTOLO-code could be:
  275.  
  276. 1.  edit source-files
  277. 2.  compile language dependent code to PROTOLO-linkable
  278. 3.  linking with debug-info
  279. 4.  debugging
  280. 5.  if there are bugs then repeat from 1
  281.  
  282. 6.  link to PROTOLO with profiling generators and existing profiling-info
  283. 7.  compile PROTOLO to executable
  284. 8.  run the program
  285. 9.  repeat from 6 until there is no speed-improvement
  286. 10. if the program is too slow repeat from 1
  287.  
  288. 11. link to distributable PROTOLO
  289.  
  290. The linking process consists of at least the following steps:
  291.  
  292. 1.  generate domain-profiling-info
  293. 2.  remove redundant code
  294. 3.  add priority-profiling-info
  295. 4.  verify the syntax
  296.  
  297.  
  298. THE NEXT STEP IN MAKING OF THE PROTOLO-STANDARD:
  299. ------------------------------------------------
  300.  
  301.     I cannot (and will not) get PROTOLO on it's feet by myself, but I think
  302. it is a valid concept which both developers, manufacturers and users would
  303. benefit from if it was available.  The future of PROTOLO certainly depends
  304. on the goodwill of those groups, but goodwill and intentions alone isn't
  305. enough, action is also required.  For a start I would like anyone who
  306. believes that what I have outlined here is a good idea, but have some
  307. comments to it, to send me a notice at olag@ifi.uio.no with "GROESTAD93.1"
  308. or "PROTOLO93.1" as subject.  If anyone feels like contributing more than a
  309. notice I will welcome anyone to participate in the making of the first
  310. draft of PROTOLO.  I have however no intention of making an implementation
  311. of PROTOLO myself as it will only be of any value if the majority of the
  312. manufacturers are interested.  If we however manage to produce a draft that
  313. is likely to be both effective, useful and possible to implement then we
  314. would have achieved a lot.
  315.  
  316.  
  317. --
  318.  
  319. * Ola Fosheim Groestad  (A sonic lunatic) *
  320.  
  321. -- 
  322.  
  323. * Ola Fosheim Groestad  (A sonic lunatic) *
  324.  
  325.  
  326.  
  327.