Please enable JavaScript.
Coggle requires JavaScript to display documents.
VDM-SL, WAN NUR AFIQAH BINTI ZULKEFLI (D20191089434) - Coggle Diagram
What is VDM-SL model?
A system description given in terms of the functionality permormed in data. It consists of a series of definitions of data types and functions or operation performed upon them
Data types
-
-
Each type definiton introduces anew type name and gives a representation in terms of the basic type or in terms of data types already introduced.
-
Structuring in VDM-SL
-
2) Importing
done in an imports section that is started off with the keyword imports and followed by a sequence of imports from different module
The import signatures are specific for types, values, functions and operations and each of these are started with the corresponding keyword
3)Exporting
The exports module signature either simply consist of the keyword all or a sequence of export signature
Such export signature are specific for types, values, functions and operations and each of these are started with the corresponding keyword
VDM++
-
The key concept are :
2) Inheritance
In case class inherits constructs from other classes the class name in the class heading can be followed by the keyword is subclass of followed by a comma-separated list of name of superclass
3) Access modifier
Information hiding in VDM++ is done in the same way as in most object oriented languages using access modifier
In VDM++ definitions are per default private but in front of all definitions it is possible to use one of the access modifier keywords : private, public and protected
1) Class
-
At the end of the class, the keyword end is written followed again by the name of the class
State-based modelling
In VDM-SL, functions do not have side-effects such as changing the state of a persistent global variable
This is useful ability in many programming languages, so a similar concept exist : instead of functions, operations are use to change sate variables (known as global)
Functional modelling
In VDM-SL, functions are defined over the data types defined in a model
-
required to be deterministic so that a function can satisfying the example specification above must always return the same result for the same input
-
-