Annotation of researchv10no/cmd/sml/src/basics/stampset.sig, revision 1.1

1.1     ! root        1: (* Copyright 1989 by AT&T Bell Laboratories *)
        !             2: (* stampset.sig *)
        !             3: 
        !             4: (* two abstract types: stampset, realization
        !             5: 
        !             6:   stampset -- represents a set of stamps
        !             7:   'a realization -- represents a (finite) mapping of elements of a stampset to 'a
        !             8: 
        !             9:   stampsets and stampmaps are objects, in that they have state.  The only
        !            10:   changes to their states will be to add stamps or mappings, respectively.
        !            11: 
        !            12:   Each signature will contain a pair of stampsets: a type stampset and a
        !            13:   structure stampset.  These represent the bound stamps in the signature.
        !            14: 
        !            15:   Functors will also contain a pair of stampsets specifying the generatively bound
        !            16:   stamps in their body structure.
        !            17: 
        !            18:   A global pair of stampsets will contain the "fixed" or "free" stamps.
        !            19: 
        !            20:   All type (resp. structure) stampsets will be disjoint.
        !            21: 
        !            22: *)
        !            23: 
        !            24: signature STAMPSET =
        !            25: sig
        !            26: 
        !            27:   type stamp
        !            28:   type stampset      (* represents a set of stamps *)
        !            29:   type stampsets     (* a record containing two stampsets for structures
        !            30:                        and type constructors *)
        !            31:   type 'a stampmap   (* represents a finite mapping over a stampset to type 'a *)
        !            32: 
        !            33:   val newStampset: unit -> stampset
        !            34:     (* generate a new stampset, guaranteed to be disjoint from any
        !            35:        existing stampset *)
        !            36: 
        !            37:   val newStampsets : unit -> stampsets
        !            38:     (* generate a record containing two new stampsets *)
        !            39: 
        !            40:   val member : stamp * stampset -> bool
        !            41:     (* tests membership in a stampset *)
        !            42: 
        !            43:   val newStamp : stampset -> stamp
        !            44:     (* generate a new member of the given stampset *)
        !            45: 
        !            46:   val newMap : stampset * '1a -> '1a stampmap
        !            47:     (* generate a new stampmap over a given stampset with given default value *)
        !            48: 
        !            49:   val updateMap : 'a stampmap -> stamp * 'a -> unit
        !            50:     (* add mapping to a stampmap *)
        !            51: 
        !            52:   val applyMap : 'a stampmap * stamp -> 'a
        !            53:     (* apply stampmap to a stamp *)
        !            54: 
        !            55:   val join : stampset * stampset -> stamp -> stamp 
        !            56:     (* join(A,B) produces a translation function for elements of B and
        !            57:        adds translated version of B to A, side-effecting A *)
        !            58: 
        !            59:   val fixedStrStamps : stampset
        !            60:   val fixedTycStamps : stampset
        !            61:   val globalStamps : stampsets
        !            62:   val sigStamps : stampset
        !            63:  
        !            64:   val strFixed : stamp -> bool
        !            65:   val tycFixed : stamp -> bool
        !            66: 
        !            67: end (* STAMPSET *)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.