From: daemon@cs.tulane.edu ()
	id AA22121; Mon, 14 Sep 92 20: 10:15 PDT
Subject: 45.10 SunFlash: SunProgrammer  Vol 1 #1 (2 of 3)
Original-Message-Id: <9209150309.AA15959@sunvice.East.Sun.COM>
Precedence: junk
Reply-To: <owner-sunflash@housun.Central.Sun.COM>
Organization: Computer Science Dept., Tulane Univ., New Orleans, LA
Errors-To: <owner-sunflash@housun.Central.Sun.COM>
Distribution: lou
Date: Tue, 15 Sep 1992 05:09:33 GMT
Return-Path: <owner-sunflash@housun.Central.sun.com>
Nntp-Posting-Host-[nntpd-23361]: rex

----------------------------------------------------------------------------
                                                        The Florida SunFlash

          SunProgrammer  Newsletter Vol 1 #1    (2 of 3)

SunFLASH Vol 45 #10					      September 1992 
----------------------------------------------------------------------------
**********************************************************************
*								     *
*                          COPYRIGHT NOTICE                          *
*								     *
*  The copyright for this publication is held by Sun Microystems     *
*  Inc.  All rights reserved.  No part of this publication can be    *
*  reprinted, modified, or otherwise reproduced without permission   *
*  from the publisher (David.Reim@Sun.Com).  However, you are free   *
*  to forward unmodified sections via Email as long as you also      *
*  include this copyright notice.                                    *
*                                                                    *
*                                                                    *
**********************************************************************

-----------------------------------------------------------------------

"SPARCworks 2.0: The Next Generation"
        by Nanette Harter

     The current release of the SunPro software development environment, 
SPARCworks 1.0, consists of two graphical tools for software development 
-- Debugger and SourceBrowser -- and is co-packaged with the SPARCompiler
C, C++, FORTRAN and Pascal products. 

     The next release of SPARCworks, Version 2.0, will be a major upgrade 
which will add functionality to the present tools and introduce four new 
ones: 

           *     SPARCworks Manager 

           *     Analyzer 

           *     FileMerge 

           *     MakeTool 

     SPARCworks is designed to speed up and simplify the tasks
software developers perform most often: editing and merging of source 
code, compiling and debugging of programs, and tuning program
performance. 

     SPARCworks 2.0 works in the Solaris 2.0 environment, which was 
recently introduced by SunSoft. Solaris 2.0 includes SunOS(TM) 5.0, 
based on SVR4 technology, OpenWindows(TM) 3.0, and DeskSet(TM) 3.0. 
SPARCworks 2.0 will be the first development environment for Solaris 
2.0 and will be available when Solaris 2.0 is released by SunSoft. 
This article is an exclusive preview of SPARCworks 2.0 and will 
highlight the important features of this major new release.

     SPARCworks 2.0 provides a consistent development environment for
C++, ANSI C, FORTRAN, and Pascal programmers. SPARCworks tools are 
integrated using the SunSoft ToolTalk(TM) inter-application 
communication facility. This integration allows a developer to launch 
and manage multiple tools in a session and enables other third-party 
tools that use ToolTalk to be integrated into the session. SPARCworks 
is "scalable," able to support very large applications (in the millions 
of lines) running over a client-server network. Unlike other toolsets, 
which require files to be explicitly loaded into the environment, 
SPARCworks tools can access any file or symbol information immediately 
upon start-up.


SPARCworks 2.0 includes:

SPARCworks Manager. SPARCworks Manager provides an easy-to-use,
     unified means of starting SPARCworks tools and controlling 
     the programming environment. 

     In addition to managing the other five standard SPARCworks tools, 
     SPARCworks Manager can also control custom applications written by 
     users or third-party developers. When integrated with SPARCworks
     and executed under SPARCworks Manager, the standard SPARCworks
     tools and custom applications combine to provide you with the
     following advantages:


        *      Drop-and-drag execution

        *      Session management

        *      Workspace organization

        *      Central control


SourceBrowser. SourceBrowser enables programmers to search files residing
    locally or on the network. As a result, developers can make global 
    changes and pinpoint problem spots even on massive, distributed 
    development projects.

    New features for SourceBrowser include a function call grapher that 
    displays the callers and callees of a specific function, and two 
    tools designed especially for object-oriented programming: a class 
    browser and class hierarchy grapher. These graphical features 
    enable C++ programmers to easily navigate through classes stored 
    in their own applications and in libraries.


