[<<][meta][>>][..]
Sat Jan 22 10:24:41 EST 2011
First class signatures
What I want is to combine a model@ unit and a num@ unit and run an
analysis. This can be done by creating a compound unit that returns
an expression, link it, and use `invoke-unit' to obtain the expression.
(define test@
(unit (import) (export) 123))
# (invoke-unit test@) => 123
Linking a unit works as follows. For each unit in the composition,
define a link-id for each export signatures (capital letters below).
These link-id are used only during linking. I believe these are
distinguished from signature names to allow for multiple instances of
the same signature.
(define analysis@
(compound-unit
(import)
(export DOMAIN MODEL)
;; exports unit imports
;; --------------------------------------
(link [((DOMAIN : num^)) num-anf@ MODEL]
[((MODEL : example^)) example@ DOMAIN])))
Ok, it's working for staapl/absint. The following instantiates the
`run' function defined in the example@ unit over 3 different domains:
((num-run num-anf@ example@) 1 2)
((num-run num-expr@ example@) 1 2)
((num-run num-eval@ example@) 1 2)
[Reply][About]
[<<][meta][>>][..]