What's my vision of the future, where partial evaluation is a framework for system structure? I'll contrast it to conventional systems. I've drawn this picture before. Above the red line are apps written to POSIX; below, a set of run-time services written to the interface of the machine architecture. Those run-time services are packaged as a single program, forcing many structuring decisions to be made statically way back at system design time.

But if we churn the entire specification of this system, apps, run-time, and all, through a partial evaluator, we can generate a blob of code that has the same input/output properties of the original system, but it runs directly on the machine architecture, and the interpretive overhead of the POSIX interface is stripped away. Opportunities for specialization can be discovered among the run-time services, but better still, we can now expose global opportunities that span the red-line. Imagine a system running a single application; because the process ID is constant, the CPU scheduler and context switching code could be optimized away!

Furthermore, extensibility fits naturally into this framework. Just like in SPIN, you find the right interface to extend your run-time services with, and provide an implementation (f') of your new run-time service. If the currently-running applications are employing the new service, it (f') appears in the run-time implementation.

I hope I have now convinced you of two main points regarding partial evaluation as a framework for system structure:

1. Existing research directions fall into the framework as distinct points in a single design space. Extensiblity and specialization work could conceivably coexist in the same system. (Contrast this with existing research implementations as ad-hoc extensions to a conventional kernel; it seems unlikely that those extensions could be easily integrated into a single system.) I don't mean to say that extensibility is trivial; the difficult work of exporting the right interfaces to preserve properties such as security is still needed. I don't mean to say that specialization is trivial; the difficult work of exposing opportunities for specialization (such as by discovering quasi-invariants) is still needed. But partial evaluation provides a unifying model that relates those research directions together.

2. Partial evaluation across an entire system exposes new, global opportunities for optimization. [For example, imagine a web server, where the common path of a running system involves reading a packet from the network driver, running some application code, reading a few disk blocks, running some application code, and writing a network packet. A profiler could discover this common path and generate a test predicate that guards it (makes it ``constant''), giving the partial evaluator an opportunity to specialize the common path into a very fast path.]