Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering

User Tools

Site Tools

Sample File Output

The Prolog fact below reports detection of an Observer occurrence in JHotDraw 5.1. It tells us that:

  • The Subject role is played by the type StandardDrawing.
  • The observers role1) is played by the field fListeners.
  • The Notifier Method role2) is played by two methods: figureInvalidated and figureRequestUpdate.
  • The updateCall role 3) is played by the method calls l.drawingInvalidated(…) and l.drawingRequestUpdate(…)
  • The Observer role is played by the type DrawingChangeListener.
  • The Update Method role is played by two methods of DrawingChangeListener: drawingInvalidated(DrawingChangeEvent) and drawingRequestUpdate(DrawingChangeEvent)
candidate(observer, 100, [
  role(subject, ['CH.ifa.draw.standard.StandardDrawing']), 
  role(observers, ['CH.ifa.draw.standard.StandardDrawing.fListeners']), 
  role(updateCall, [
   'l.drawingInvalidated(new CH.ifa.draw.framework.DrawingChangeEvent(...))',
   'l.drawingRequestUpdate(new CH.ifa.draw.framework.DrawingChangeEvent(...))'
  role(observer, [
  role(updatemethod, [  

The above output format does not make explicit which Notifier calls which UpdateCall to which Update Method. A more explicit output format (such as DPDX) will be implemented.

A field in the Subject that stores Observers.
A method in the Subject that invokes Update() on all objects stored in Observers.
Calls of Update Methods performed in Notifier methods on each Observer instance
research/dpd/dpjf/candidates.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2024