Debugger. The dynamic Debugger has been enhanced with the following 
    capabilities: 

       *     Analyzes dynamically linked shared libraries

       *     Analyzes optimized code

       *     Lists command history

       *     Displays FORTRAN array slices

       *     Saves, restores and replays sequences of commands

       *     Handles overloaded function names and other C++ language 
             features

       *     Checks out source from SCCS

     In addition to its duties as a dynamic analyzer, the Debugger also 
     collects data for use with the Analyzer performance-tuning tool. 
     Collected data includes:

       *     User time

       *     System time

       *     I/O time

       *     Page fault time

       *     Address space structure

       *     Page reference and modification data


Analyzer. The SPARCworks Analyzer measures and displays an application's
     performance profile, suggesting ways to improve performance.

     Any program that has been compiled for debugging is capable of 
     generating data for the Analyzer. Performance data is collected 
     while the program runs under Debugger control. This data is placed 
     in a file that the Analyzer subsequently examines and presents in 
     a variety of graphic and text displays.

     The Analyzer eliminates the need to compile and link an application
     with special data collection instrumentation. Moreover, the 
     Analyzer simplifies and enhances the task of collecting data; you
     can collect a variety of performance data types, and control the
     data collection process.

     By letting you focus on the areas where performance problems occur,
     the Analyzer allows you to easily test your hypotheses about a
     program's behavior.

     After you have tuned your program, the Analyzer assists you in 
     rebuilding it by identifying improved sequences for loading 
     functions into the program's address space. The Analyzer then
     builds a map file to pass to the linker, which uses it to produce
     an executable with reduced working set size.

     The Analyzer examines the performance data that has been collected
     in the experiment record and displays its results in a variety of
     graphical and text formats, including:

       *       Overview display

       *       Histogram display

       *       Pages display

       *       Statistics

     You can export the data collected by the debugger into files for
     use by other programs such as spreadsheets or custom-written
     applications. The format of the export data file is well documented
     in SPARCworks technical references.


FileMerge. FileMerge provides visual file comparison. It enables 
     programmers to work on the same file and then to compare and 
     merge their respective versions without introducing discrepancies.
     FileMerge displays both versions of a file side-by-side, 
     highlighting any differences. Changes can then be made
     automatically or manually merged into a new file, which is
     displayed in an editable window. FileMerge can also compare
     two modified versions with the common ancestor file from which
     they were derived.


MakeTool. MakeTool adds a graphical OPEN LOOK(R) front-end to the
     traditional UNIX make facility and eases the process of makefile 
     interpretation and execution. In addition to the classic make 
     functionality of determining what source files need to be
     recompiled, MakeTool also provides a rule and macro browser.
     The new MakeFile Browser allows the developer to easily expand
     the makefile rules and macros, thereby increasing productivity
     while reducing errors.


*Nanette Harter is the SPARCworks product manager. She can be reached
 at nanette.harter@eng.sun.com.

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

"Introducing SunPro 
 A New Business Dedicated to Professional Programmers"
 by David Reim


Power Tools for the Professional Programmer

     Most people know Sun as a systems manufacturer. But Sun has always
recognized that to be the leader in the workstation market, you've got 
to offer more than hardware. That's why Sun has continuously invested 
in key areas of software technology, including tools to increase the 
productivity of professional programmers. 

     Recognizing that this sustained investment has resulted in an 
established product line and an experienced team, Sun Microsystems 
has now formed SunPro, a business unit 100% dedicated to meeting the 
needs of professional programmers. Sun has transferred to SunPro its 
entire line of compiler and software development tools, along with 
the associated engineering, marketing, and support staffs.

     SunPro has developed a broad range of software products to support
the professional programmer. SunPro's products include compilers for 
every major programming language, individual programmer productivity 
tools, and ground-breaking products to support teams of programmers. 
Ten years of development has resulted in a proven, robust, and 
technologically advanced product line.


A Pioneer in UNIX Development Environments

      In June 1982, just four months after it was founded, Sun hired 
Richard Tuck -- who is still with SunPro as a senior staff engineer -- 
as its first software engineer dedicated to compiler development. Steve 
Muchnick, now a distinguished engineer with SunPro, served as a manager 
of software engineering in 1984, overseeing a staff of five. The 
existence of such a team in Sun's early days demonstrated the company's 
substantial commitment to software development products. Today, that 
team has turned into a business unit with a wide variety of products 
and almost 200 employees.

     "Sun recognized early on that hardware alone was not enough," 
