7. 拡充例: セーフティの技法 STAMP(Systems-
Theoretic Accident Model and Process)
• 安全のための制御を行う要素(コントローラー)と制御される要素(
被コントロールプロセス)の相互作用へ着目
• 安全解析手法 STPA(System-Theoretic Process Analysis)
7
Leveson, Engineering a Safer World, 2012
Jati H. Husen, Hnin Thandar Tun, Nobukazu Yoshioka, Hironori Washizaki and Yoshiaki Fukazawa, “Goal-Oriented Machine Learning-Based Component
Development Process,” ACM/IEEE 24th International Conference on Model Driven Engineering Languages and Systems (MODELS), Poster Track
Hnin Thandar Tun, Jati H. Husen, Nobukazu Yoshioka Yoshioka, Hironori Washizaki and Yoshiaki Fukazawa, “Goal-Centralized Metamodel Based
Requirements Integration for Machine Learning Systems,” 3rd International Workshop on Machine Learning Systems Engineering (iMLSE 2021)
[Cmp2] Human-
machine interface
[Cmp3] Main control
unit
Start/stop System condition
[Cmp1] Camera
system
[Cmp3.2] Lane
detection system
Start detection
Request image
Image
Perception result
[Cmp3.3] Vehicle
detection system
Start detection
Request image
Image
Perception result
[Cmp3.x] Trajectory
prediction system
Start decision making
Trajectory decision
Environment condition
Driving control
CA Not Providing
Providing
causes
hazard
Too early / Too
late
Start
detecti
on
(UCA2-N-1) Lane
perception system
is not providing
output
[SC1][SC2]
(UCA2-P-1)
Poor
perception of
lane
markings
[SC1][SC2]
(UCA2-T-1)
Perception of
lane marking is
not real time
[SC1][SC2]
Request
image
(UCA6-N-1) Lane
perception system
has no input
[SC1][SC2]
(UCA6-P-1)
Lane
perception
system
receive poor
quality image
[SC1][SC2]
(UCA6-T-1)
Information of
environment
will not be real
time
[SC1][SC2]
… … … …
20. クラウドの構成
20
SaaS
PaaSS
IaaS
BaaS
IoT (M2X)
Mobile (Parse)
Gmail等
Google App Engine等
Amazon EC2/S3等
IaaS : Infrustructure as a Service
PaaS: Platform as a Service
SaaS: Software as a Service
Baas: Backend as a Service
アプリケーション
APP実行環境
ミドルウェア・OS
コンピュータ(H/W)
ユーザシステム
サービスとして
提供する範囲
鷲崎, MCPC岡崎ほか, “スマートIoTシステムビジネス入門”, スマートエスイー2017-21
32. メタモルフィックテスティング
• メタモルフィック関係に基づき大量に試験
• 入力への変化により、出力の変化を予想できる関係
– 例: A の検索結果数 ≧ A かつ B の検索結果数
– 例: sin(x) = sin(x + 360度)
32
入力変化 出力変化
並び変え
無し
ノイズの追加
意味的に同じ
統計的に同じ
経験的に近
い
僅か
定数加乗算 定数の加算、
乗算
狭める 部分集合
全く異なる 互いに素
x t(x)
f(x) g(f(x))
変換t
変換g
参考: S. Segura et al., "Metamorphic Testing of RESTful Web APIs," IEEE Transactions on Software Engineering, 2017
参考: C. Murphy, “Applications of Metamorphic Testing”, http://www.cis.upenn.edu/~cdmurphy/pubs/MetamorphicTesting-Columbia-17Nov2011.ppt
Y Tian, et al., DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Cars, ICSE 2018 https://arxiv.org/pdf/1708.08559.pdf
f(t(x))
=
変換f 変換f
33. 機械学習デザインパターン(例:パターン 「説明可能な予測」
• 『機械学習デザインパターン ―データ準備、モデル構築、
MLOpsの実践上の問題と解決』Lakshmananら著, 鷲崎ら
訳, オライリージャパン, 2021
– 問題: 予測の説明困難
– 解決: シンプルなモデル採用、予測結果における説明など
33
短時間
using 19990914 build on win98 using the
new account wizard if I add multiple
accounts with the same server…
長時間
this mean the problem was with their
web page and its cool now or we still
need to figure out …
Y. Noyori, H. Washizaki, et al., “Extracting features related to bug fixing time of bug reports by deep learning and gradient-based
visualization,” 2021 IEEE International Conference on Artificial Intelligence and Computer Applications
例: バグレポートの修正時間予測の深層学習モデルの説明
33
深層学習モデルの説明例: SmoothGrad
SmoothGrad: removing noise by
adding noise, 2017
44. OSS品質実態と組織成熟度 [Ajila07]
• 北米18名のマネージャへのインタビュー+文献調査
• OSSと商用ソフト間での品質の差は小さいか,ほぼ無い
• OSSの体系的再利用は生産性や品質に良い影響
44
S.A. Ajila and D. Wu, Empirical study of the effects of open source adoption on software development economics, JSS, 8-0(9), 2007
初期 観察 調整 計画的 成熟
奨励・文化 非奨励 奨励 報奨 教化 業務直結
計画性 無し 草の根 機会 命令 戦略
範囲 個人 チーム 個所 部門 組織全体
責任 個々 共有 専門家 専門チー
ム
協力チーム
&リエゾン
プロセス カオス 設計後 設計時 部品開発 全製品が再
利用意図
メトリクス 無し 再利用
LOC
再利用
回数
部品費用
対効果
再利用追跡
45. OSS再利用の生産性・品質影響
[Basili96]
• 再利用規模
– Reuse(C) = (1 - %Change) × Size(C)
– Reuse(S) = ∑ Reuse(C)
• 再利用率 ReuseRate(S) = Reuse(S) /
Size(S)
• 生産性 Productivity(S) = Size(S) /
DevEffort(S)
• 学生8プロジェクト,C++ライブラリ再利用
45
V. Basili, et a., How reuse influences productivity in object-oriented systems, CACM, 39(1), 1996
46. OSSホワイトボックス再利用と由来
46
O1
O12
O2
O13
O123
O23
O3
Apache (1)
Oracle (2)
Sun (3)
例: OpenOffice
コードの規模・
複雑さメトリクス
由来
変更回数
変更規模
欠陥
S. Sato, H. Washizaki et al., Effects of Organizational Changes on Product Metrics and Defects, APSEC'13
R. Ishizue, H. Washizaki, et al., “Metrics visualization technique based on the origins and function layers for OSS-based
development,” VISSOFT 2016
R. Ishizue, H. Washizaki, et al., “Metrics Visualization Techniques based on Historical Origins and Functional Layers for
Developments by Multiple Organizations,” IJSEKE, Vol.28, No.9, pp.1-25, 2018.