Model Store@2{ Node Product{ VAT@1 : double = 7.5; price : double = 10; discount@2 : double = 0; minVat@1 : $self.VAT>0$ minPrice@2 : $self.price>0$ maxDisc@2 : $(self.VAT*self.price/100+self.price)>self.discount$ /finalPrice@2: double = $self.VAT*self.price/100+self.price-self.discount$; } } Store Library{ Product Book{ VAT = 7; title : String; author : Author; } Node Author{ name : String; nonRep@1:$Author.allInstances().forAll(x|x<>self implies x.name<>self.name)$ wBooks : Book[1..*]{unique}; } Edge writer (Book.author, Author.wBooks) { year : int; } } Library MyLibrary{ Book mobyDick{ title = "mobyDick"; discount = 3; price=10; } Author HM{ name = "Herman Melville"; } Author HM2{ name = "Herman Melville"; } writer(mobyDick, HM) { year = 1851; } }