Interfaces are used to specify and verify the interaction between components of a system in a wide variety of programming languages and distributed systems. Stateful interfaces add expressive power by allowing the possible interactions to change over time. The goals of this project are to develop a foundational framework for stateful interfaces, and to apply the framework in two domains: (a) typesafe, generic components for efficient XML stream processing, with application to web services and related distributed system components; (b) memory consistency specifications, with application to reliable shared-memory programs that take advantage of increasingly common multi-processor systems. This project integrates session types for communication centered programming and typestates for object protocols by providing a common foundational framework that includes the following key features: (a) polymorphism, allowing reuse of typed code; (b) copyable, non-linear use of objects and channels, allowing several clients to share a single reference to a server; (c) expressive quantificiation, allowing the specification of memory-consistency guarantees that are ubiquitous in shared-memory programming. The research will advance foundations that will help improve software development and debugging of shared memory multi-core programming.