Literate programming interface for C

Jonathan Eunice jonathan at cs.pitt.edu
Wed Jan 16 13:02:39 AEST 1991


I recently asked for a literate programming tool for C.  This is a
preliminary summary of the responses, designed to get the information
out while it's hot.  The lines are still open, however.  If I get
significant new responses, I'll ammend the summary and post it in a
week or so.  See below for still-open issues.  Thanks to all who
responded.


The request:

|  
|  >From: jonathan at cs.pitt.edu (Jonathan Eunice)
|  Subject: Literate programming interface for C
|  Message-ID: <9699 at pitt.UUCP>
|  Date: 13 Jan 91 18:23:31 GMT
|  
|  I need a program that supports a literate programming style for the
|  C language.  It should allow me to enter pseudo-code such as
|  
|  	if <the device is not responding> {
|  		<stop with device failure error>
|  	}
|  
|  then select individual pseudo-code expressions (here delimited by <>)
|  and edit them in native C.  The ability to arbitrarily switch between
|  pseudo-expression and C representations is highly desirable, as is the
|  maintenance of the pseudo-expressions as comments in program listings.
|  
|  This is to run on an IBM RS/6000 with AIX 3.1.  An X Windows tool
|  preferred, but character-oriented or NextStep programs also
|  acceptable.  Free programs preferred (of course!), but commercial
|  programs also acceptable.  For "free" programs, I am willing to port
|  to the RS/6000 as the price of admission.
|  
|  Please email me and I will summarize for the net.


The replies, edited:


|  From: Bob Desinger <bd at hpopd.pwd.hp.com>
|  
|  [Similar suggestion made by Raymond Chen <raymond at math.berkeley.edu>.] 
|  
|  How about CWEB?  It was (is?) distributed with Unix TeX, and is also
|  available under princeton.edu:~ftp/pub/cweb.tar.Z.  [...]
|  Unfortunately, its author Silvio Levy doesn't have time to support it
|  any more.  However, I just saw news of a new Stanford University report
|  on CWEB by Knuth himself!  I don't have access to it here in England
|  (yet), so I don't know if Knuth is now supporting CWEB or if he wrote
|  his own from scratch.
|  
|  The drawback with CWEB is that it's not WYSIWYG: it's the old familiar
|  ``text-file + TeX'' model.  To preview your output, you can get xdvi
|  from expo.lcs.mit.edu with the other X contrib stuff.  But it's still
|  the old batch-mode interface, not a whizzy windows version.
|  
|  There was an attempt at UCB to make TeX interactive and window-smart;
|  the project was called VorTeX, but that was a few years ago and I
|  don't know if anything came out of it.
|  
|  A company in Turin, Italy, named LPS sells an editor called KeyOne
|  that is more WYSIWIG and window-smart.  It's not CWEB; it stores the
|  files in its own annotated (but still plain ASCII) format.  The
|  version I saw would never win any awards for speed, but their new
|  version is probably a better X client than the old version I saw.
|  LPS's CEO is Luigi Petrone, a professor at the University of Turin.
|  Send me mail if you can't discover a local distributor; I can reply
|  with their phone and Fax numbers in Italy.


I'm not sure I'm willing to brave WEB/CWEB files that combine the
independent, already worrisome complexities of C notation, application
logic, and TeX formatting into one hideously complex file.  My goal is
hiding complexity, not exposing/causing more of it.  Even so, I do
intend to check out CWEB first hand.  Mabye its not such a bad solution
if you resign yourself to the ugliness of the interface.  

VorTeX might make CWEB somewhat more palatable, but not being a TeX
user, I haven't even heard of VorTeX, much less know about its
availability.  Further info appreciated.

KeyOne also seems a possibility worth looking into.


|---------------------------------------------------------------------
|  
|  
|  From: Frank Glandorf <sdrc!gefrank at uunet.UU.NET>
|  
|  You may want to check this month's Sigplan Notices (jan 91, vol. 26 #1).
|  There's an anotated bibliography of literate programming.


Aha!  You've caught me neglecting my SIGPLAN Notices again.  I checked
the references, but alas, only a few references mention interactive
tools.  The rest relate to WEB and similar solutions.  These site M.
Brown, our next respondent.


|---------------------------------------------------------------------
|  
|  
|  From: Marcus Brown <marcus at fred.cs.ua.edu>
|  
|  I am in the middle (well, actually, a grad student is) of porting
|  the tool I built for Literate Programming using SunView to
|  X Windows. The current model is built on top of Levy's CWEB, tho
|  it could be used with any other CWEB I know of.  I am currently
|  working on IBM RT (AIX 2.2.1), but we will be getting RS/6000s 
|  "Real Soon Now".  I'm not sure when to promise results, but sometime 
|  this semester we should have a working model.
|  
|  For a description of the whole environment (not all functions are
|  implemented yet), see my article in "Structured Programming, 11,p.11-25",
|  Jan. 1990.
|  
|  Be sure to let me know if you get any other similar offers.
|  
|  Marcus Brown
|  CS Dept.
|  Univ. of Alabama
|  Box 870290
|  Tuscaloosa, AL  35487-0290
|  (205) 348-7373


Sounds good to me, though not yet available.


|---------------------------------------------------------------------
|  
|  
|  From: Bob Bagwill <bagwill at swe.ncsl.nist.gov>
|  
|  Probably the fastest/cheapest/easiest way to get this is to see if there
|  are similar GNU EMACS templates available, and change them.


This was an interesting suggestion.  Unfortunately, I am not a GNU
EMACS user,  so I don't know where to look for such templates, or how
hard it would be to write/modify templates to do what I'm asking.  An
extensible editor would be the perfect place to implement my desired
tool, and I know of language-sensitive macros for EMACS.  I am following
up on this suggestion.  Further comments appreciated.


|---------------------------------------------------------------------
|  
|  
|  From: Paul C George <pcg at spl27.spl.loral.com> 
|  
|  You might consider the Grammatech LSE (aka the Cornell Program Synthesizer).
|  This tool comes prepopulated with C, and you could extend the grammer for 
|  your specific needs. It is a general purpose LSE building tool. Any grammer
|  you can specify can be implemented.
|  
|  Our contact is:
|  Tim Teitelbaum (607)273-7340
|  
|  I should warn you that dealing with them can be a pain if you want
|  major modifications to the tool, as they are (understandably) worried about 
|  the technology getting out. We had major headaches formulating a contract. 
|  If you just want to extend C grammar, there should be less of a problem.
|  Hope the product helps.



Again, thanks to all who replied.  If significant new information comes
to me, I will amend this summary to include it.  In particular, the
following issues are open:

1. Are there any other interactive LP tools out there?

2. How easily/effectively can GNU EMACS be turned to the problem?  

3. Is VorTeX a reality?  What is its availability?

4. How usable is the combination of CWEB, TeX, and a DVI previewer in
   real life?



More information about the Comp.unix.aix mailing list