1 Software Engineering Laboratory Department of Computer Science
オブジェクト生成の観測に基づく プログラム実行の要約の抽出 大阪大学大学院情報科学研究科 ○中野 佑紀,渡邊 結 石尾 隆,井上 克郎 1 Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
2. 生成関係の特定(1/2) • オブジェクト間の生成関係 – TRIGGER : オブジェクト生成を行ったオブジェクト – BASE : オブジェクト生成に利用されたオブジェクト class Register. Dialog { … new. Schedule = new Schedule (date, time, memo); … } Register TRIGGER Schedule Dialog BASE Date BASE String Time class Schedule { … Schedule (Date date, Time time, String memo){ … } Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 7
2. 生成関係の特定(2/2) • 実行履歴の情報から特定 – コンストラクタ呼び出しイベントの発生時に生成 Event Server TRIGGER Receiver 生成 Value BASE Constructor. Call Register. Dialog(10) Schedule(20) Date(17),Time(18), String(19) Constructor. Call Schedule(20) String(19) Content(21) Register TRIGGER Schedule(20) Content(21) Dialog(10) BASE Date(17) BASE Time(18) BASE String(19) 8 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
生成を観測できない場合(2/3) Date. Format format; … … } class Register. Dialog { … class Scheduler { Schedule. List[] schedules = new Schedule. List[12]; date = format. parse(“ 2010/03/04”); … void button. Action (Action. Event e){ … } } … Event Server TRIGGER Receiver Value Field. Write Scheduler(3) Schedule. List[](4) Method. Call Register. Dialog(10) Date. Format(11) String(12) Method. Entry UNKNOWN 生成 Register. Dialog(10) Action. Event(15) 10 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
生成を観測できない場合(3/3) • メソッドの戻り値が未知のオブジェクト – メソッドをコンストラクタと見なす – メソッドを持つオブジェクトはBASE class Register. Dialog { … String input, target, replacement; … String memo = input. replace (target, replacement); … } Event Server TRIGGER Method. Call Register. Dialog(10) String(16) String(7), String(8) Receiver Value BASE Method. Return Register. Dialog(10) String(16) String(19) 生成 11 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
入出力オブジェクトの一覧 入出力オブジェクトの情報を出力 I/O I I O O O ID 6 399 2358 2359 2360 Name scheduler. domain. Scheduler java. sql. Date java. sql. Time java. lang. String scheduler. domain. Schedule Value 2010 -03 -04 16: 30: 00 meeting 15 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
生成関係の出力例 : 入力 : 出力 36464 : TRIGGER scheduler. util Date. Time. Utils(STATIC) : 内部 : STATIC TRIGGER java. lang String 1 object : “ 16” 1 object : “ 30” java. sql Time(2358) “ 16: 30: 00” 36471 : BASE 2 36471 : TRIGGER scheduler. gui Register. Dialog(2248) 36305 : TRIGGER javax. swing JCombo. Box 2 objects 36471 : BASE 1 scheduler. domain Schedule(2360) 36469 : TRIGGER java. sql Date(399) “ 2010 -03 -04” 36479 : TRIGGER java. lang String(2359) “meeting” 36469 : BASE 0 36471 : BASE 3 36479 : BASE 1 javax. swing JText. Field(2348) Department of Computer Science, Graduate School of Information Science and Technology, Osaka University scheduler. domain Content(2361) 16
生成を観測できない場合 • フィールド読み出しで未知のオブジェクトを読み出す – フィールドを持つオブジェクトをTRIGGER • 未知のオブジェクトからメッセージが届く – UNKNOWN をTRIGGER class Calendar. Date { Boolean has. Schedules; … has. Schedules = Boolean. TRUE; … } Event Server Receiver TRIGGER Value 生成 Field. Read Calendar. Date(5) Boolean(STATIC) Method. Call Date. Cell(14) Boolean(6) UNKNOWN Date(17) 19 Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
- Slides: 19