Muchnick recalls. "If you are going to be the UNIX-based workstation 
company, you've got to make a significant investment not only in UNIX, 
but in the software tools. That's how we attracted developers to what 
was then a relatively unproven hardware platform."

     At that time, Sun's own engineers were its biggest customers. Early 
versions of the products that are now sold by SunPro were used to write 
SunOS, which became the leading volume platform for client-server 
computing.

    The experience of working with hundreds of professional internal 
developers helped to shape SunPro's technology strategy and resulted
in today's line of leading software development tools. SunPro continues 
this tradition by supplying the first software development products for
Solaris 2.0, the SVR4-based distributed computing solution to be 
delivered by SunSoft, another Sun Microsystems business unit.


Flexibility to Meet New Challenges

     Over the years, SunPro has produced products for three major CPU 
architectures: Motorola(R), Intel, and SPARC. More recently, Sun began 
dedicating its resources to developing programming tools specifically 
for the SPARC market. SunPro will continue to lead this market, and is 
also committed to supporting SunSoft as it ports its Solaris environment 
to the Intel 80X86 and other computing architectures.

     In addition to tracking changes in hardware evolution, SunPro is 
on the leading edge of software innovation. SunPro products have already 
pioneered new areas such as workgroup development and RISC compiler 
optimization, and are poised to break new ground in areas like 
object-oriented programming, multithreaded development and open, 
integrated tool environments.


Technology Strategy

     Ten years in the workstation software development market has 
given the SunPro staff insight into the needs of today's developers 
and the trends that will affect them. With this experience, SunPro 
has chosen to invest in three areas of software development technology; 
(1) compilers, (2) tools for individual programmer productivity, and 
(3) tools to increase the productivity of teams of programmers.


Compilation Technology

     With the advent of RISC technology, the role of the compiler 
has increased in importance. The SunPro staff includes leading 
experts in optimization and floating-point technology who have patents
pending for advanced algorithms used in the SunPro products. The team's 
early commercial efforts were among the first to introduce new forms of 
RISC-based optimization techniques that were focused on producing 
faster applications.

     Today, SunPro's family of compiler products, SPARCompilers, is the 
volume leader for SPARC-based workstations. SunPro maintains this lead 
by investing in support for new software paradigms, such as object-
oriented programming (OOP) and multithreading, as well as new hardware 
architectures like multiprocessors, 64-bit processors, and advanced 
RISC implementations such as superscaler. In addition, SunPro has 
expanded its product line in areas like COBOL and Ada to track the 
growing success of UNIX in the commercial and government sectors.


Individual Programmer Productivity

     With more than a thousand internal Sun developers and hundreds of 
thousands of external customers, SunPro recognizes the productivity 
requirements of the individual programmer. The SPARCworks family of 
programming tools is designed to satisfy the needs of professional 
developers who are building applications that are too demanding for 
the simpler hardware and operating systems of personal computers.

     These tools -- which help programmers develop, refine, test, 
analyze, and maintain code -- are well integrated through the use of 
SunSoft's ToolTalk open inter-application communication facility. 
SPARCworks tools use the OPEN LOOK graphical user interface and support
productivity features such as drag-and-drop, integration with the 
Solaris DeskSet personal productivity tools, and Answer Book on-line 
documentation. These tools provide a consistent development environment 
for C+ +, ANSI C, FORTRAN, and Pascal programmers. The Ada and COBOL 
products are shipped with tools developed especially for these 
languages. 

     The main thrust of product development in this area is to support 
the emerging OOP market and its need for powerful graphical tools. 
SunPro is also looking ahead to the development of products for 
multithreaded and parallel processing environments.


Workgroup Development Tools

      As software projects grow larger and more complex, tools are 
needed that can help coordinate the efforts of the group. Today's 
large projects introduce complex interdependencies as they evolve. 
One programmer's code impacts, and is affected by, the code of other
team members. Moreover, elements of a project may be developed in 
parallel, requiring that programmers coordinate their changes without 
interfering with each other's work.

     Sun pioneered the development of advanced software products to 
accelerate workgroup development with the Network Software Environment
 (NSE). Since its introduction in 1988, the NSE has demonstrated the 
