Changeset 6a93e4d


Ignore:
Timestamp:
Jun 6, 2023, 8:39:07 AM (11 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ast-experimental, master
Children:
541dbc09
Parents:
874b16e
Message:

make trait names not, equality, relational, additive, inc_dec, multiplicative, arithmetic, lower-case

Location:
libcfa/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/math.trait.hfa

    r874b16e r6a93e4d  
    1010// Created On       : Fri Jul 16 15:40:52 2021
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb  2 11:36:56 2023
    13 // Update Count     : 20
     12// Last Modified On : Tue Jun  6 07:59:17 2023
     13// Update Count     : 24
    1414//
    1515
     
    1717
    1818forall( U )
    19 trait Not {
     19trait not {
    2020        void ?{}( U &, zero_t );
    2121        int !?( U );
    22 }; // Not
     22}; // not
    2323
    24 forall( T | Not( T ) )
    25 trait Equality {
     24forall( T | not( T ) )
     25trait equality {
    2626        int ?==?( T, T );
    2727        int ?!=?( T, T );
    28 }; // Equality
     28}; // equality
    2929
    30 forall( U | Equality( U ) )
    31 trait Relational {
     30forall( U | equality( U ) )
     31trait relational {
    3232        int ?<?( U, U );
    3333        int ?<=?( U, U );
    3434        int ?>?( U, U );
    3535        int ?>=?( U, U );
    36 }; // Relational
     36}; // relational
    3737
    3838forall ( T )
    39 trait Signed {
     39trait Signed {  // must be capitalized, conflict with keyword signed
    4040        T +?( T );
    4141        T -?( T );
     
    4444
    4545forall( U | Signed( U ) )
    46 trait Additive {
     46trait additive {
    4747        U ?+?( U, U );
    4848        U ?-?( U, U );
    4949        U ?+=?( U &, U );
    5050        U ?-=?( U &, U );
    51 }; // Additive
     51}; // additive
    5252
    53 forall( T | Additive( T ) )
    54 trait Incdec {
     53forall( T | additive( T ) )
     54trait inc_dec {
    5555        void ?{}( T &, one_t );
    5656        // T ?++( T & );
     
    5858        // T ?--( T & );
    5959        // T --?( T & );
    60 }; // Incdec
     60}; // inc_dec
    6161
    62 forall( U | Incdec( U ) )
    63 trait Multiplicative {
     62forall( U | inc_dec( U ) )
     63trait multiplicative {
    6464        U ?*?( U, U );
    6565        U ?/?( U, U );
    6666        U ?%?( U, U );
    6767        U ?/=?( U &, U );
    68 }; // Multiplicative
     68}; // multiplicative
    6969
    70 forall( T | Relational( T ) | Multiplicative( T ) )
    71 trait Arithmetic {
    72 }; // Arithmetic
     70forall( T | relational( T ) | multiplicative( T ) )
     71trait arithmetic {
     72}; // arithmetic
    7373
    7474// Local Variables: //
  • libcfa/src/parseconfig.cfa

    r874b16e r6a93e4d  
    203203
    204204
    205 forall(T | Relational( T ))
     205forall(T | relational( T ))
    206206[ bool ] is_nonnegative( & T value ) {
    207207        T zero_val = 0;
     
    209209}
    210210
    211 forall(T | Relational( T ))
     211forall(T | relational( T ))
    212212[ bool ] is_positive( & T value ) {
    213213        T zero_val = 0;
     
    215215}
    216216
    217 forall(T | Relational( T ))
     217forall(T | relational( T ))
    218218[ bool ] is_nonpositive( & T value ) {
    219219        T zero_val = 0;
     
    221221}
    222222
    223 forall(T | Relational( T ))
     223forall(T | relational( T ))
    224224[ bool ] is_negative( & T value ) {
    225225        T zero_val = 0;
  • libcfa/src/parseconfig.hfa

    r874b16e r6a93e4d  
    107107
    108108
    109 forall(T | Relational( T ))
     109forall(T | relational( T ))
    110110[ bool ] is_nonnegative( & T );
    111111
    112 forall(T | Relational( T ))
     112forall(T | relational( T ))
    113113[ bool ] is_positive( & T );
    114114
    115 forall(T | Relational( T ))
     115forall(T | relational( T ))
    116116[ bool ] is_nonpositive( & T );
    117117
    118 forall(T | Relational( T ))
     118forall(T | relational( T ))
    119119[ bool ] is_negative( & T );
    120120
Note: See TracChangeset for help on using the changeset viewer.