C interpreters?

Matt Landau mlandau at bbn.com
Thu May 26 04:10:42 AEST 1988


In comp.lang.c (<844 at esunix.UUCP>), bpendlet at esunix.UUCP (Bob Pendleton) writes:
>
>I've heard some rumors about a C interpreters called Sabre. Does anyone
>know where I can get more information about it? 

I've been helping to beta test new versions of Saber for a couple of
months now, using Saber to develop new code and debug existing code 
under both SunView and X11.  It was particularly useful to be able
to call Xlib functions interactively in the interpreter and see what
would happen -- I learned a great deal about how X really works that
way.

I have no particular connection with Saber Software, except as a very
satisfied (and impressed!) customer and beta-test site.
--
 Matt Landau		    	    Riding shotgun down the avalanche
 mlandau at bbn.com

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

Saber is a rather impressive interpreter/debugger combination for C 
programmers.  Here's a brief description of some of its features:

   * The debugging environment is a workspace into which you can load 
     a combination of compiled and interpreted code.  The workspace
     understands a superset of dbx commands, so if you can use dbx it's
     pretty easy to switch to Saber.  The workspace is also an ANSI
     compatible C interpreter, so you can do anything that can be
     expressed in C -- define and call functions, create and modify
     data, define and call macros (How often have you wanted to use
     a #define in dbx?) etc.

   * At load-time, the interpreter does stronger-than-lint syntax and 
     type checking.  Errors are flagged with a message; you can ignore 
     this instance of the error, suppress future complaints about the 
     error (for this line, this procedure, this source file, or globally),
     or edit the file [your $EDITOR pops up positioned on the offending
     line] and have it automatically reloaded.

   * Code is dynamically linked.  Source modules can be modified within 
     or outside Saber, so if you (or Saber) detect an error at runtime 
     you can fix it and reload the file.  You're reset to the top-level 
     of the workspace, with your debugging environment intact, so you 
     can test the modified code immediately.

   * Another implication of dynamic linking is that you can run code 
     fragments -- if you try to reference something that doesn't exist 
     yet, Saber will drop you into a Lisp-like break level and let you 
     define the required objects or functions on the fly, or else just
     provide a one-shot value to use in place of the missing object
     or function call.

   * There's an extensive variety of breakpoints and watchpoints you
     can set.  These can be tagged with user-specified actions, which
     are arbitrary functions or C code fragments.  You can also attach
     arbitrary user-defined output functions to datatypes, so when
     you say "print foo" it prints in whatever format you like.

   * There's also a whole set of functions for listing the contents
     of modules or libraries, cross-referencing for data and functions,
     etc.

   * Runtime pointer and array bounds checking in interpreted code.
     This is perhaps the single most valuable feature in Saber - it
     tends to find those "stray pointer trashes allocated memory"
     bugs, gives you a warning message telling what pointer went bad
     and where, and drops you into a break level.

   * It deals gracefully with multiple windows under SunView and X11,
     using separate windows for editing, code listing, help requests,
     program I/O, etc.

   * They're also testing an amazing thing called "sabertool", which
     is the dbxtool of Saber, only better.  It's hard to describe all
     the nifty stuff sabertool does, including:

	+ visual crossreferencing, which displays a map of who uses 
	  and is used by a given symbol, allows you to click on things 
	  to extend the crossreference in either direction

	+ the usual panels full of buttons to execute debugger commands

	+ separate panels that show you the how the load or link stages
	  are progressing, display online help, display program I/O,
	  etc.

	  and the really wonderful part. . .

	+ the data browser, which must be seen to be believed.  You
	  know all those papers you've seen about visual display of
	  data structures all nicely formatted in little boxes, with 
	  the ability to click on pointer fields and follow all of 
	  the links?  Well, this is what they're talking about -- it's 
	  like working with a Lisp Machine debugger, but for C on your 
	  Sun.  Really impressive.  It's also saved me a lot of
	  debugging time, even in the (not fully integrated into the
	  rest of Saber) beta test version.

Saber is currently available on Sun-2's, Sun-3's, and VAXen, running
under SunOS, Ultrix, and 4.3BSD, and using SunView, X10, or X11 if 
they're available.  (Sabertool is only available with SunView at the
moment.)

Pricing starts around $1000 for the first CPU (quantity 1), with 
volume discounts (e.g., about $500/copy in quantities of 20 or more).
For detailed pricing or more information, you can reach Saber Software 
by electronic mail as "saber at harvard.harvard.edu", or at

			Saber Software, Inc.
			30 JFK Street
			Cambridge, MA  02138
			(617) 876-7636



More information about the Comp.lang.c mailing list