I am writing a formal specification for my model using z-notation of Z-language. I am stuck and don't know how to include one schema in another schema and creates its variables in other schemas. Any guidance and help would be appreciated. Thanks.
How to do inclusion of schema in other schema using Z language
419 Views Asked by Yasir Darr At
2
You can use a schema like a record data type. E.g. let's assume you have a schema describing a complex integer number:
You can declare a variable in another schema to be of that type:
You can of course create more complex data types with it, here a sequence and an operation to append an element:
You can also use the theta-operator to create an instance of that type. The values for the variables are taken from the current context (+ optional decorations):
θComplex?is an instance ofComplexwhere the values forrealandimgare taken from the local variablesreal?andimg?.We can also declare the input variables by using the original schema and write the operation more concise (Add3 is the same as Add2):
(I deleted my original answer because I misinterpret your question.)