- •CONTENTS
- •PREFACE
- •LIST OF FIGURES
- •INTRODUCTION
- •1.1 WHAT IS TIME?
- •1.2 SIMULATION
- •1.3 TESTING
- •1.4 VERIFICATION
- •1.6 USEFUL RESOURCES
- •2.1 SYMBOLIC LOGIC
- •2.1.1 Propositional Logic
- •2.1.2 Predicate Logic
- •2.2 AUTOMATA AND LANGUAGES
- •2.2.1 Languages and Their Representations
- •2.2.2 Finite Automata
- •2.3 HISTORICAL PERSPECTIVE AND RELATED WORK
- •2.4 SUMMARY
- •EXERCISES
- •3.1 DETERMINING COMPUTATION TIME
- •3.2 UNIPROCESSOR SCHEDULING
- •3.2.1 Scheduling Preemptable and Independent Tasks
- •3.2.2 Scheduling Nonpreemptable Tasks
- •3.2.3 Nonpreemptable Tasks with Precedence Constraints
- •3.2.5 Periodic Tasks with Critical Sections: Kernelized Monitor Model
- •3.3 MULTIPROCESSOR SCHEDULING
- •3.3.1 Schedule Representations
- •3.3.3 Scheduling Periodic Tasks
- •3.4 AVAILABLE SCHEDULING TOOLS
- •3.4.2 PerfoRMAx
- •3.4.3 TimeWiz
- •3.6 HISTORICAL PERSPECTIVE AND RELATED WORK
- •3.7 SUMMARY
- •EXERCISES
- •4.1 SYSTEM SPECIFICATION
- •4.2.1 Analysis Complexity
- •4.3 EXTENSIONS TO CTL
- •4.4 APPLICATIONS
- •4.4.1 Analysis Example
- •4.5 COMPLETE CTL MODEL CHECKER IN C
- •4.6 SYMBOLIC MODEL CHECKING
- •4.6.1 Binary Decision Diagrams
- •4.6.2 Symbolic Model Checker
- •4.7.1 Minimum and Maximum Delays
- •4.7.2 Minimum and Maximum Number of Condition Occurrences
- •4.8 AVAILABLE TOOLS
- •4.9 HISTORICAL PERSPECTIVE AND RELATED WORK
- •4.10 SUMMARY
- •EXERCISES
- •VISUAL FORMALISM, STATECHARTS, AND STATEMATE
- •5.1 STATECHARTS
- •5.1.1 Basic Statecharts Features
- •5.1.2 Semantics
- •5.4 STATEMATE
- •5.4.1 Forms Language
- •5.4.2 Information Retrieval and Documentation
- •5.4.3 Code Executions and Analysis
- •5.5 AVAILABLE TOOLS
- •5.6 HISTORICAL PERSPECTIVE AND RELATED WORK
- •5.7 SUMMARY
- •EXERCISES
- •6.1 SPECIFICATION AND SAFETY ASSERTIONS
- •6.4 RESTRICTED RTL FORMULAS
- •6.4.1 Graph Construction
- •6.5 CHECKING FOR UNSATISFIABILITY
- •6.6 EFFICIENT UNSATISFIABILITY CHECK
- •6.6.1 Analysis Complexity and Optimization
- •6.7.2 Timing Properties
- •6.7.3 Timing and Safety Analysis Using RTL
- •6.7.5 RTL Representation Converted to Presburger Arithmetic
- •6.7.6 Constraint Graph Analysis
- •6.8 MODECHART SPECIFICATION LANGUAGE
- •6.8.1 Modes
- •6.8.2 Transitions
- •6.9.1 System Computations
- •6.9.2 Computation Graph
- •6.9.3 Timing Properties
- •6.9.4 Minimum and Maximum Distance Between Endpoints
- •6.9.5 Exclusion and Inclusion of Endpoint and Interval
- •6.10 AVAILABLE TOOLS
- •6.11 HISTORICAL PERSPECTIVE AND RELATED WORK
- •6.12 SUMMARY
- •EXERCISES
- •7.1.1 Timed Executions
- •7.1.2 Timed Traces
- •7.1.3 Composition of Timed Automata
- •7.1.4 MMT Automata
- •7.1.6 Proving Time Bounds with Simulations
- •7.2.1 Untimed Traces
- •7.2.2 Timed Traces
- •7.3.1 Clock Regions
- •7.3.2 Region Automaton
- •7.4 AVAILABLE TOOLS
- •7.5 HISTORICAL PERSPECTIVE AND RELATED WORK
- •7.6 SUMMARY
- •EXERCISES
- •TIMED PETRI NETS
- •8.1 UNTIMED PETRI NETS
- •8.2 PETRI NETS WITH TIME EXTENSIONS
- •8.2.1 Timed Petri Nets
- •8.2.2 Time Petri Nets
- •8.3 TIME ER NETS
- •8.3.1 Strong and Weak Time Models
- •8.5.1 Determining Fireability of Transitions from Classes
- •8.5.2 Deriving Reachable Classes
- •8.6 MILANO GROUP’S APPROACH TO HLTPN ANALYSIS
- •8.6.1 Facilitating Analysis with TRIO
- •8.7 PRACTICALITY: AVAILABLE TOOLS
- •8.8 HISTORICAL PERSPECTIVE AND RELATED WORK
- •8.9 SUMMARY
- •EXERCISES
- •PROCESS ALGEBRA
- •9.1 UNTIMED PROCESS ALGEBRAS
- •9.2 MILNER’S CALCULUS OF COMMUNICATING SYSTEMS
- •9.2.1 Direct Equivalence of Behavior Programs
- •9.2.2 Congruence of Behavior Programs
- •9.2.3 Equivalence Relations: Bisimulation
- •9.3 TIMED PROCESS ALGEBRAS
- •9.4 ALGEBRA OF COMMUNICATING SHARED RESOURCES
- •9.4.1 Syntax of ACSR
- •9.4.2 Semantics of ACSR: Operational Rules
- •9.4.3 Example Airport Radar System
- •9.5 ANALYSIS AND VERIFICATION
- •9.5.1 Analysis Example
- •9.5.2 Using VERSA
- •9.5.3 Practicality
- •9.6 RELATIONSHIPS TO OTHER APPROACHES
- •9.7 AVAILABLE TOOLS
- •9.8 HISTORICAL PERSPECTIVE AND RELATED WORK
- •9.9 SUMMARY
- •EXERCISES
- •10.3.1 The Declaration Section
- •10.3.2 The CONST Declaration
- •10.3.3 The VAR Declaration
- •10.3.4 The INPUTVAR Declaration
- •10.3.5 The Initialization Section INIT and INPUT
- •10.3.6 The RULES Section
- •10.3.7 The Output Section
- •10.5.1 Analysis Example
- •10.6 THE ANALYSIS PROBLEM
- •10.6.1 Finite Domains
- •10.6.2 Special Form: Compatible Assignment to Constants,
- •10.6.3 The General Analysis Strategy
- •10.8 THE SYNTHESIS PROBLEM
- •10.8.1 Time Complexity of Scheduling Equational
- •10.8.2 The Method of Lagrange Multipliers for Solving the
- •10.9 SPECIFYING TERMINATION CONDITIONS IN ESTELLA
- •10.9.1 Overview of the Analysis Methodology
- •10.9.2 Facility for Specifying Behavioral Constraint Assertions
- •10.10 TWO INDUSTRIAL EXAMPLES
- •10.10.2 Specifying Assertions for Analyzing the FCE Expert System
- •Meta Rules of the Fuel Cell Expert System
- •10.11.1 General Analysis Algorithm
- •10.11.2 Selecting Independent Rule Sets
- •10.11.3 Checking Compatibility Conditions
- •10.12 QUANTITATIVE TIMING ANALYSIS ALGORITHMS
- •10.12.1 Overview
- •10.12.2 The Equational Logic Language
- •10.12.3 Mutual Exclusiveness and Compatibility
- •10.12.5 Program Execution and Response Time
- •10.12.8 Special Form A and Algorithm A
- •10.12.9 Special Form A
- •10.12.10 Special Form D and Algorithm D
- •10.12.11 The General Analysis Algorithm
- •10.12.12 Proofs
- •10.13 HISTORICAL PERSPECTIVE AND RELATED WORK
- •10.14 SUMMARY
- •EXERCISES
- •11.1 THE OPS5 LANGUAGE
- •11.1.1 Overview
- •11.1.2 The Rete Network
- •11.2.1 Static Analysis of Control Paths in OPS5
- •11.2.2 Termination Analysis
- •11.2.3 Timing Analysis
- •11.2.4 Static Analysis
- •11.2.5 WM Generation
- •11.2.6 Implementation and Experiment
- •11.3.1 Introduction
- •11.3.3 Response Time of OPS5 Systems
- •11.3.4 List of Symbols
- •11.3.5 Experimental Results
- •11.3.6 Removing Cycles with the Help of the Programmer
- •11.4 HISTORICAL PERSPECTIVE AND RELATED WORK
- •11.5 SUMMARY
- •EXERCISES
- •12.1 INTRODUCTION
- •12.2 BACKGROUND
- •12.3 BASIC DEFINITIONS
- •12.3.1 EQL Program
- •12.3.4 Derivation of Fixed Points
- •12.4 OPTIMIZATION ALGORITHM
- •12.5 EXPERIMENTAL EVALUATION
- •12.6 COMMENTS ON OPTIMIZATION METHODS
- •12.6.1 Qualitative Comparison of Optimization Methods
- •12.7 HISTORICAL PERSPECTIVE AND RELATED WORK
- •12.8 SUMMARY
- •EXERCISES
- •BIBLIOGRAPHY
- •INDEX
REAL-TIME SYSTEMS
REAL-TIME SYSTEMS
Scheduling, Analysis, and Verification
ALBERT M. K. CHENG
University of Houston
A JOHN WILEY & SONS, INC., PUBLICATION
Copyright c 2002 by John Wiley & Sons, Inc., Hoboken, New Jersey. All rights reserved.
Published by John Wiley & Sons, Inc., Hoboken, New Jersey.
Published simultaneously in Canada.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400, fax 978-750-4470, or on the web at www.copyright.com. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, e-mail: permcoordinator@wiley.com.
Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts in preparing this book, they make no representations or warranties with respect to the accuracy or completeness of the contents of this book and specifically disclaim any implied warranties of merchantability or fitness for a particular purpose. No warranty may be created or extended by sales representatives or written sales materials. The advice and strategies contained herein may not be suitable for your situation. You should consult with a professional where appropriate. Neither the publisher nor author shall be liable for any loss of profit or any other commercial damages, including but not limited to special, incidental, consequential, or other damages.
For general information on our other products and services please contact our Customer Care Department within the U.S. at 877-762-2974, outside the U.S. at 317-572-3993 or fax 317-572-4002.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print, however, may not be available in electronic format.
Library of Congress Cataloging-in-Publication Data Is Available
ISBN 0-471-18406-3
Printed in the United States of America
10 |
9 8 |
7 |
6 5 |
4 3 |
2 |
1 |
To My Family and Friends
CONTENTS
PREFACE |
xiii |
LIST OF FIGURES |
xix |
1 INTRODUCTION |
1 |
1.1What Is Time? / 3
1.2Simulation / 4
1.3Testing / 5
1.4Verification / 6
1.5Run-Time Monitoring / 7
1.6Useful Resources / 8
2ANALYSIS AND VERIFICATION OF NON-REAL-TIME SYSTEMS 10
2.1Symbolic Logic / 10
2.2Automata and Languages / 28
2.3Historical Perspective and Related Work / 37
2.4Summary / 38 Exercises / 39
3 REAL-TIME SCHEDULING AND SCHEDULABILITY ANALYSIS 41
3.1Determining Computation Time / 43
3.2Uniprocessor Scheduling / 44
vii
viiiCONTENTS
3.3Multiprocessor Scheduling / 65
3.4Available Scheduling Tools / 72
3.5Available Real-Time Operating Systems / 75
3.6Historical Perspective and Related Work / 76
3.7Summary / 77 Exercises / 83
4 MODEL CHECKING OF FINITE-STATE SYSTEMS |
86 |
4.1System Specification / 87
4.2Clarke–Emerson–Sistla Model Checker / 89
4.3Extensions to CTL / 93
4.4Applications / 93
4.5Complete CTL Model Checker in C / 96
4.6Symbolic Model Checking / 116
4.7Real-Time CTL / 120
4.8Available Tools / 126
4.9Historical Perspective and Related Work / 127
4.10Summary / 129 Exercises / 131
5 VISUAL FORMALISM, STATECHARTS, AND STATEMATE |
134 |
5.1Statecharts / 135
5.2Activity-Charts / 140
5.3Module-Charts / 140
5.4STATEMATE / 142
5.5Available Tools / 143
5.6Historical Perspective and Related Work / 145
5.7Summary / 146 Exercises / 147
6 REAL-TIME LOGIC, GRAPH-THEORETIC ANALYSIS, |
|
AND MODECHART |
148 |
6.1Specification and Safety Assertions / 149
6.2Event-Action Model / 149
6.3Real-Time Logic / 150
6.4Restricted RTL Formulas / 152
6.5Checking for Unsatisfiability / 155
6.6Efficient Unsatisfiability Check / 157
CONTENTS ix
6.7Industrial Example: NASA X-38 Crew Return Vehicle / 161
6.8Modechart Specification Language / 172
6.9Verifying Timing Properties of Modechart Specifications / 175
6.10Available Tools / 180
6.11Historical Perspective and Related Work / 180
6.12Summary / 181 Exercises / 183
7 VERIFICATION USING TIMED AUTOMATA |
187 |
7.1Lynch–Vaandrager Automata-Theoretic Approach / 187
7.2Alur–Dill Automata-Theoretic Approach / 193
7.3Alur–Dill Region Automaton and Verification / 201
7.4Available Tools / 205
7.5Historical Perspective and Related Work / 207
7.6Summary / 207 Exercises / 210
8 TIMED PETRI NETS |
212 |
8.1Untimed Petri Nets / 212
8.2Petri Nets with Time Extensions / 214
8.3Time ER Nets / 220
8.4Properties of High-Level Petri Nets / 224
8.5Berthomieu–Diaz Analysis Algorithm for TPNs / 226
8.6Milano Group’s Approach to HLTPN Analysis / 229
8.7Practicality: Available Tools / 231
8.8Historical Perspective and Related Work / 232
8.9Summary / 233 Exercises / 236
9 PROCESS ALGEBRA |
237 |
9.1Untimed Process Algebras / 237
9.2Milner’s Calculus of Communicating Systems / 238
9.3Timed Process Algebras / 241
9.4Algebra of Communicating Shared Resources / 242
9.5Analysis and Verification / 250
9.6Relationships to Other Approaches / 255
9.7Available Tools / 255
9.8Historical Perspective and Related Work / 256
x |
CONTENTS |
|
|
|
|
9.9 |
Summary / 256 |
|
|
|
|
Exercises / 258 |
|
|
10 |
DESIGN AND ANALYSIS OF PROPOSITIONAL-LOGIC |
|||
|
RULE-BASED SYSTEMS |
|
259 |
|
|
10.1 |
Real-Time Decision Systems / 260 |
|
|
|
10.2 |
Real-Time Expert Systems / 262 |
|
|
|
10.3 |
Propositional-Logic Rule-Based Programs: |
|
|
|
|
the EQL Language / 263 |
|
|
|
10.4 |
State-Space Representation / 269 |
|
|
|
10.5 |
Computer-Aided Design Tools / 272 |
|
|
|
10.6 |
The Analysis Problem / 280 |
|
|
|
10.7 |
Industrial Example: Analysis of the Cryogenic Hydrogen Pressure |
||
|
|
Malfunction Procedure of the Space Shuttle Vehicle Pressure |
||
|
|
Control System / 286 |
|
|
|
10.8 |
The Synthesis Problem / 294 |
|
|
|
10.9 |
Specifying Termination Conditions in Estella / 301 |
||
|
10.10 |
Two Industrial Examples / 317 |
|
|
|
10.11 |
The Estella-General Analysis Tool / 324 |
|
|
|
10.12 |
Quantitative Timing Analysis Algorithms |
/ |
333 |
|
10.13 |
Historical Perspective and Related Work |
/ |
360 |
|
10.14 |
Summary / 363 |
|
|
|
|
Exercises / 365 |
|
|
11 |
TIMING ANALYSIS OF PREDICATE-LOGIC |
|||
|
RULE-BASED SYSTEMS |
|
367 |
11.1The OPS5 Language / 369
11.2Cheng–Tsai Timing Analysis Methodology / 373
11.3Cheng–Chen Timing Analysis Methodology / 399
11.4Historical Perspective and Related Work / 430
11.5Summary / 432 Exercises / 435
12 OPTIMIZATION OF RULE-BASED SYSTEMS |
436 |
12.1Introduction / 437
12.2Background / 438
12.3Basic Definitions / 439
12.4Optimization Algorithm / 445
12.5Experimental Evaluation / 455
CONTENTS xi
12.6Comments on Optimization Methods / 460
12.7Historical Perspective and Related Work / 462
12.8Summary / 464 Exercises / 465
BIBLIOGRAPHY |
467 |
INDEX |
505 |