importance and value of workgroup development tools. Its products 
have introduced advanced features for supporting concurrent release 
integration and software configuration management. The NSE was used 
by Sun Microsystems to develop the SunOS operating system and is 
currently being used by SunSoft to develop Solaris 2.0. The NSE is 
the most widely licensed workgroup development product in the UNIX
marketplace.

     SunPro recognizes the importance of workgroup development and is
 investing heavily in new workgroup products which will be available
 for Solaris 2.0. These new products draw on SunPro's experience and 
knowledge in this area and will be easier to use, faster, and more 
scalable than their predecessors. They will extend the SPARCworks 
product family and provide the software development team with a 
powerful collection of development tools.


Product Packaging and Distribution

     In the past, SunPro products were sold exclusively by the Sun 
Microsystems direct sales force and Sun hardware resellers. Although 
SunPro will continue to rely heavily on these channels, it is also 
developing new ways to get its products into customers' hands. As a 
software business, SunPro is adopting the PC software model of 
packaging and distribution by implementing new programs that include 
shrink-wrapped binary distribution, floating network-licenses, and 
on-line documentation.

     Today, SunPro products are available through a variety of channels. 
The business continues to use the Sun Microsystems Computer Corporation 
direct sales force, but it has also added other OEMs such as Fujitsu. 
SunPro products are available through indirect channels such as 
SunExpress, Sun's new telemarketing organization. The SunPro products 
are available through master distributors like Access Graphics and 
SPARC-compatible manufacturers such as Solbourne and Toshiba.


*David Reim is the Marketing Programs Manager. He can be reached at
   david.reim@eng.sun.com.

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

"Choosing an Object-Oriented Language
A Few Factors to Consider When Selecting an Object-Oriented 
Programming Language"
by Kim Polese and Theodore C. Goldstein


     If there's one development paradigm that every software 
engineer should learn and understand, it's object-oriented 
programming (OOP). Object-oriented programming has become 
the vanguard of desirable software design and its influence 
now appears in development projects across virtually every 
sector of the computer industry. However, there are a number 
of major OOP-oriented programming languages and the one you 
choose will have a significant impact on your project. This 
article will give you criteria for examining OOP language 
options.


The OOP Paradigm

     The OOP paradigm provides both a mechanism and a methodology 
for reusing code as well as for creating well-structured programs. 
The focus in OOP is on describing all data structures as "objects." 
Each object has an interface, called its "class," which defines the 
set of functions or "methods" that are called the object's "behavior."
By composing a hierarchy of classes, behavior defined high up in 
the hierarchy is used to define behavior below. Behavior common to 
several classes is shared by using a mechanism called "inheritance."

      Another benefit common to OOP languages is "polymorphism," the 
ability to define class-specific behavior. Polymorphism occurs when 
the same function has different implementations depending on the 
class of object that is passed to it. All of the different 
implementations, however, are invoked the same way. Polymorphism 
reduces the need to define separate functions for desired behaviors, 
and is one of the most powerful techniques in the object-oriented 
programmer's toolbox.


Picking the Right OOP Language

     Once the decision has been made to use the object-oriented 
approach in a software project, the next step is selecting an OOP 
language.

     Object-oriented programming cannot be done well in a traditional 
language such as C or FORTRAN because code is often replicated 
unnecessarily. Programmers are forced to do much of the bookkeeping of
tracking which function goes with which object -- the job that OOP 
language compilers are designed to do. In addition, OOP languages 
deal explicitly with the concepts of inheritance and polymorphism.

     No one language is ideally suited to every application. In fact, 
