Download User Manual: Type System - Software and Systems Engineering

Transcript
Type System of AutoFOCUS
Contents:
1
Introduction .............................................................................................................4
2
Basic Concepts and Definitions .........................................................................5
2.1
Terms.......................................................................................................................... 5
2.2
Types .......................................................................................................................... 6
2.3
Type Classes............................................................................................................... 7
2.4
Module Concept ......................................................................................................... 8
2.5
Implementation Types................................................................................................ 9
3
Using Type System............................................................................................... 13
4
Type Inference ...................................................................................................... 16
5
4.1
Context of Type Inference........................................................................................ 16
4.2
Atomic Rules............................................................................................................ 17
4.3
Propagation............................................................................................................... 18
Syntax....................................................................................................................... 19
5.1
Terms........................................................................................................................ 19
5.1.1
Constants .......................................................................................................... 19
5.1.2
Variables........................................................................................................... 19
5.1.3
Applications ..................................................................................................... 20
5.1.4
Sets ................................................................................................................... 21
5.1.5
Arrays ............................................................................................................... 22
5.1.6
User Definitions ............................................................................................... 23
5.2
Types ........................................................................................................................ 25
5.2.1
Type Terms ...................................................................................................... 25
5.2.2
Data Definitions ............................................................................................... 25
5.2.3
Type Abbreviations .......................................................................................... 28
5.2.4
Implementation Types...................................................................................... 28
5.2.5
Range Types ..................................................................................................... 29
5.2.6
Casts ................................................................................................................. 29
5.3
Modularity (Import) ................................................................................................. 29
page 2