Identifying Inspectors to Mine Models of Object Behaviour


In object oriented programming languages, classes are used to incorporate state (fields) and behavior (methods) that modifies the state. Typically, only a subset of a classes’ methods actually modifies the state. Methods that don’t modify the state are called side-effect free or pure methods. We propose to use purity information to classify methods as inspectors (methods that reveal information about an ob ject’s state) or mutators (methods that change state). An inspector is a pure method that takes no parameters and has a return type other than void. Inspectors can often provide useful abstractions over the internal state of an object. For example, method isEmpty() in class Vector provides an abstraction over the internal size attribute (namely that size=0). The benefit of using inspectors is that they provide an abstract characterization of an object’s state that does not rely on internal implementation details like fields. We use inspector and mutator methods to dynamically mine models of object behavior. These models show the effect of mutator invocations on an object’s externally visible state (captured by calling all inspectors). Thus, the models are not only meaningful, but also aligned with the view of the user.

Download the Full Paper

The full paper is available for download, if you want to learn more about object behavior models.


If you would like to cite the research in your own work, please use the following citation:

  title = "Identifying Inspectors to Mine Models of Object Behavior",    
  author = "Valentin Dallmeier and Andrzej Wasylkowski and Nicolas Bettenburg",    
  year = "2006",    
  month = "May",    
  journal = "Softwaretechnik-Trends",    
  location = "Bad Honnef, Germany",    
  number = "2",    
  pages = "79--80",    
  publisher = "Gesellschaft für Informatik",   
  volume = "26"

Legal Disclaimer

This material is presented to ensure timely dissemination of scholarly and technical work. Copyright and all rights therein are retained by authors or by other copyright holders. All persons copying this information are expected to adhere to the terms and constraints invoked by each author’s copyright. In most cases, these works may not be reposted without the explicit permission of the copyright holder.