[racket] querying for compile-time information

From: Danny Yoo (dyoo at cs.wpi.edu)
Date: Fri Sep 10 14:29:13 EDT 2010

On Thu, Sep 9, 2010 at 5:21 PM, Ryan Culpepper <ryanc at ccs.neu.edu> wrote:
> One way is a compile-time table. See, for example, the implementation of
> typed scheme/racket:
>
> www.ccs.neu.edu/scheme/pubs/scheme2007-ctf.pdf

Thank you all for the help!  Ok, I think I've got something usable
now; I've put it up on github if you're interested.

    http://github.com/dyoo/permissions

It lets me do something like this:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
dyoo at kfisler-ra1:~/work/permissions$ racket
Welcome to Racket v5.0.1.
> (require "query.rkt")
> (query "t/open-image-url.rkt")
'("permission:network")
> (query "query.rkt")
'()
> (query "t/play-sound.rkt")
'("PERMISSION:SOUND" "PERMISSION:INTERNET")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

This is good; I'll be able to use this for Moby/WeScheme!  I needed to
statically figure out what permissions are needed by a program and its
dependencies, for the purposes of generating Android .apk packages.  I
had some hack earlier that did textual searching, but I like this
approach a lot more.


Posted on the users mailing list.