- #1
necro_ignis
- 4
- 0
Hi all,
I'm trying to express a given requirement in a software system. I'm used to UML and UseCase specification, but I thought I would attempt to learn Zed Specification (which is based off logic, set theory., etc... so those topics too!)
Given two sets of data
e.g. in Zed notation
[X] ::= a|b|c|d
[Y]::= 1|2|3|4
or in Set Theory
X = {a,b,c,d}
Y = {1,2,3,4}
In set notation I am having difficulty trying to write down the formula for specifying a set containing a list of pairs made from X and Y. Note: Not a Cartesian Product.
So I'm looking for a Set definition for something like this:
MysterySet = {(a,1),(b,2),(c,3),(d,4)}
or a further example,
Material = {(chair,wood),(table,metal),(cup,clay)}
This is basically an analogy for a key-value pair.
Thanks very much.
I'm trying to express a given requirement in a software system. I'm used to UML and UseCase specification, but I thought I would attempt to learn Zed Specification (which is based off logic, set theory., etc... so those topics too!)
Given two sets of data
e.g. in Zed notation
[X] ::= a|b|c|d
[Y]::= 1|2|3|4
or in Set Theory
X = {a,b,c,d}
Y = {1,2,3,4}
In set notation I am having difficulty trying to write down the formula for specifying a set containing a list of pairs made from X and Y. Note: Not a Cartesian Product.
So I'm looking for a Set definition for something like this:
MysterySet = {(a,1),(b,2),(c,3),(d,4)}
or a further example,
Material = {(chair,wood),(table,metal),(cup,clay)}
This is basically an analogy for a key-value pair.
Thanks very much.