Copyright (C) 2014 Free Software Foundation

This file is part of the C++ SLIP library.  This library is free
software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the
Free Software Foundation; either version 3, or (at your option)
any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.

You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
<http://www.gnu.org/licenses

1.0 Advertisement

This is a C++ implementation of SLIP, a program developed by Dr. Weizenbaum. It is a functional extension of the capabilities provided in the C++ Standard Template Library (STL) list and queue containers. SLIP is not a replacement for the STL containers. 
 
Gnu SLIP provides a set of API's which allow a program to create and manage lists, queues, trees, and acyclic graphs. As a robust API it can be considered as a sublanguage incorporated into C++ which provides the required functionality.

Two aspects of particular note are the ability to use Gnu SLIP data cells in computations and the ability to create application specific cells which can be used in computations in an application specific way. An example of using Gnu SLIP data cells in a computation:

    #inlude <slip/slip.h>
    #include <cmath>
    SlipDatum a = new SlipDatum((double) 3.0); // f(x) 3x**2 + 6x + 3
    SlipDatum b = new SlipDatum((double) 6.0);
    SlipDatum c = new SlipDatum((double) 3.0);
    double    x = (-b + sqrt(b*b - 4*a*c))/2*a;  // yielding one root

Gnu SLIP does not have garbage collection and does not use the heap. It is developed to allow use in embedded systems and can be declared to have fixed space requirements.


A comparison in functionality between SLIP and STL containers:
   -------------------------------------------------------------------------
    description                     | SLIP|STL | comments                  |
   ---------------------------------+-----+----+---------------------------|
   support lists                    | YES |YES | support is automatic      |
   support queues                   | YES |YES | support is automatic      |
   linear iterator                  | YES |YES |                           |
   structural iterator              | YES |NO  | STL does support graphs   |
   dynamic list cell expansion      | YES |YES | support is automatic      |
   double linked lists              | YES |YES | support is automatic      |
   single linked lists              | NO  |YES |                           |
   static user defined objects      | NO  |YES |                           |
   acyclic graphs                   | YES |NO  | support is automatic      |
   trees                            | YES |NO  | support is automatic      |
   data objects in expressions      | YES |NO  | a + b w/ a or b SLIP cells|
   dynamic user defined objects     | YES |NO  | dynamic data typing       |
   association list                 | YES |NO  | <key, value> pairs        |
   round-trip list I/O              | YES |NO  | no I/O in STL             |
   an input data language           | YES |NO  | offline list construction |
   list sharing                     | YES |NO  | STL has no sublists       |
   non-heap cell allocation         | YES |NO  | SLIP implements delete/new|
   a vibrant community of developers| YES |NO  | Well, what did you expect |
   -------------------------------------------------------------------------

Round-trip I/O supports the output and exact input of a list. A floating point number will be fully recovered on input and this applies to all other SLIP and application data types. Output is an ASCII file, and hence, manually modifiable. Since the input is ASCII, an application can (also) manually construct a database for input as required. An example of an Input list is:

    list4 (  "string" { 0x22 (5)} 9 10 )
    ( 1 2 ( 3 4 ) list4 )

Representing:  ( 1 2 ( 3 4 ) "string" ( 0x22 ( 5 ) 9 10 )

      
   SLIP supports a greater variety of structures than STL lists, and provides significant additional capability but this comes at a cost. SLIP contains a large API and constraints not present in STL lists. In addition some care should be exercised in choosing SLIP over STL lists. It is not at all clear that SLIP should be used wherever it can, nor that the advantages of SLIP so far outweigh those of STL lists that they should be the choice of use. But there are significant pluses to SLIP when their use is warranted, in particular, any list can be output and input without user provided software and complex graphs can be created and traversed. Input and Output is round-trip.
   Input is exact, including floating point numbers, trees and graphs, and architecturally
   transparent.
   
   
   