Beruflich Dokumente
Kultur Dokumente
1.2.2006
Überblick
• 1. Eingebettete Systeme
1.1. Definitionen
1.2. Anforderungsanalyse
1.3. Modellierung
1.4. Architektur
1.5. Automotive Software Engineering
• 2. Software-Qualität
2.1 Definitionen und Standards
2.2 Funktionstest, Überdeckungsmaße
2.3 Integrations-, HiL- und Abnahmetests
2.4 Verifikation und Validierung
• 3. Projektmanagement
3.1 Qualitätsstandards (CMM/I, SPICE, ISO)
3.2 Aufwandsschätzung, Planungstechnik
3.3 Risikomanagement
• Informelle QS-Methode
sehr populär, sehr effektiv
oft obligatorisch, vollständig!
• Ergänzung formaler Methoden
Abgleich mit den ursprünglichen Zielen
Aufzeigen von inhaltlichen (nichtformalen) Fehlern
- z.B. intuitive Bedeutung versus textuelle Gestalt eines Identifiers
Verbesserung von Lesbarkeit und Verständlichkeit
• Durchführungsmöglichkeiten
Code Walkthrough
(Fagan) Inspektion
1. überall im Entwicklungsprozess
2. alle Arten von Fehlern
3. ohne big boss
4. mehrere Einzelschritte
5. Checklistenbasiert
6. max. 2 Stunden
7. Rollen werden zugewiesen
Fagan, M. E., Design and Code
8. trainierter Moderator Inspections to Reduce Errors in
Program Development.
9. Statistiken werden geführt IBM Systems Journal 15(3), 1976.
http://java.sun.com/docs/codeconv
• Namenskonventionen
example.java, example.class
interface RasterDelegate; getBackground(); float myWidth;
static final int MIN_WIDTH = 4;
• Kommentarregeln
z.B. Name, Version, Datum, Copyright
z.B. wann soll kein Kommentar stehen
• Formatierungsanweisungen
Zeilenumbruch, Einrückungsregeln, Leerzeichen
eine Deklaration pro Zeile, am Blockanfang
Format von Methodenköpfen Sample(int i, int j) {
Format von Anweisungen if (condition) {
• Programmierstil
H. Schlingloff, Software-Engineering II 1.2.2006 Folie 13
Programmierstil
• Lokalitätsprinzip
Don't make any instance or class variable public without good
reason
Avoid using an object to access a class (static) variable or
method
Numerical constants (literals) should not be coded directly
• Seiteneffekte
Do not use embedded assignments in an attempt to improve
run-time performance. This is the job of the compiler
Use parentheses liberally in expressions involving mixed
operators. Even if the operator precedence seems clear to you,
it might not be to others
Try to make the structure of your program match the intent
http://www.abxsoft.com/rules.htm
• Buy a copy of a baby naming book and you'll never be at a loss for variable
names. Fred is a wonderful name, and easy to type. If you're looking for easy-to-
type variable names, try asdf or qwert
• If you call your variables a, b, c, then it will be impossible to search for
instances of them using a simple text editor. Further, nobody will be able to guess
what they are for. If anyone even hints at breaking the tradition honoured since
FØRTRAN of using i, j, and k for indexing variables, warn them about what the
Spanish Inquisition did to heretics
• In naming functions and variables, make heavy use of abstract words like it,
everything, data, handle, stuff, do, routine, perform and the digits e.g.
routineX48, PerformDataFunction, DoIt, HandleStuff and do_args_method
• Choose variable names with irrelevant emotional connotation. e.g.:
marypoppins = (superman + starship) / god;
This confuses the reader because they have difficulty disassociating the emotional
connotations of the words from the logic they're trying to think about.
H. Schlingloff, Software-Engineering II 1.2.2006 Folie 17
Statische Analyse: Compiler
• Typkorrektheit
• Initialisierung von Variablen
• Programmflussgraph
Unerreichbarer Code
Unveränderliche Felder
Konstante Terme und Bedingungen
• Feldgrenzenverletzung ?
• Nullzeiger-Dereferenzierung ?
• Synchronisationsfehler ?
H. Schlingloff, Software-Engineering II 1.2.2006 Folie 18