Changes between Version 5 and Version 6 of LibraryDeclarationsCowan


Ignore:
Timestamp:
06/06/13 11:48:24 (4 years ago)
Author:
cowan
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • LibraryDeclarationsCowan

    v5 v6  
    4545The named ''identifiers'' should be processed so as to maximize ease of debugging to the extent specified by ''importance''. 
    4646 
     47=== Numeric tower === 
     48 
     49`(numeric-tower ` ''identifier'' ...`)` 
     50 
     51The ''identifiers'' indicate the assumptions the library makes about the availability of different kinds of numbers.  They may appear in any order, and have the following meanings: 
     52 
     53`exactness-preserving` 
     54 
     55The library relies on arithmetic operators other than `/` returning exact results when given exact arguments. 
     56 
     57`no-exactness-preserving` 
     58 
     59The library does not rely on arithmetic operators other than `/` returning exact results when given exact arguments. 
     60 
     61`ratios` 
     62 
     63The library relies on `/` returning exact results when given exact arguments. 
     64 
     65`no-ratios` 
     66 
     67The library does not rely on `/` returning exact results when given exact arguments. 
     68 
     69`inexact` 
     70 
     71The library relies on the availability of inexact numbers. 
     72 
     73`no-inexact` 
     74 
     75The library does not rely on the availability of inexact numbers. 
     76 
     77`complex` 
     78 
     79The library relies on the availability of non-real numbers. 
     80 
     81`no-complex` 
     82 
     83The library relies on the availability of non-real numbers. 
     84 
     85`exact-complex` 
     86 
     87The library does not rely on the availability of exact non-real numbers. 
     88 
     89`no-exact-complex` 
     90 
     91The library relies on the availability of exact non-real numbers. 
     92 
     93For example, the declaration `(no-exactness-preserving no-ratios inexact no-complex)` means that the library assumes only a limited range of exact integers, with numeric operations potentially overflowing to inexact reals.  In consequence, it cannot run on an implementation that does not provide these features, and an implementation that provides non-integer exact numbers and non-real numbers may assume that these features are not used. 
     94 
     95It is an error to specify any other identifier. 
     96 
     97=== Types === 
     98 
     99`(type ''identifier'' ''predicate'') 
     100 
     101The implementation may assume that ''identifier'' always has a value that will satisfy the predicate bound to ''predicate''.  If `#t` appears instead of ''predicate'', any value will satisfy it, but the absence of a value will not. 
     102 
     103`(procedure-type ''identifier return-predicate arg-predicate'' ... `)` 
     104 
     105`(procedure-type ''identifier` ( `''return-predicate'' ...`) `''arg-predicate'' ... `)` 
     106 
     107The implementation may assume that ''identifier'' always has a value that is a procedure.  When this procedure is invoked, its value satisfies the predicate bound to ''return-predicate'' (for the first format) or its values satisfy the predicates bound to the ''return-predicates'' (for the second format).  In addition, its arguments (or an initial subsequence of them) satisfy the ''arg-predicates''.  f `#t` appears instead of a predicate identifier, any value will satisfy it, but the absence of a value will not. 
     108 
     109'''Issue:  This introduces phasing complications (where and when are the predicates bound?) which must be resolved as part of a comprehensive treatment of phasing.''' 
     110 
    47111=== Compilation === 
    48112