ソフトウェアエンジニアリングとはソフトウェアエンジニアリングとは
the application ofa systematic, disciplined,
quantifiable approach to the development,quantifiable approach to the development,
operation, and maintenance of software; thatoperation, and maintenance of software; that
is, the application of engineering to software)
SWEBOK v3.0SWEBOK v3.0
5
モデル駆動IoT開発の例 [Patel]
•• 関心事の分離
–ドメイン– ドメイン
– 機能
– 配備– 配備
– プラットフォーム– プラットフォーム
34
P. Patel and D. Cassou, Enabling High-level Application Development for the Internet of Things, JSS 103, 2015.
32.
モデル駆動IoT開発の例(つづき) [Patel]
• モデル変換•モデル変換
とコード生成
– 関心事ごと– 関心事ごと
のDSL
– マッピング– マッピング
とリンク
35
P. Patel and D. Cassou, Enabling High-level Application Development for the Internet of Things, JSS 103, 2015.
33.
参照アーキテクチャに向けて:
セキュリティ&プライバシメタモデルセキュリティ&プライバシメタモデル
• 情報科学国際交流財団 SSRフォーラムプロジェクト ’15-’16• 情報科学国際交流財団 SSRフォーラム プロジェクト ’15-’16
• クラウドサービス開発運用におけるメタモデル
クラウド要求
Bridge
(ブリッジ)知識ベース アーキテクチャ
新規 分析評価
Problem
(問題)
( )
Solution
(解決)Target
知識ベース
パター
ン
プラク
ティス
事例
アーキテクチャ
Target
(対象)
Application
(アプリケーション)
Infrastructure
(インフラ)メタモデル
Platform
(プラットフォーム)
36H. Washizaki, “A Metamodel for Security and Privacy Knowledge in Cloud Services,” Proceedings of the 12th IEEE World
Congress on Services (IEEE SERVICES 2016)
34.
メタモデルに基づく知識活用の例
contents = Protectingthe confidentiality of personal information
: PrivacyGoal
: PrivacyPolicy
untrustedOnlineService : Attacker (Miss User) Register user profile (Server) : UseCaseTrustedProvider : CloudServiceRegister user profile (client) : UseCase: User
1: connectSecurely(target)
1.1: connectSecurely(target)()
メタモデルに基づく知識活用の例
contents = Ensuring persons' privacy and specifically preventing unauthorized access to their personal information
Name = Encryption of the personal information of the user prior to storing it with, or transferring it through an online service
: PrivacyPattern
contents = Generating a strong encryption key
: Guideline: CloudService
個人情報が盗聴されてしまう : Vulnerability
TrustedCloudServiceProvider : Organization (Provider)
connection
2.1: connection.transfer(encryptedPersonalInformation)
2.1.1: connection.transfer(encryptedPersonalInformation)
2.1.1.1: decrypt(encryptedPersonalInformation)()
2: input(personalInformation)
2.1.1.1.1: business logic()
name = Register user profile
: UseCase
authority = Share user
: User
: PersonalInformation
codeTemplate = ...
contents = Generating a strong encryption key
codeSnippet = /* Code for Generating a strong encryption key */
: CodingRule
authority = user with no login
untrustedOnlineService : Attacker (Miss User)
authority = user with no login
untrusted3rdParty : Attacker (Miss User)
Encryption : Function
Manage(Protect) name = Unauthorized access to personal information
: MisUseCase
access
:プライバシゴール
構造 振る舞い:プライバシポリシ
ユーザ管理キーでユーザ管理キーで
暗号化:パターン
暗号化キー生成:暗号化キー生成:
ガイドライン盗聴: 脆弱性 暗号化:パターン ガイドライン
キー コード断片:キー コード断片:
盗聴: 脆弱性
規約
キー コード断片:
コーディング規約:クラウドサービス :プロバイダ
:ミスユース
37暗号化:機能 :個人情報
:ミスユース
ケース
:攻撃者
35.
ゴールやバリューとの接続 GQM+Strateges
顧客満足度10%向上 顧客満足度調査OG.上位
M. メトリクス
顧客満足度10%向上 顧客満足度調査OG. 上位
組織目標
製品の信頼性 製品の使いや
S. 戦略 を改善する すさを改善するS. 戦略
不具合指摘を
20%削減
不具合データOG. 下位
M. メトリクス
20%削減
不具合データ
プログラムの複雑さ
OG. 下位
組織目標
テスト効率 保守性を
S. 戦略
38
テスト効率
を改善する
保守性を
改善する
S. 戦略
参考: Jens Heidrich, Adam Trendowicz, “測定を基にした、ソフトウェア戦略とビジネス目標の整合” IPA/SEC資料
Fault (Bug) Localization
Testcase
(a,b)
P(All), F(All) : N. passed or failed tests
P(s), F(s) : N. tests going through s
(3,2)
(4,4)
(0,1)
(a, b)
class Max{
int max(int a, Risk(s) = %F(s)
%P(s) + %F(s)
P(s), F(s) : N. tests going through s
(3,2)
(4,4)
(0,1)
✔✔ ✔
int max(int a,
int b){
int max=0; P(s) F(s) %P(s) %F(s) Risk
1 2 1.0 1.0 0.5
%P(s) + %F(s)
✔
✔
✔
✔
✔
✔
✔
int max=0;
if(b<a)
max=a;
1 2 1.0 1.0 0.5
1 2 1.0 1.0 0.5
✔
✔
✔
✔ ✔
✔
max=a;
if(a<=b)
max=6;
1 0 1.0 0.0 0.0
1 2 1.0 1.0 0.5✔
✔✔
✔
✔return max;
}
0 2 0.0 1.0 1.0
1 2 1.0 1.0 0.5
P FF
}
Visualization for Fault Localization. James A. Jones, Mary Jean Harrold, and John Stasko. Proceedings of the Workshop on
Software Visualization, 23rd International Conference on Software Engineering, Toronto, Ontario, Canada, May 2001
45
Software Visualization, 23rd International Conference on Software Engineering, Toronto, Ontario, Canada, May 2001
http://pleuma.cc.gatech.edu/aristotle/Tools/tarantula/
Susumu Tokumoto, Kazunori Sakamoto, Kiyofumi Shimojo, Tadahiro Uehara and Hironori Washizaki, “Semi-automatic
Incompatibility Localization for Re-engineered Industrial Software,” Proceedings of the 7th IEEE International Conference on
Software Testing, Verification and Validation (ICST 2014)
43.
Evaluation in aCompany
• Target: C language, Tarantula• Target: C language, Tarantula
as the suspiciousness formula
89% bugs in
All bugs in
25% code
67% bugs in
89% bugs in
top 10% code
25% code
67% bugs in
top 5% code
FrequencyFrequency
Frequency
Code [%]
Frequency
Code [%]
Bug [%]
46
コツ「仮定の明示とシステム改善」コツ「仮定の明示とシステム改善」
G. 変更されやすい
計画
箇所を特定できている
A. するモA.あちこちと依存するモ
測定改善
A. するモ
ジュールは されやすい
A. あちこちと依存するモ
ジュールは変更されやすい
測定改善
Q. モジュールの依存
関係はどの程度か?
評価
関係はどの程度か?
評価
M. 呼び出し先
モジュール数
M. 呼び出し元
モジュール数
53
N. Tsuda, et al. Iterative Process to Improve GQM Models with Metrics Thresholds to Detect High-risk Files, SANER'15 Doctoral
51.
事例: 機械学習によるメトリクス・システム改善事例: 機械学習によるメトリクス・システム改善
300
△OK, ○ NG
300
実行行数
NG
△ OK, ○ NG
150
M.実行行数
OK
10 25
M. 関数の数
M.
OK
M. 関数の数
実行行数実行行数
NG
71
M.実行行数
OK
NG
54M. 関数の数
M.
N. Tsuda, et al. Iterative Process to Improve GQM Models with Metrics Thresholds to Detect High-risk Files, SANER'15 Doctoral
例えばセキュリティパターン [Shiroma10]例えばセキュリティパターン [Shiroma10]
要求設計 実装要求 設計 実装
脅威は? 構造は? コードは?脅威は?
対策は?
構造は? コードは?
認可パターン
Subject
id
ProtectionObject
id認可パターン
問題: 認可の構造が資源と独立・・・
解決: 資源にアクセスしようとする・・・ Right
namename
* *
解決: 資源にアクセスしようとする・・・ Right
accessType
checkRight()checkRight()
[Shiroma10] Y. Shiroma, H. Washizaki, et al., “Model-Driven Security Patterns Application and Validation,” PLoP 2010
T. Kobashi, N. Yoshioka, H. Kaiya, H. Washizaki, Y. Fukazawa, “Validating Security Design Pattern Applications Using Model
Testing,” ARES2013
68
10th IEEE InternationalConference on
Software Testing, Verification and Validation
IPSJ International AI Programming Contest
samuraicoding.infoMar 13-18 (due Sep 2016)
aster.or.jp/conference/icst2017/aster.or.jp/conference/icst2017/
72
70.
Trace-Any (‘16-’20 underreview)
Trace in all directions Reliable trace
by transitive andby transitive and
interactive recovery
Req. JavaScript
Cloud
ER, UML SysML, UML Java
Cloud
Modularize and
Reuse, change
managementmanagementExtractionVerification
77
SimulinkGoal models C