Presentation is loading. Please wait.

Presentation is loading. Please wait.

ライセンス特定のための ライセンス知識獲得における課題

Similar presentations


Presentation on theme: "ライセンス特定のための ライセンス知識獲得における課題"— Presentation transcript:

1 ライセンス特定のための ライセンス知識獲得における課題
大阪大学 博士後期課程3年 眞鍋雄貴 2011/9/12 - SES2011 WS3

2 概要 ソフトウェアの再利用を円滑にするため,ソフトウェアライセンス特定ツールが開発されている
ライセンス特定ツールはオープンソースソフトウェア工学にもかかわりがあると考えられる ライセンス特定ツールにおけるライセンス知識獲得の際に生じる課題について述べる 2011/9/12 - SES2011 WS3

3 ソフトウェアの再利用 既存のソフトウェアに含まれるソフトウェア部品を新たなソフトウェアの開発に利用すること
ソフトウェア部品:ソースファイル,クラス,関数など オープンソースソフトウェアがソフトウェア部品の大きな供給源 ソフトウェア部品検索システムにより,オープンソースソフトウェアのソースファイルの取得が容易になっている Google Code Search, Koders, SPARS 2011/9/12 - SES2011 WS3

4 著作権 著作物の利用に関して,著作者に与えられる独占的権利 知的財産であるソフトウェアを法的に保護する仕組みの一つ 利用:複製,改変,再配布
ソフトウェアの再利用を行うためにはそのソフトウェアの著作者から許諾を得る必要がある 2011/9/12 - SES2011 WS3

5 ソフトウェアライセンス(ライセンス) 著作者が定めた,利用に関する許諾と許諾を得るための要求や義務
オープンソースソフトウェアの場合,指定されているライセンスに従えば利用することができる 再利用する対象のライセンスを調べないといけない オープンソースライセンス(OSSライセンス) Open Source Initiativeが承認(66種) 2011/9/12 - SES2011 WS3

6 代表的なOSSライセンス 3-clause BSD License(BSD3)
派生物は著作権の告知,条項のリスト,保障の放棄を含めなければならない Apache License Version 2(Apachev2) 派生物は著作権,特許,商標,帰属の告知を含めなければならない GNU General Public License Version 3(GPLv3) 派生物はGPLv3のもとで配布されなければならない 2011/9/12 - SES2011 WS3

7 ライセンス特定 ソースファイルからそのソースファイルのライセンスを決定する作業 ソースファイルのライセンスはコメント中で指定される
ライセンスを指定する記述をライセンス記述と呼ぶ ソースファイル中のライセンス記述と既知のライセンス記述と照合することにより,ライセンスを特定する 2011/9/12 - SES2011 WS3

8 ライセンス記述の例 Copyright (c) 2005, 2006 Taras Puchko All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. ... Copyright (c) 2003, the JUNG Project and the Regents of the University of California All rights reserved. This software is open-source under the BSD license; see either "license.txt" or for a description. 2011/9/12 - SES2011 WS3

9 ソフトウェアライセンス 特定ツールの構成 ライセンス知識作成用 ソースファイル集合 ソースファイル ライセンス知識 マッチング ルール作成
ライセンス記述の抽出 <ライセンス名,ルール> ライセンス名 2011/9/12 - SES2011 WS3

10 オープンソースソフトウェア工学と ソフトウェアライセンスの関連
実証的研究 ライセンスの変化[1][2] コードクローンとの関係[3] コードクローン:他のソースコード片と一致,または類似するコード片 ソースファイル検索システム ライセンス違反検出 [1] Massimiliano Di Penta et. al. "An exploratory study of the evolution of software licensing". Proc of ICSE '10, Vol. 1. pp ,   [2] Yuki Manabe et. al. :"Evolutional analysis of licenses in FOSS." Proc of IWPSE-EVOL '10, pp.83-87,2010. [3] Yu Kashima et. al.: "A Preliminary Study on Impact of Software Licenses on Copy-and-Paste Reuse", International Workshop on Empirical Software Engineering in Practice 2010, 2010 2011/9/12 - SES2011 WS3

