home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / ada / 3865 < prev    next >
Encoding:
Internet Message Format  |  1993-01-04  |  13.7 KB

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!swrinde!ctcvax.ccf.swri.edu!trident!tim
  2. Newsgroups: comp.lang.ada
  3. Subject: Answers: X/Ada
  4. Message-ID: <250@trident.datasys.swri.edu>
  5. From: tim@trident.datasys.swri.edu (Timothy J. Barton)
  6. Date: 4 Jan 93 14:46:50 GMT
  7. Organization: Southwest Research Institute
  8. Lines: 311
  9.  
  10.  
  11. >Is there any info about the current state of the X Bindings?
  12. >Is this a faq?
  13. >The only aspect holding my project back from switching to Ada
  14. >from 'C' is the binding...Hope there is a solution...
  15. >Thanks ...
  16.  
  17. Long post follows, hit 'q' now if not interested in Ada and X....
  18.  
  19. I have looked into this myself.  I have learned that the STARS stuff is 
  20. really old, X11R3, and is only XLIB and Xt.  If you are interested in STARS,
  21. the folks at STARS advised me to get SERC's bindings which are built from
  22. the orgininal STARS work.  I have talked with "Jeff" in Engineering at SERC
  23. and he gave me all the details on SERC's product.  Their product sounds
  24. very good and I am planning to use it here.  You can contact SERC at
  25. 1-800-ada-serc or 415-962-8092.  They'll send you a FAX with lots of good
  26. information.
  27.  
  28. I have also received info from Objective Interface which has a product
  29. called Screen Machine.  I have looked briefly at their literature and it
  30. also sounds impressive.  You can reach Phil Carrasco at 703-264-1900 or
  31. phil.carrasco@ois.com.
  32.  
  33. DEC lists bindings in their catalog and you'll see some info in the following
  34. messages.  Sun includes XView bindings with their Sun Ada 1.1 which is the
  35. Verdix compiler.  I am using this compiler right now in conjunction with
  36. Alsys on the PC (my code has to run on both platforms) and I've run into no
  37. compatibility problems between Sun Ada and Alsys.
  38.  
  39. One thing I have learned, is that there is alot of WRONG information floating
  40. around concerning Ada and X.  Here's some answers I received to my USENET
  41. request.  I hope this helps.  If you have any more questions, please email
  42. me directly or call.  I work in a classified lab and don't get to the outside
  43. world very often, so my response be several hours/days in coming.
  44. ------------------------------------------------------------------------------
  45.  
  46. From hasan@emx.cc.utexas.edu Mon Nov 23 09:38:18 1992
  47. Subject: Re: Ada and X/Motif
  48. Newsgroups: comp.lang.ada
  49. Organization: UTexas Center for Space Research
  50.  
  51. In article <195@trident.datasys.swri.edu> you write:
  52.  
  53. >The FAQ lists several Ada to X/Motif bindings and I am preparing to do
  54. >such a project for the AF.  Does anyone have experience with Ada and
  55. >X, especially the DEC Ada Motif bindings?  
  56.  
  57. I have _just_ started dabbling in the DEC Motif binding.  I
  58. know of one fairly startling error in XtAppInitialize (the
  59. Ada "valued_procedure" binding to the C function has NO 
  60. PARAMETER CORRESPONDING TO THE RETURNED WIDGET!).  The
  61. helloWorld example which is shipped with the bindings goes
  62. out of its way to avoid calling this routine (i.e., it calls
  63. the lower level Xt routines for setting the context, creating
  64. the display, etc...).      
  65.  
  66. It might be that the overall quality of the binding is
  67. better than this would lead one to believe.  (It might also
  68. be the case that I am missing something and that this error
  69. is in fact some sort of feature, but I don't think so.)
  70.  
  71. I noticed that the binding we have is v1.0.  I don't know if
  72. that is the most recent or not -- it's the one in use here
  73. at the University of Texas.
  74.  
  75. So in general, I'd want to look fairly closely before I
  76. committed to the binding, since it seems to be a "work in
  77. progress."
  78.  
  79. Good luck.
  80.  
  81. .dh.
  82. -- 
  83. ***********************************************************
  84. *   David A. Hasan        | University of Texas at Austin *
  85. *   hasan@emx.utexas.edu  | Center for Space Research     *
  86. ***********************************************************
  87.  
  88. ------------------------------------------------------------------------------
  89.  
  90. From: meister@evb.com (John Goodsen)
  91. Subject: Re: RE Naive Ada/X/Motif Question
  92.  
  93. >
  94. >I have been using the ATC bindings [(714) 583 9119] to X, Xt, Motif. They are
  95. >available for a number of compilers and a large number of platforms.  They also
  96. >allow tasking to be used. (the calls to get events etc only block the calling
  97. >task, not the entire Unix process).  
  98. >
  99.  
  100. Do not forget the non-reentrancy problem with Ada tasking also.  Fixing the 
  101. mainloop so as not to block the Unix process is only one facet of the Ada/X
  102. tasking problems.  Non-reentrant Xlib/Xt/Motif requires serialization of your
  103. Ada tasks when calling into the X libs.  
  104.  
  105. --
  106. John Goodsen                           PCIS Programme
  107. Software Process & Environments        Ada Joint Program Office       
  108. EVB Software Engineering               goodsenj@ajpo.sei.cmu.edu
  109. jgg@evb.com
  110.  
  111. ------------------------------------------------------------------------------
  112.  
  113. From: Telstar Systems <GOULD@decus.COM.AU>
  114. Subject: RE Naive Ada/X/Motif Question
  115.  
  116. >Do not forget the non-reentrancy problem with Ada tasking also.  Fixing the 
  117. >mainloop so as not to block the Unix process is only one facet of the Ada/X
  118. >tasking problems.  Non-reentrant Xlib/Xt/Motif requires serialization of your
  119. >Ada tasks when calling into the X libs.  
  120.  
  121. We have done this by using multiple display connections to the server. We only
  122. need a small number of tasks to do X work.  Communication between tasks gets a
  123. bit complicated because of the tasks suspended waiting for X events.  We
  124. currently do this by using send event to wake up the required task. 
  125. So far, we have had no problems with this mechanism.
  126.  
  127. Ross Black
  128. --------------------------------------------------------
  129. Telstar Systems        |  Phone  +(61 3) 541 6893
  130. 22 Winterton Rd        |  Fax    +(61 3) 544 8574
  131. Clayton VIC 3168       |
  132. Australia              |  Email   GOULD@decus.com.au
  133.  
  134.  
  135. ------------------------------------------------------------------------------
  136.  
  137.  
  138. From: Telstar Systems <GOULD@decus.COM.AU>
  139. Subject: Re: Tasking and Ada
  140.  
  141. >I was monitoring the discussion from the Naive X/Ada Users and 
  142. >a commnet caught my eye.  Are there problems with using
  143. >tasking within an X/MOTIF application.  Could you please
  144. >describe some of the symptoms etc.
  145.  
  146. There are no problems unique to using Ada/X/Motif that are not experienced with
  147. using most I/O packages from Ada.  Most I/O is designed around using a Unix
  148. process.  When that process issues a request for input the entire process is
  149. blocked.  In Ada this causes a problem because all the Ada tasks run within a
  150. single Unix process.  When one task blocks on I/O the entire process and all
  151. Ada tasks within block.  Some solutions are appearing as operating systems
  152. provide multi-threading capabilities (similar to Ada tasks).  Posix I/O also
  153. provides options to allow only the calling task to block.  Newer Ada compilers
  154. may implement tasks using threads. (The TRIAda proceedings
  155. have a good article about this.)
  156.  
  157. The other problem with X and Motif is that the C libraries are not tasking safe
  158. (ie multiple tasks cannot call the routines simultaneously).  Some Ada bindings 
  159. serialise access to the library to allow safe access from multiple tasks. 
  160. Alternatively, each task can have a separate display connection to the server.
  161. As multi-threaded Unix becomes standard, I assume that some of the X libraries
  162. will be re-written to be tasking safe.
  163.  
  164. ** Is any work to write tasking safe X/Xt/Motif being done anywhere ?  I have
  165. heard of a multi-threaded Xlib.  Any details ?
  166.  
  167. Ross Black
  168. --------------------------------------------------------
  169. Telstar Systems        |  Phone  +(61 3) 541 6893
  170. 22 Winterton Rd        |  Fax    +(61 3) 544 8574
  171. Clayton VIC 3168       |
  172. Australia              |  Email   GOULD@decus.com.au
  173.  
  174.  
  175. ------------------------------------------------------------------------------
  176.  
  177. From ARNOLD@wsmc-mis.af.mil Fri Dec  4 07:07:46 1992
  178. From: "Arnold,Stephen, I" <ARNOLD@wsmc-mis.af.mil>
  179. Subject: Ada response
  180.  
  181. You may know this already, but the STARS repository is mirrored on AdaNet 
  182. (which is run by Mountain Net, which is on West Virginia Net, ...). This is
  183. a large and well organized database of reusable code (eg, AYACC, AFLEX, etc)
  184. and tools, as well as Ada literature, documents, etc. They are on the Internet,
  185. but you can also reach them through SprintNet and direct dial. They just
  186. upgraded to ASV3 (adaNet Service Version 3), a variant of the NELS (the NASA
  187. Electronic Library System). It's supposed to be slicker than you-know-what
  188. if you have an X-Windows machine (I don't }:-) Hope this was helpful.
  189. For more info, call Ann @ (800) 444-1458
  190.  
  191.  
  192. Stephen L Arnold   Systems Engineer              voice: (805) 734-8232 x68838
  193. Geodynamics Corporation                            fax: (805) 734-4779
  194. PO Box 5548                                    email: arnold@wsmc-mis.af.mil
  195. Vandenberg AFB, CA  93437
  196.  
  197. ------------------------------------------------------------------------------
  198.  
  199. >From: geb@amber.Rational.COM (Gary Barnes)
  200. Subject: Ada reimplementation of the MIT C Xlib
  201. Date: 31 Oct 90 17:00:07 GMT
  202.  
  203. An Ada reimplementation of the MIT C-based Xlib is available via
  204. anonymous ftp on expo.lcs.mit.edu.  There are two files:
  205.  
  206.     contrib/ada.xlib.README        4Kb
  207.     contrib/ada.xlib.tar.Z        2.9Mb
  208.  
  209. This Ada version of Xlib is compatible with X11R4.  This is a beta
  210. release.  The release number is 5_6_0.  The sources are about 10Mb
  211. when they are restored from the tar file.  3Mb of that is
  212. PostScript documentation.  Makefiles and Imakefiles are included.
  213. This is a complete reimplementation of Xlib; it is not an Ada skin
  214. over the C libraries.  This leads to a more efficient interface,
  215. better type safety, proper behavior with Ada tasking, etc.
  216.  
  217. The Ada Xlib was done at Rational and it compiles and runs with the
  218. Rational native R1000 Ada compiler (Delta1 (D_10_20_0) and Delta2
  219. (D_12_1_1) versions) and with the TeleSoft TeleGen2 68k Unix compiler
  220. (version 1.4) under SunOS (version 4.0.3 or later).  It is currently
  221. being ported to other targets by a few groups around the world.
  222.  
  223. Included with the source code are PostScript files for three
  224. documents.  There is a Porting Guide, a Differences Guide, and a full
  225. Xlib manual.  The Porting Guide details the steps for porting the
  226. library to new machine architectures and operating systems.  The
  227. Differences Guide points out the differences between the Ada and C
  228. languages and libraries.  The Xlib manual is an Ada "translation" of
  229. the MIT manual for the C library.
  230.  
  231. The copyright on the Ada Xlib is the same as for the MIT library.
  232. The code is freely redistributable for any purpose.  Rational expects
  233. to maintain the Ada Xlib in much the same way as MIT maintains the C
  234. Xlib.  There is a mailing list for interested parties (Xlib@Rational.Com),
  235. a mailing list for reporting bugs (Xlib-Bugs@Rational.Com), and an
  236. address for requesting changes to the mailing lists
  237. (Xlib-Request@Rational.Com). 
  238.  
  239. This is just the Xlib layer of the X Window System.  There are
  240. currently no Intrinsics or Toolkit layers provided.  (That's the next
  241. project.)  Rational will be working with SAIC and Unisys to come up
  242. with common Xlib, Intrinsics, and Toolkit interfaces. 
  243.  
  244. Gary E. Barnes                geb@Rational.Com
  245.  
  246. ------------------------------------------------------------------------------
  247.  
  248.  
  249. From: alleyne@teecs.UUCP (Adrian Alleyne)
  250. Subject: RE: Ada bindings for X-Windows
  251. Date: 14 Nov 90 16:14:39 GMT
  252. Organization: Litton Systems, Toronto ONT
  253.  
  254.  
  255.  >> I'm looking for Ada bindings for X.  
  256.  
  257.  
  258. The STARS program Ada Bindings:
  259.  
  260. SAIC developed an Ada binding to Xlib (X11/R2) under the STARS contract.  
  261.  
  262. There's a version of this binding on wsmr-simtel20.army.mil if you
  263. have FTP access.  There are also a number of companies that sell the
  264. Ada Software Repository on tape (MACA (505) 678-3288).  You can also get it 
  265. from NRL, according the STARS newsletter (which you can get by sending mail to
  266. newsletter@stars.reston.unisys.com).
  267.  
  268. Many compiler vendors provide a binding mostly based on the orginal STARS version
  269. (e.g. TeleSoft), and there are companies, such as GHG, and Ada Plus that have taken 
  270. the binding and commercialized it.
  271.  
  272. The (new! improved!) X11R4 binding (for several different compilers) 
  273. was scheduled to be released sometime in September '90.  To get on the mailing list 
  274. for further information, send mail to x-ada-request@expo.lcs.mit.edu.
  275.  
  276. We have successfully produced our own bindings to Xt and Motif, but I have no
  277. idea if or when they will be released to the public.
  278.  
  279.  
  280. SERPENT:
  281.  
  282. Serpent supports user interface development using both the motif and 
  283. athena toolkit widget sets for X windows AND includes an Ada binding.
  284.  
  285. This allows the development of ada applications for these X window
  286. toolkits but requires the use of serpent.  we don't necessarily
  287. view this as a bad thing, however. 8^}  we have not yet integrated
  288. the Open Look toolkit but we have developed a tool that allows the
  289. easy integration of X intrinsic based toolkits (i.e., XTK+ but
  290. not XViews).  This tool is provided with serpent and we can assist
  291. you in the integration if you chose to attempt it.  Our experience
  292. has been that it takes approximately 1/2 hour per widget to integrate
  293. a new, X intrinsic based toolkit.
  294.  
  295. Support for both ada and X has been a strong selling point for
  296. serpent.  There are several groups who are currently developing ada
  297. applications with Motif based user interfaces using serpent.
  298.  
  299. Serpent is available for anonymous ftp (contact rCs see below) and is also 
  300. available on the MIT X11 Contrib tape.
  301.  
  302. --------
  303. Thanks to:  karl@grebyn.com (Karl A. Nyberg) and rcs@SEI.CMU.EDU (rCs)
  304.             for providing some of the above information.
  305.             
  306.  
  307. ----------------------------------------------------------------------
  308. Adrian Alleyne                    email: alleyne@teecs.UUCP
  309. Litton Systems Canada Limited            voice: (416) 249-1231
  310. Etobicoke, Ont.                             
  311. Canada M9W 5A7
  312. [D.
  313.  
  314.  
  315.  
  316. ----------------------------------------------------------------------------
  317. Timothy J. Barton                         tim@trident.datasys.swri.edu
  318. Senior Research Analyst                   (512) 522-3540
  319. Southwest Research Institute (SwRI)       (512) 522-5499  (Fax)   
  320. San Antonio, Texas  78228-0510
  321.