awelon icon indicating copy to clipboard operation
awelon copied to clipboard

Reflection/Introspection API

Open dmbarbour opened this issue 11 years ago • 0 comments

Awelon Bytecode does not provide primitive operators for reflection and introspection because these are security sensitive operations. However, it has always been expected that access to these utilities should be available through ABC's effects model.

It seems to me that I should develop a good capability-secure API (starting with a conventional power block) for introspection and reflection. For the moment, I'm disabling the writeABCFile/readABCFile functions with the goal that most of said logic should be accomplished through fine-grained operations and capabilities.

General Requirements

I should be able to determine the structure of most values:

  • is it a sum, a product, a unit value, a block?; perhaps x → (x+x)
  • is it a sealed value?
    • if so, a hint/brand/fingerprint for the sealer (i.e. to support key rings)
    • ability to unseal discretionary sealed values
    • no general ability to unseal fully sealed values because might be encrypted
  • for a block:
    • ability to serialize blocks and peek inside?

I still need to decide how to represent fully sealed values within a block, i.e. with respect to serializing the block. I have a few ideas for this, including representing them as embedded ciphertext wrapped with a special {:sealer} variation. But this is mostly a separate issue.

dmbarbour avatar Aug 14 '14 19:08 dmbarbour