add docs
This commit is contained in:
parent
5c531428af
commit
98ce1e0ed6
37
hoax.tal
37
hoax.tal
|
@ -50,6 +50,43 @@
|
|||
( 40 n/a rational rational number (bc/de) )
|
||||
( 50 n/a bool (not allocated but used as type) )
|
||||
( 60 n/a builtin (not allocated but used as type) )
|
||||
( )
|
||||
( INVARIANTS )
|
||||
( )
|
||||
( 1. integers should always be stored in the most compact way )
|
||||
( a. for integer object n, abs(n) > 16383. )
|
||||
( 2. long string/symbols have non-empty terminators )
|
||||
( a. empty strings are only allowed on their own )
|
||||
( b. empty symbols are never allowed )
|
||||
( 3. rationals should be in normal form )
|
||||
( a. positive denominator > 1 )
|
||||
( b. non-zero numerator )
|
||||
( c. gcd(numerator, denominator) should be 1 )
|
||||
( )
|
||||
( EFFICIENCY )
|
||||
( )
|
||||
( EXPRESSION SIZE (including ref) )
|
||||
( #t 2 bytes )
|
||||
( #f 2 bytes )
|
||||
( 0 2 bytes )
|
||||
( 16383 2 bytes )
|
||||
( 16384 7 bytes )
|
||||
( 16384 7 bytes )
|
||||
( 4294967295 7 bytes )
|
||||
( 4294967296 12 bytes )
|
||||
( -4294967295 7 bytes )
|
||||
( -4294967296 12 bytes )
|
||||
( 281474976710655 12 bytes )
|
||||
( -281474976710655 12 bytes )
|
||||
( null 2 bytes )
|
||||
( (1 . null) 7 bytes )
|
||||
( (1 . (2 . null)) 12 bytes )
|
||||
( "" 7 bytes )
|
||||
( "a" 7 bytes )
|
||||
( "abcd" 7 bytes )
|
||||
( "abcde" 12 bytes )
|
||||
|
||||
( TODO: special case empty string? )
|
||||
|
||||
%NL { #0a18 DEO }
|
||||
%SP { #2018 DEO }
|
||||
|
|
Loading…
Reference in New Issue