git @ Cat's Eye Technologies SixtyPical / e2d10d7
Documentation/notes changes for the 0.13 branch. Chris Pressey 3 years ago
3 changed file(s) with 11 addition(s) and 13 deletion(s). Raw diff Collapse all Expand all
00 History of SixtyPical
11 =====================
2
3 0.13
4 ----
5
6 * It is a static analysis error if it cannot be proven that a read or write
7 to a table falls within the defined size of that table.
8 * The reference analyzer's ability to prove this is currently fairly weak,
9 but it does exist.
210
311 0.12
412 ----
00 SixtyPical
11 ==========
22
3 _Version 0.12. Work-in-progress, everything is subject to change._
3 _Version 0.13. Work-in-progress, everything is subject to change._
44
55 SixtyPical is a very low-level programming language, similar to 6502 assembly,
66 with static analysis through abstract interpretation.
4343 This preserves them, so that, semantically, they can be used later even though they
4444 are trashed inside the block.
4545
46 ### Range checking in the abstract interpretation
47
48 If you copy the address of a buffer (say it is size N) to a pointer, it is valid.
49 If you add a value from 0 to N-1 to the pointer, it is still valid.
50 But if you add a value ≥ N to it, it becomes invalid.
51 This should be tracked in the abstract interpretation.
52 (If only because abstract interpretation is the major point of this project!)
53
54 Range-checking buffers might be too difficult. Range checking tables will be easier.
55 If a value is ANDed with 15, its range must be 0-15, etc.
56
5746 ### Re-order routines and optimize tail-calls to fallthroughs
5847
5948 Not because it saves 3 bytes, but because it's a neat trick. Doing it optimally
6150
6251 ### And at some point...
6352
53 * Confirm that `and` can be used to restrict the range of table reads/writes.
6454 * `low` and `high` address operators - to turn `word` type into `byte`.
6555 * `const`s that can be used in defining the size of tables, etc.
6656 * Tests, and implementation, ensuring a routine can be assigned to a vector of "wider" type
2626
2727 * T table[N] (N is a power of 2, 1 ≤ N ≤ 256; each entry holds a value
2828 of type T, where T is `byte`, `word`, or `vector`)
29 * buffer[N] (N entries; each entry is a byte; N is a power of 2, ≤ 64K)
29 * buffer[N] (N entries; each entry is a byte; 1 ≤ N ≤ 65536)
3030 * vector T (address of a value of type T; T must be a routine type)
3131
3232 ### User-defined ###