safety and security system with MISRA C++, CERT C++ and STARC RTL design style guide using HAZOP analysis. In Japan we use English on safety and security analysis with source code and coding standards in English.
27. 4.4 C, C++言語類とOS
2017/2/1 (c)kaizen@wh.commufa.jp, @kaizen_nagoya
言語 記述対称
C言語 Linux, C
C++ C++, C
Objective C Macintosh OS X
C# MS Windows
OS: Operating system(運用系)
例:Linux, Macintosh OS X, MS windows
35. 5.5 MISRA
(Motor Industry Softwre Reliability Association)
l Development guideline for vehicle based software(ISO TR
15497)
自動車用ソフトウェアの開発ガイドライン(自動車技術会
TP-01001)
l Guidelines for the use of the C language in vehicle based
software(MISRA C:1998)
自動車用C言語利用のガイドライン(自動車技術会TP-
01002)
l Guidelines for the use of the C++ language in critical
systems(MISRA C++:2008)
MIRA(Motor Industry Reliability Association)
2015/05/23 (c)kaizen@wh.commufa.jp, @kaizen_nagoya
36. 5.5.1 MISRA-C++のHAZOP
2017/2/1 (c)kaizen@wh.commufa.jp, @kaizen_nagoya
無non bool
NUL
L zero
unus
ed
bitwi
se void
condi
tion
switc
h/ca
se
exce
ption loop if
empt
y varid
大
uppe
r
case wide size
multi
ple
numb
er/e
num
value
/vari
able
integ
er cast
cons
tant float
point
er
arith
metic
chara
cter
inc/d
ec
類type
stand
ard
comp
atiblerule
conv
ersio
n cast
exce
ption
前block
exter
nal/i
ntern
al
stati
c/dy
nami
c order
befor
e/aft
er
goto
/jum
p
thro
w/ca
tch
prepr
oces
sor/
defin
e
switc
h/ca
se
exce
ption
exit/
termi
nate
38. 5.6 CERT
(Computer Emergency Readiness Teams)
l SEI CERT C Coding Standard Rules for Developing
Safe, Reliable, and Secure Systems 2016 Edition
l http://www.sei.cmu.edu/downloads/sei-cert-c-coding-
standard-2016-v01.pdf
l SEI CERT C++ Coding Standard
l https://www.securecoding.cert.org/confluence/pages/viewpag
e.action?pageId=637
l SEI CERT Oracle Coding Standard for Java
l https://www.securecoding.cert.org/confluence/display/java/S
EI+CERT+Oracle+Coding+Standard+for+Java
2015/05/23 (c)kaizen@wh.commufa.jp, @kaizen_nagoya
39. 5.6.1 CERT C++のHAZOP
2017/2/1 (c)kaizen@wh.commufa.jp, @kaizen_nagoya
無
if,
while for
switc
h cast
NUL
L race
atomi
c
defin
e
retur
n
decle
ar
invali
d
refer
ence
retur
n
prepr
oces
sor
大
enum
erati
on for case cast
rando
m
name
spac
e value
numb
er
va_ar
g
const
raint
s
floati
ng
refer
ence
point
er
argu
ment
s
類
gener
ic
librar
y std cast
safet
y rule
funct
ion
defin
e
exce
ption
macr
o error file
form
at type
前
doma
in range
switc
h signal
ascti
me
prepr
oces
sor
sequ
ence EOF
const
racto
r
40. 5.6.2 CERT C++
cast, switch case, float, pointerなどは
同様
define, value, library, function なども
同様
時間の早遅が少ないのも同様
2017/2/1 (c)kaizen@wh.commufa.jp, @kaizen_nagoya
42. 5.7.1STARC RTL設計スタイルガイド
2017/2/1 (c)kaizen@wh.commufa.jp, @kaizen_nagoya
無 動詞 名詞
単数
系
identif
y once define bit first insert
if/logi
c
逆 動詞
形容
詞
input/
output
re-/co
unter edge
include
exclude
invert
e
bidirec
tion
if/logi
c
feedba
ck
他 third
malfun
ction error noise
other
than
大 空間 数値
複数
形
upper/
lower
charac
ters length
const
ants
numbe
r
maxim
um
param
eters large
小
smalle
r low
類 same
comm
on
design
/style
identif
y library define
stand
ard
proper
ty
intere
ctual
struct
ure always
部 easy
早 時間
synthe
sis
timer/
timing speed
clock
signal
前 動詞
synthe
sis
order/
end
re-/co
unter edge define
clock
signal
hierarc
hy
top/le
vel
beginni
ng
feedba
ck
52. 2017/2/1 (c)kaizen@wh.commufa.jp, @kaizen_nagoya
6.4 参考文献
u The Motor Industry Software Reliability Association(1994):Development
Guidelines for Vehicle Base Software,ISBN 0952415607
u The Motor Industry Software Reliability Association(1998):Guidelines for
THE USE Of The language IN Vehicle Based Software ISBN 0952415690
u Guidelines for the use of the C language in critical systems, 2013, ISBN
9781906400-11-8 PDF
u JSAE(2002):JASO/TP-01001 自動車用ソフトウェアの開発ガイドライ
ン,社団法人自動車技術会
u JSAE(2002):JASO/TP-01002 自動車用C言語利用のガイドライン、社
団法人自動車技術会
u B.W.カーニハン,D.M.リッチー著,石田晴久(訳:1989)プログラミング言
語C、共立出版
u A.コーニグ著.中村明(訳:2004)Cプログラミングの落とし穴,新紀元
社
u アラン・R. フューアー 著, 田中 和明・手塚 忠則 (訳:2000)C PuzzleBook,カ
ットシステム
54. 6.5 略号一覧C++: C plus plus(計算機言語)
MISRA:Motor Industry Softwre Reliability Association,自動車業界ソフオトウェア信頼協会
CERT:Computer Emergency Readiness Teams,計算機緊急対応班
STARC: Semiconductor Technology Academic Research Center: 2016年5月31日解散
HAZOP: Hazard Analisys and Operability
SESSAME: Society of Embedded Software Skill Acquisition for Managers and Engineers, 特定非営利活動法人 組込み
ソフトウェア管理者・技術者育成研究会
JAXA: Japan Aerospace Exploration Agenc, 国立研究開発法人宇宙航空研究開発機構
IPA:Information-technology Promotion Agency, Japan, 独立行政法人情報処理推進機構
TOPPERS: Toyohashi OPen Platform for Embedded Real-time Systems, 特定非営利活動法人
SWEST: Summer Workshop on Embedded System Technologies, 組込みシステム技術に関するサマーワークショップ
ISO: International Organization for Standardization, 国際標準化機構
IEC: International Electrotechnical Commission, 国際電気会議
SC: Sub Committee, 副委員会
WG: working Group, 作業班
CPU: Central Processing Unit,中央処理装置
OS: Operating System, 運用系
OSEK:Open system together with interfaces for automotive electronics(英), Offene Systeme und deren Schnittstellen für
die Elektronik im Kraftfahrzeug(独)車載電子機器用界面付属公開系
AUTOSAR:AUTomotive Open System ARchitecture, 自動車公開系構造
RTL:Register Transfer Level, 記憶転送水準
HDL:Hardware description language, 論理記述言語
VHDL:VHSIC HDL, ,超高速集積回路論理記述言語
VHSIC: very high speed integrated circuits,超高速集積回路
2017/2/1 (c)kaizen@wh.commufa.jp, @kaizen_nagoya