11 既存のライセンス特定手法 ルールに正規表現を使い,簡易なマッチングをする手法 Ninka[3] ASLA[4] Ohcount[5]
FOSSology (v1.3以降)[6] ルールに単純な文字列を使い,高価なマッチング手法を用いる手法 FOSSology (v1.2以前) Open Source License Checker[7] [3] German, D.M. et. al : "A sentence-matching method for automatic license identification of source code files", Proc. ASE 2010, pp.437–446 (2010). [4] Tuunanen, T. et. al : "Automated software license analysis", Automated Software Engineering, Vol.16, pp.455–490 (2009). [5] [6] Gobeille, R.: "The FOSSology project", Proc. MSR 2008, New York, NY, USA, pp.47–50 (2008). [7] 2011/9/12 - SES2011 WS3

12 Ninka ルール:ライセンスルールとメタライセンス文 ライセンスルール
BSD2:BSDPre, BSDcondSource, BSDcondBinary, BSDasIs, BSDWarr メタライセンス文 BSDcondSource:Redistributions? of source code must retain the (above )?copyright notice, this list of conditions(,)? and the following disclaimer(, without modification)?: … マッチング ソースファイル中のコメントとメタライセンス文をマッチさせ,ライセンス文名の列を作る ライセンス文名の列とマッチしたライセンスルールからライセンス名を出力する 2011/9/12 - SES2011 WS3

13 Open Source License Checker
ルール:既知のライセンス記述 ライセンスの条文全体が主に用いられている マッチング コメント中のライセンス記述とルール間で同一となる行を発見し,最長一致列となる部分を探索し,類似度を求める 類似度:ルールに対する最長一致列の割合 類似度の高いルールに対応するライセンスを出力 2011/9/12 - SES2011 WS3

14 本ポジションペーパーでの立場 精度をライセンス知識で確保するか,マッチング手法で確保するか
マッチング手法で頑張る場合,ルールと一致する範囲が理解しづらくなる 誤った特定結果が増える →その結果を信用して再利用できない ⇒ライセンス知識をちゃんと作成することで,精度を担保すべき 2011/9/12 - SES2011 WS3

15 課題 既存のソフトウェアライセンス特定ツールではライセンス知識を手作業で作成している
Ninkaの場合,427 のメタライセンス文,112 個のライセンスに対応する126 個のライセンスルールを手作業にて作成 多数のライセンスが存在している OSIに承認されたもので66種 BlackDuck は自社が所有するBlack Duck KnowledgeBase には2050 種以上のライセンスに対する詳細なデータが含まれているとしている ライセンス知識を作成するための支援が必要である 2011/9/12 - SES2011 WS3

16 ライセンス知識獲得における支援 ライセンス知識作成用 ソースファイル集合 ソースファイル ライセンス知識 マッチング ルール作成
ライセンス記述の抽出 ライセンス記述の分類 ルールに対する命名支援 ライセンス記述の自動抽出 ライセンス名 2011/9/12 - SES2011 WS3

17 支援をする上での課題 ライセンス記述の自動抽出 先頭以外のコメントの扱い ライセンス記述の自動分類 類似したライセンス記述の扱い
ルールに対する命名支援 各ルールに対する名前生成 2011/9/12 - SES2011 WS3

18 先頭以外のコメントの扱い 多くの場合はソースファイルの先頭である ソースコードの途中に複数のライセンス記述が記述されている場合がある
コードのコピーとともにライセンス記述もコピーされてきたかもしれない コードの変更が行われたとき,多くの場合で同時にコメントも変更されているという報告もある[8] それらの記述を調べる必要があるか調査する必要がある [8]Fluri, B., Wursch, M., & Gall, H. C. ,”Do Code and Comments Co-Evolve? On the Relation between Source Code and Comment Changes.”, WCRE 2007, pp (2007). 2011/9/12 - SES2011 WS3

