namespace VideoStreamingService
features
    VideoService {abstract}
        mandatory
            ContentType
                alternative
                    Movie
                    TVShow
                    LiveEvent
            Quality
                or
                    SD
                    HD
                    UHD
            Device
                alternative
                    Smartphone
                    Tablet
                    SmartTV
                    Computer
        optional
            Subtitle
            Dubbing
            AudioDescription
            VideoCodec
                or
                    H264
                    H265
                    AV1
            Resolution
                or
                    "480p"
                    "720p"
                    "1080p"
                    "4K"
            FrameRate
                or
                    "24fps"
                    "30fps"
                    "60fps"
        mandatory
            StreamingProtocol {abstract}
                alternative
                    HTTP
                    HTTPS
                    RTMP
                mandatory
                    PortNumber
                    BufferSize
        optional
            ClosedCaptions
            parentalControl
    UserAccountInfo {abstract}
        mandatory
            Username
            Password
            EmailAddress
        optional
            ProfilePicture
            WatchHistory
            FavoriteContent
        mandatory
            SubscriptionPlan {abstract}
                alternative
                    FreeTrial
                    Basic
                    Premium
                optional
                    AutoRenewal
                    PaymentMethod
    ContentMetadataInfo {abstract}
        mandatory
            Title
            Description
            Genre
        optional
            Rating
            Reviews
            SimilarContent
        mandatory
            Creator {abstract}
                mandatory
                    Name
                    Bio
                optional
                    ProfilePicture
                    SocialMediaLinks
constraints
    Movie => (Subtitle & Dubbing)
    TVShow => (ClosedCaptions & parentalControl)
    LiveEvent => (AudioDescription & VideoCodec)
    Smartphone => (H264 & "480p")
    Tablet => (H265 & "720p")
    SmartTV => (AV1 & "1080p")
    Computer => (H264 & "4K")
    SD => (24fps & PortNumber == 80)
    HD => (30fps & BufferSize >= 1024)
    UHD => (60fps & StreamingProtocol == HTTPS)
    FreeTrial => (AutoRenewal & PaymentMethod)
    Basic => (!AutoRenewal & !PaymentMethod)
    Premium => (WatchHistory & FavoriteContent)
    Username => len(Username) > 3
    Password => len(Password) >= 8
    EmailAddress => EmailAddress == "example@example.com"
    Title => len(Title) < 50
    Description => len(Description) > 100
    Genre => (Genre == "Action" | Genre == "Comedy")
    Rating => (Rating >= 1 & Rating <= 5)
    Reviews => (Reviews >= 0 & Reviews <= 10)
    SimilarContent => (!SimilarContent | SimilarContent == "Related Videos")
    Name => len(Name) > 2
    Bio => len(Bio) > 50
    ProfilePicture => (!ProfilePicture | ProfilePicture == "Image URL")
    SocialMediaLinks => (!SocialMediaLinks | SocialMediaLinks == "Social Media URLs")
    Movie => TVShow
    LiveEvent => (Movie & TVShow)
    Smartphone => Tablet
    Tablet => SmartTV
    Computer => (Smartphone & Tablet & SmartTV)
    SD => HD
    HD => UHD
    UHD => SD
    FreeTrial => Basic
    Basic => Premium
    Premium => FreeTrial
    Username => Password
    Password => EmailAddress
    EmailAddress => Username
    Title => Description
    Description => Genre
    Genre => Rating
    Rating => Reviews
    Reviews => SimilarContent
    SimilarContent => Name
    Name => Bio
    Bio => ProfilePicture
    ProfilePicture => SocialMediaLinks
    Username => len(Username) > 10
    Password => len(Password) >= 12
    EmailAddress => EmailAddress == "example2@example.com"
    Title => len(Title) < 60
    Description => len(Description) > 120
    Genre => (Genre == "Action" | Genre == "Comedy" | Genre == "Drama")
    Rating => (Rating >= 2 & Rating <= 6)
    Reviews => (Reviews >= 1 & Reviews <= 11)
    SimilarContent => (!SimilarContent | SimilarContent == "Related Videos2")