|Thesis abstract: |
Developers build software systems combining and integrating functionalities provided by different components.
This practice is good and desirable from the software reuse perspective, but it requires developers a deep and detailed understanding of the behavior of the components they use, which are seldom formally specified.
In the thesis, we address these issues with models, which we can infer through dynamic analysis, apt to describe the behavior of a single component as well as the interactions among different pieces of software.
We developed two different kinds of models: BEMs and PBMs.
BEMs encode all the details of the behavior of a component, or of a set of interacting components, within a small but significant scope.
We infer these models through the exhaustive exploration of a small scope.
We build the scope by combining all the possible operations interleaving up to a certain trace length using a relevant set of parameter values.
If the parameters are chosen properly and if we consider traces long enough we can get a precise description of the behavior of a component.
On the opposite, PBMs provide a generalized and abstract representation of software behaviors.
These models are designed to show components' behavior from a higher level perspective that is not bound to the specific parameter values used at inference time.
We propose a technique to synthesize PBMs from the information encoded in BEMs.
Models are useful by themselves to better understand how software components work, but they can also be used as the basis for other more sophisticated and automated applications.
In fact, we can leverage the knowledge they embed to statically check programs source code for components misuse that possibly lead to errors.
Another application of the models we propose is runtime monitoring of components that developers cannot control.