language selection may hinge simply on the basis of current programmers' 
styles and tastes. C programmers might prefer to adopt C++, for example. 
Nevertheless, there are many important factors to consider when 
selecting an OOP language:

      *      Language Extensibility

      Can the compiler of the original language be extended to build 
      a new language? This is useful for creating domain-specific 
      languages to express a problem and its solution.

      *      The Development Environment

      Does the language provide one? Development environments greatly
      accelerate the process of developing object-oriented software.

      *      The Run-Time System

      Does the language define a base library of user interface and
      data structure classes that are guaranteed to be present in 
      every implementation? A standard library provides a foundation 
      and an organizing architecture to provide a common platform for 
      development.

      *      Garbage Collection

      Does the system automatically dispose of objects that are no 
      longer used by the program? This feature avoids many bugs and 
      removes a lot of clutter from code.
	
      Modern garbage collection can reduce GC overhead to as low as
      3%. Languages that perform garbage collection, however, cannot 
      be used in a real-time system due to the added runtime burden.

      *      Pure vs. Hybrid

      Is the language grafted onto some other, usually traditional 
      programming language? 

      An advantage of hybrid languages is that the programmer can learn 
      syntax quickly because it is relatively familiar.

      Some hybrid languages are more efficient than pure languages for 
      certain applications because they allow programmers to intermix a 
      lower-level language and remove layers of abstraction when greater 
      efficiency is desired. Pure languages, however, are simpler 
      because there is a single paradigm for programmers to understand.

      *      Mono-Rooted vs. Multiple-Rooted Class Hierarchy

      Do all classes in the language inherit from a single, universal 
      root class (mono-rooted), or can there be any number of different
      root or base class (multi-rooted) hierarchies? Universal root
      classes complicate the compilation process and encourage the poor
      programming practice of placing functionality in the root "Object" 
      class. Multiple-rooted classes hierarchies make multiple
      inheritance easier.

      *      Compile-Time-Bound vs. Run-Time-Bound Languages

      Is the binding between polymorphically defined methods and their
      classes done at compile-time or at run-time or some combination?
      Does the compiler do all the type checking? Compile-time binding
      is a common kind of compiler error checking done to ensure that
      all names are defined before they are used and that the system
      "type checks" correctly. With run-time binding, the system checks
      an operation only when it is used. 

      Run-time binding allows for extremely fast edit-compile-run
      turnaround (frequently less than a second). But run-time binding
      requires extensive testing of an application to ensure that all
      binding references have been resolved. Compile-time binding is 
      used in most traditional programming languages.

      *      Single vs. Multiple Inheritance 

      Can a subclass inherit from more than one class? Multiple
      inheritance complicates a language, but also gives compile-
      time-bound languages some of the flexibility of a run-time-bound 
      system. Multiple inheritance is less important in run-time-bound 
      languages in which it is easy to duplicate behavior (functions)
      between objects without inheritance, and in so doing, achieve
      a greater measure of polymorphism.

     The most popular object-oriented languages running on SPARC
architectures are Smalltalk, Common Lisp Object System (CLOS), Eiffel,
Objective-C and C++.  Each provides a different combination of features. 
The language feature comparison table above provides a summary.

     C++ is the language of choice for many software development 
projects at Sun and is currently being being used in the development 
of system and application software. C++ fixes many of C's type-checking
problems and adds classes within the C language framework. C++ maintains
C's affordability in terms of hardware cost and good run-time performance,
and is portable across a wide range of platforms. Similarity to C means 
easy access to large amounts of shared code such as databases and 
libraries.  For companies with significant C code assets (and C 
programmers), selecting C++ virtually eliminates the need to recode. By 
simply recompiling and fixing bugs which most C compilers ignore (but
shouldn't), most popular C programs will readily run in a C++ 
environment.

     SunPro has invested significant time and resources into producing 
a world-class C++ compiler and development environment. SPARCompiler 
C++ 2.1, which is based on version 2.1 of AT&T's cfront C++ translator, 
includes support for ANSI C, a suite of class libraries, and integration 
with the SPARCworks development environment. This integration includes 
name demangling in the debugger and object oriented extensions to 
classic UNIX tools like prof and yacc.

     The next release of SPARCompiler C++ will feature an extensive set 
of new development tools, including a class browser, class grapher, 
function call grapher, performance analyzer and tuner, file merge 
facility and a graphical makefile browser. The C++ compiler will be 
based on AT&T cfront 3.0, and will include the powerful new "templates" 
feature.

     SPARCompiler C++, which has been selling worldwide since 1989, is 
the leading OOP compiler for SPARC and can give your project the 
competitive edge you're looking for.


*Kim Polese is the Product Manager for SPARCompiler C++. She can be
 reached at kim.polese@eng.sun.com.

*Theodore C. Goldstein is a staff engineer and researcher in object-
 oriented operating systems and languages at Sun Microsystems
 Laboratories, Inc. He can be reached at tedg@eng.sun.com.


"This article is a subset of "OOP Language and Methodologies," which
 originally appeared in the May 1991 edition of SunWorld. SunProgrammer
 would like to thank the editors of SunWorld for allowing us to reprint
 this adaptation."


TRACE: To: sunflash@housun.Central Errors-to: owner-sunflash@housun.Central.sun.com
Newsgroups: lou.sun