Book contents
- Frontmatter
- Contents
- Preface
- About the illustrations
- List of illustrations
- List of tables
- PART I BACKGROUND
- PART II FIRST EXAMPLES
- 3 The basic principles
- 4 Basic imperative statements
- PART III LANGUAGE CONSTRUCTS
- PART IV RELATED TOPICS
- Appendix A A big-step semantics of Bip
- Appendix B Implementing semantic definitions in SML
- References
- Index
3 - The basic principles
Published online by Cambridge University Press: 05 August 2012
- Frontmatter
- Contents
- Preface
- About the illustrations
- List of illustrations
- List of tables
- PART I BACKGROUND
- PART II FIRST EXAMPLES
- 3 The basic principles
- 4 Basic imperative statements
- PART III LANGUAGE CONSTRUCTS
- PART IV RELATED TOPICS
- Appendix A A big-step semantics of Bip
- Appendix B Implementing semantic definitions in SML
- References
- Index
Summary
In this chapter we encounter our first examples of structural operational semantics, namely big-step and small-step semantics of arithmetic and Boolean expressions. These examples are on a small scale, but they still manage to introduce the principles that we shall be using throughout the remainder of the book.
A structural operational semantics is syntax-directed, and for this reason we first introduce the notion of abstract syntax. We use abstract syntax in this chapter to introduce the language Bims, which forms the core of almost all of the tiny programming languages considered in this book.
The rest of the chapter is devoted to introducing the basics of structural operational semantics. A central concept is that of a transition system. Transition systems are defined using transition rules.
The final section of the chapter briefly explores how we may now formulate and prove properties of a structural operational semantics. We shall return to this topic in later chapters.
Abstract syntax
In order to describe the behaviour of programs we must first present an account of the structure of programs, that is, their syntax. In program semantics we are not interested in syntax analysis – that is part of the theory of parsing. Instead, we are interested in a notion of abstract syntax that will allow us to describe the essential structure of a program. In other words, abstract syntax is not concerned with operator precedence etc.
- Type
- Chapter
- Information
- Transitions and TreesAn Introduction to Structural Operational Semantics, pp. 27 - 42Publisher: Cambridge University PressPrint publication year: 2010