Jump to content

Plus (programming language)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Skyerise (talk | contribs) at 13:03, 1 July 2010 (external link goes to the same place as SUE reference, so removing). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Plus
Paradigmimperative, structured
DeveloperAlan Ballard and Paul Whaley at UBC
First appeared1976
Typing disciplinestatic, strong, safe
OSMichigan Terminal System (MTS), OS/VS1
Major implementations
IBM System/370 and DEC PDP-11
Influenced by
SUE, Pascal

Plus is a "Pascal-like" system implementation language from the University of British Columbia (UBC),  Canada, based on the SUE[1] system language developed at the University of Toronto, circa 1971.

Description

Plus was developed at the University of British Columbia (UBC) Computing Centre by Alan Ballard and Paul Whaley for use with and for the development of the Michigan Terminal System (MTS), but the code generated by the compiler is not operating system dependent and so is not limited to use with or the development of MTS.

The Plus compiler is written largely in Plus, runs under the Michigan Terminal System (MTS) on IBM S/370 or compatible hardware or under IBM's OS/VS1, and generates code for either the IBM S/370 or the DEC PDP-11 architectures.

Plus is based to a large extent on the SUE System Language[1] developed at the University of Toronto, circa 1971. The SUE language was derived, particularly in its data structure facilities from Pascal.[2]

Plus is superficially quite different from SUE or Pascal; however the underlying language semantics are really quite similar. Users familiar with the C programming language will also recognize much of its structure and semantics in PLUS.

Goals for the compiler and the Plus language include:[3]

  1. Allow and encourage reasonable program structures
  2. Provide problem-oriented data structures
  3. Allow and encourage readable and understandable source code
  4. Allow for parametrization using symbolic constants
  5. Actively assist in the detection and isolation of errors, at compile-time if possible and optionally at run-time where necessary
  6. Generate efficient code
  7. Provide facilities necessary for systems programming
  8. Provide reasonably efficient compilation including separate compilation of different parts of a program
  9. Optionally produce symbol (SYM) information allowing programs to be debugged using a Symbolic Debugging System such as SDS under MTS

The 123 page manual, The PLUS Programming Language,[3] was available in the MTS file PLUS:MANUAL. The MTS file PLUS:LIBRARY.DOC contained a 139 page description of the source and object libraries available for use with Plus, PLUS Source Library Definitions (Revised January 1983). The MTS file PLUS:NEWS contained updates to Plus and the Plus environment. These files are no longer readily available, but there is work underway to make a PDF file of the Plus Programming Language manual available via a web archive.

"Hello, world" example

The "hello, world" example program prints the string "Hello, world!" to a terminal or screen display.

%Title := "Hello world";
%Include(Pluslist);
%Subtitle := "Definitions";
%Lower_Case := True;
 
/* Definitions that everyone needs */
%Include(Boolean, Numeric_Types, More_Numeric_Types, String_Types,
   More_String_Types);

/* A tasteful subset of procedure definitions */
%Include(Main);

/* Message routine definitions */
%Include(Message_Initialize, Message, Message_Terminate);

%Subtitle := "Local Procedure Definitions";
%Eject();
definition Main

  variable Mcb is pointer to Stream_Type;

  Mcb := Message_Initialize();
  Message("Hello, world!");
  Message_Terminate(Mcb);
  Mcb := Null;
  
end Main;

See also

References

  1. ^ a b The System Language for Project SUE, B. L. Clark and J. J. Horning of the Computer Systems Research Group and Department of Computer Science, University of Toronto, Proceedings of the SIGPLAN symposium on Languages for system implementation, 1971, pages 79-88
  2. ^ MTS Volume 2: Public file Descriptions, University of Michigan Computing Center, Ann Arbor, Michigan, 1984, pp. 350.1, 350.2
  3. ^ a b The PLUS Programming Language, Allan Ballard and Paul Whaley, pp. 2-5, revised 1981, Computing Centre, University of British Columbia