19 類似したライセンス記述の扱い 文章としては類似しているが,異なるライセンスに対応するライセンス記述がある 例
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 自動的な分類を行うためには,どうやってこれらの記述をライセンス別に分類するか 2011/9/12 - SES2011 WS3

20 各ルールに対する名前生成 対応するライセンス名を明確に決められない場合がある ライセンス記述に名前が入らない
既存のライセンスに条項が追加されたり,削除されたものがライセンスとして使用されることがある[3] どうやって,名前付けをルール化するか 既知のライセンスのスタイルとの類似性 類似するライセンスとの差分 [3]German, D.M. et. al : "A sentence-matching method for automatic license identification of source code files", Proc. ASE 2010, pp.437–446 (2010). 2011/9/12 - SES2011 WS3

21 まとめ ソフトウェアの再利用を円滑にするため,ソフトウェアライセンス特定ツールが開発されている
ライセンス特定ツールとオープンソースソフトウェア工学との関連 ライセンス特定ツールにおけるライセンス知識獲得を支援する際の課題 先頭以外にあるコメントの扱い 類似した記述の扱い 各ルールに対する名前生成 2011/9/12 - SES2011 WS3

22 2011/9/12 - SES2011 WS3

23 Evaluation of License Identification
Goal: To show if our approach is better than other methods Tools Ninka (implementation of proposed approach), FOSSology 1.0.0, ohcount version 3.90rc, OSLC 3.0 Target systems Source files: 250 files in Debian 5.0.2 Randomly select 250 packages in Debian 5.0.2 For each selected packages, randomly select 1 file in each package in them We have conducted evaluation to show if our method is better than other methods. We used Ninka, an implementation of our approach, FOSSology 1.0.0, ohcount version 3.90rc and OSLC3.0. We analyzed 250 (two-fifty files) files in Debian with these tools. We randomly selected these 250 files by the following approach. At first, we randomly selected 250 packages in Debian Then, for each selected packages, we randomly selected 1 file in each package in them 2010/9/24 - ASE2010 Daniel M. German, Yuki Manabe, Katsuro Inoue

24 Method Compare the results from each tool to the results obtained by manual inspection Result category C: Correct license name and version I: Incorrect U: Unknown Measured values Recall Precision F-measure Execution Time (Explanation of terms used in this evaluation) We Compare the results from each tool to the results obtained by manual inspection. These results are classified into three category, Correct license name and version, Incorrect, and Unknown. When the result by tool is "UNKNOWN", the result are classified into "UNKNOWN" When the result by manual inspection "NONE", if the result by tool is "NONE", the result are classified into "C". To evaluate performance of each tool, we use four values, Recall, Precision, F-measure, and Execution Time. 2010/9/24 - ASE2010 Daniel M. German, Yuki Manabe, Katsuro Inoue

25 Definition of Scales Recall Precision F-measure 2010/9/24 - ASE2010
Daniel M. German, Yuki Manabe, Katsuro Inoue

26 Result Ninka has the highest precision and faster execution time Ninka
FOSSology ohcount OSLC Recall [%] 82.8 99.6 100 Precision [%] 96.6 55.0 33.2 29.5 F-measure 0.891 0.709 0.498 0.371 Execution Time [s] 22 923 27 372 Ninka has the highest precision and faster execution time (Ninka has highest precision and does it efficiently) This table shows the result. Best score are in the bold typeface The results show that ninka has the highest precision and faster execution time (Recallの定義を回答率と同じにする) (ohcount, OSLCのRecall 100%) 2010/9/24 - ASE2010 Daniel M. German, Yuki Manabe, Katsuro Inoue


Download ppt "ライセンス特定のための ライセンス知識獲得における課題"

Similar presentations


Ads by Google