1
0
mirror of https://github.com/catseye/SixtyPical.git synced 2024-06-07 06:29:32 +00:00

Documentation/notes changes for the 0.13 branch.

This commit is contained in:
Chris Pressey 2018-02-16 09:51:24 +00:00
parent 0e0a3d552a
commit e2d10d7d33
3 changed files with 11 additions and 13 deletions

View File

@ -1,6 +1,14 @@
History of SixtyPical
=====================
0.13
----
* It is a static analysis error if it cannot be proven that a read or write
to a table falls within the defined size of that table.
* The reference analyzer's ability to prove this is currently fairly weak,
but it does exist.
0.12
----

View File

@ -1,7 +1,7 @@
SixtyPical
==========
_Version 0.12. Work-in-progress, everything is subject to change._
_Version 0.13. Work-in-progress, everything is subject to change._
SixtyPical is a very low-level programming language, similar to 6502 assembly,
with static analysis through abstract interpretation.
@ -44,17 +44,6 @@ TODO
This preserves them, so that, semantically, they can be used later even though they
are trashed inside the block.
### Range checking in the abstract interpretation
If you copy the address of a buffer (say it is size N) to a pointer, it is valid.
If you add a value from 0 to N-1 to the pointer, it is still valid.
But if you add a value ≥ N to it, it becomes invalid.
This should be tracked in the abstract interpretation.
(If only because abstract interpretation is the major point of this project!)
Range-checking buffers might be too difficult. Range checking tables will be easier.
If a value is ANDed with 15, its range must be 0-15, etc.
### Re-order routines and optimize tail-calls to fallthroughs
Not because it saves 3 bytes, but because it's a neat trick. Doing it optimally
@ -62,6 +51,7 @@ is probably NP-complete. But doing it adeuqately is probably not that hard.
### And at some point...
* Confirm that `and` can be used to restrict the range of table reads/writes.
* `low` and `high` address operators - to turn `word` type into `byte`.
* `const`s that can be used in defining the size of tables, etc.
* Tests, and implementation, ensuring a routine can be assigned to a vector of "wider" type

View File

@ -27,7 +27,7 @@ There are also three *type constructors*:
* T table[N] (N is a power of 2, 1 ≤ N ≤ 256; each entry holds a value
of type T, where T is `byte`, `word`, or `vector`)
* buffer[N] (N entries; each entry is a byte; N is a power of 2, ≤ 64K)
* buffer[N] (N entries; each entry is a byte; 1 ≤ N ≤ 65536)
* vector T (address of a value of type T; T must be a routine type)
### User-defined ###