added new constraints

This commit is contained in:
Lukian 2025-01-17 13:39:32 +01:00
parent 3e0c80c3d8
commit 608a4e0706
2 changed files with 349 additions and 304 deletions

View file

@ -70,7 +70,12 @@ attributes
longueur: Integer
Etat: EtatBateau
constraints
inv longueur: type = TypeBateau::Torpilleur implies longueur = 2
inv longueur:
if type = TypeBateau::Torpilleur then longueur = 2
else if type = TypeBateau::Contre_Torpilleur then longueur = 3
else if type = TypeBateau::Croiseur then longueur = 4
else longueur = 5
endif endif endif
end
association Utilise between