Profilo di 斌自由空间FotoBlogElenchi Strumenti Guida
20 giugno

偶尔也要贴一些技术文章嘛!

Rules for Developing Safety-Critical Code (From latest IEEE Computer) 节选 Author: Gerard J. Holzmann, NASA/JPL Laboratory for Reliable Software 1. Restrict all code to very simple fontrol flow constructs --do not use goto statements, setjmp or longjmp constructs, or direct or indirect recursion. 2. Give all loops a fixed upper bound. 3. Do not use dynamic memory allocation after initialization. 4. No function should be longer than what can be printed on a single sheet of paper in a standard format which one line per statement and one line per declaration. 5. The code's assertion density should average to minimally two assertions per function. 6. Declare all data objects at the smallest possible level of scope. 7. Each calling function must check the return value of nonvoid functions, and eac called function must check the validity of all parameters provided by the caller. 8. The use of the preprocessor must be limited to the inclusion of header files and simple macro definitions. 9. The use of pointers must be restricted. 10. All code must be compiled, from the first day of development, with all compiler warnings enabled at the most pedantic setting available. ================================================================= 也许我的经验还不足以让我对以上rules进行评价,不过虽然看起来很好,有些貌似不容易实现,如3 and 9,8没看懂…… -_- 以后还是多贴些code吧……这么high level的东西过几年再说……

Commenti (2)

Attendere...
Il commento immesso è troppo lungo. Immetti un commento più breve.
Immissione non effettuata. Riprova.
Impossibile aggiungere il commento al momento. Riprova più tardi.
Per aggiungere un commento è necessaria l'autorizzazione di un genitore. Chiedi autorizzazione
I tuoi genitori hanno disattivato i commenti.
Impossibile eliminare il commento al momento. Riprova più tardi.
Hai raggiunto il numero massimo di commenti pubblicabili giornalmente. Riprova tra 24 ore.
Impossibile lasciare commenti. La funzionalità è stata disattivata perché i sistemi hanno rilevato una possibile attività di spamming dal tuo account. Se ritieni che il tuo account è stato disattivato per errore, contatta il supporto tecnico di Windows Live.
Esegui il seguente controllo di protezione per completare la pubblicazione del commento.
I caratteri digitati nel controllo di protezione devono corrispondere ai caratteri dell'immagine o della riproduzione audio.

Per aggiungere un commento, accedi con il tuo Windows Live ID (se utilizzi Hotmail, Messenger o Xbox LIVE possiedi già un Windows Live ID). Accedi


Non hai ancora un Windows Live ID? Registrati

Beiheng Chenha scritto:
大哥你排排版。。。
27 Giu.
小马ha scritto:
张老板,能否翻译成中文的?
一个月了天天翻译英文手册,我看到字母就像吐...
20 Giu.

Riferimenti

L'URL di riferimento per questo intervento è:
http://ben512.spaces.live.com/blog/cns!8D373E7141912AA6!725.trak
Blog che fanno riferimento a questo intervento
  • Nessuno