Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
In this chapter, the following content will be discussed: Domain and range restriction, relation inverse and relation image, relation composition, formal specification languages, formal specification languages: VDM-SL, basic logical operators,. | Formal Methods in SE Lecture 20 Agenda 2 Relations in Z Specification Formal Methods in SE Domain and Range Restriction 3 A new relation may be created by restricting the domain or range of a relation to a set The resulting relation only has pairs where the first (domain restriction) or second (range restriction) element is a member of the restricting set. Formal Methods in SE Domain and Range Restriction 4 Formal Methods in SE Domain and Range Subtraction 5 Similarly, elements may be subtracted from the domain or range to yield a new relation = ? Formal Methods in SE Relation Inverse and Relation Image 6 Formal Methods in SE Contd 7 Formal Methods in SE Relation Composition 8 Formal Methods in SE If the target of one relation matches the source of another, it may be useful to consider their relational composition The composition of two relations relates objects in the source of the first to objects in the target of the second, provided that some intermediate point exists. Relation Composition 9 Formal Methods in SE Relation Example 10 Formal Methods in SE A project must be located in a city, but any city may have many projects located within it. Many workers can work on a project, and a worker can work on many projects. A worker can have many skills (e.g. preparing material requisitions, checking drawings, etc.), but he/she may only use a given skill on a particular project if that skill is required. Relation Example 11 Formal Methods in SE Sets Required Project a set of projects City a set of cities Worker a set of workers Skill a set of skills Building Relations A project must be located in a city, but any city may have many projects located within it. Many workers can work on a project, and a worker can workon many projects. Relation Example 12 Formal Methods in SE A worker can have many skills (e.g. preparing material requisitions, checking drawings, etc.), but he/she may only use a given skill on a particular project if that skill is required. Model can be . | Formal Methods in SE Lecture 20 Agenda 2 Relations in Z Specification Formal Methods in SE Domain and Range Restriction 3 A new relation may be created by restricting the domain or range of a relation to a set The resulting relation only has pairs where the first (domain restriction) or second (range restriction) element is a member of the restricting set. Formal Methods in SE Domain and Range Restriction 4 Formal Methods in SE Domain and Range Subtraction 5 Similarly, elements may be subtracted from the domain or range to yield a new relation = ? Formal Methods in SE Relation Inverse and Relation Image 6 Formal Methods in SE Contd 7 Formal Methods in SE Relation Composition 8 Formal Methods in SE If the target of one relation matches the source of another, it may be useful to consider their relational composition The composition of two relations relates objects in the source of the first to objects in the target of the second, provided that some intermediate point exists. Relation .