SDA SE Wiki

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

User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
research:dpd:dpjf:candidates [2011/11/18 15:06]
alex.binun
research:dpd:dpjf:candidates [2018/05/09 01:59] (current)
Line 1: Line 1:
 +====== 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** role((A field in the Subject that stores Observers.)) is played by the field //​fListeners//​. ​
 +  * The **Notifier Method** role((A method in the Subject that invokes Update() on all objects stored in Observers.)) is played by two methods: //​figureInvalidated//​ and //​figureRequestUpdate//​. ​
 +  * The **updateCall** role ((Calls of Update Methods performed in Notifier methods on each Observer instance)) 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)// ​
 +
 +<Code lang-prolog>​
 +candidate(observer,​ 100, [
 +  role(subject,​ ['​CH.ifa.draw.standard.StandardDrawing'​]), ​
 +  role(observers,​ ['​CH.ifa.draw.standard.StandardDrawing.fListeners'​]), ​
 +  role(notifier,​[ ​
 +   '​CH.ifa.draw.standard.StandardDrawing.figureInvalidated(FigureChangeEvent)', ​
 +   '​CH.ifa.draw.standard.StandardDrawing.figureRequestUpdate(FigureChangeEvent)'​]
 +  ), 
 +  role(updateCall,​ [
 +   '​l.drawingInvalidated(new CH.ifa.draw.framework.DrawingChangeEvent(...))',​
 +   '​l.drawingRequestUpdate(new CH.ifa.draw.framework.DrawingChangeEvent(...))'​
 +  ]), 
 +  role(observer,​ [
 +   '​CH.ifa.draw.framework.DrawingChangeListener'​]), ​
 +  role(updatemethod,​ [  ​
 +   '​CH.ifa.draw.framework.DrawingChangeListener.drawingInvalidated(DrawingChangeEvent)', ​
 +   '​CH.ifa.draw.framework.DrawingChangeListener.drawingRequestUpdate(DrawingChangeEvent)'​]
 +  )]
 +).
 +</​Code>​
 +
 +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:​start|DPDX]]) will be implemented. ​
 +
 +
  
research/dpd/dpjf/candidates.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2020