2008年10月19日星期日

pointer type

I shoudl enforce the typing rules on pointer, such that it can't be use improperly, by:
  1. use special type tag to distinguish poniter from other object, such as integer and float , even from other pointer
  2. pointer shoudl only be created by special operators, and a special type tag will be attached to it. pointer created by two operator will has different type tag
  3. pointer can only be added or sub some const from it, and still preserve its type.

In this way, pointer for two memory block will run in separation logic semantic
Somewhat like tagged mameory .

没有评论: