Dissertação apresentada na Faculdade de Ciências e Tecnologia da Universidade
Nova de Lisboa para a obtenção do Grau de Mestre em Engenharia Informática.The growing use of the Internet as a global infrastructure for communication between distributed applications is leading to the development of a considerable amount of technologies to ease the deployment, description and data exchange among services and thus improve their interoperability.
There is also a growing interest in the use of the “software as a service” business
model where a software vendor develops and hosts applications to be used by its clients over the Internet. The use of these Web Services is provided through an API describing the interface of the service that can hide how the service provider hosts the application. This approach allows for the creation of an abstraction layer that offers additional capabilities without increasing
the maintenance cost usually linked to the management of those machines (like software
and hardware updates or just application/system configuration).
However, the main tools provided by the standards and existing technology to combine
these services usually only account for limited automatic verification techniques (based on standard signature checking of methods in interface descriptions) and thus relying the behavioral compatibility among services to the programmer. The programmer then becomes dependent on the quality of the documentation and the development time available to manually (and without formal guarantees) assure the correctness of the code.
In this thesis, we propose a behavioral type system, in the context of yak, a prototype scripting language for web services, that enhances traditional typecheckers by allowing to statically check the correct usage of services (as remote or local objects). Our language uses behavioral
annotations in the protocol descriptions, similar to regular expressions, that are translated to deterministic finite automatons during the typechecking phase. The intent of this work is to ease the creation and deployment of Web Services by providing a friendly integration of behavioral type concepts within a practical programming language, so to make the use of these services (with behavioral descriptions) transparent and effortless to the programmer. We also provide a full implementation of the interpreter, behavioral typechecker and run-time support
system for the yak language, that may be used to develop prototypical systems and experiment with web services and behavioral type