<-References Go to ToC Workflow Description Language ->

This chapter specifies the Functions of Thalia as requirements, grouped as the requirements common to both life cycles, those of the App life cycle and those of the AIM life cycle. Each requirement is Firm or Under discussion.

1 Requirements common to both life cycles

Firm – what Thalia shall do.

# Requirement
GEN-1 Through the Controller only: Thalia shall reach a Controller only through the Controller–User Agent API, extended by MPAI-THL. It shall not run Modules or AIMs and shall not access their Shared or Private Storage.
GEN-2 Any kind of device: Thalia shall be specified independently of the kind of device (for instance PC, Mac, Android, iOS).
GEN-3 Same behaviour: Each function of Thalia shall work in the same way for local and MAS-based Apps. This applies to each requirement of Sections 2 and 3.
GEN-4 Identity, preferences and consents: Thalia shall keep the User’s identity, preferences and consents and give each App only what the User allows.
GEN-5 Trust: Thalia shall check, through the Controller, that an App and the AIMs of its Module are those the User obtained.
GEN-6 A help, not walls: Each service of Thalia shall be available to an App, not imposed on it: an App shall be able to use only the services it needs.
GEN-7 One environment for end users and developers: The App life cycle and the AIM life cycle shall be supported in the same environment, with the same catalogue, the same Controller–User Agent API and the same trust.

Under discussion – open points, with the options known today.

# Requirement
GEN-D1 Who enforces consents: Thalia can enforce the consents on devices (microphone, camera) itself, since it gives the devices to the clients. Consents on data and on AIMs can only be enforced by the Controller, which would need them through the API.
GEN-D2 Trust and the Security API: Which part of GEN-5 the Security API of MPAI-AIF already provides, and which part needs an extension.
GEN-D3 Roles of Users: Whether end users and developers have different rights in Thalia (for instance to submit AIMs), or only use different functions.

2 The App life cycle

An App is at another level than the Module: an App is a Workflow written against one Module, and several Apps may run over the same Module. Obtaining an App is therefore different from obtaining its Module.

Firm – what Thalia shall do.

# Requirement
APP-1 Choosing MPAI as a Service instances: Thalia shall let the User choose one or more MPAI as a Service instances and register with them.
APP-2 App catalogue: Thalia shall list the Apps available to the User, local and from the chosen instances, and show for each App what the App itself needs (devices) and what its Module needs (AIMs, AIM Licences, computing resources).
APP-3 Matching the device: Thalia shall know the computing resources of the device and show whether the device meets the needs of the Module of a local App.
APP-4 Obtaining an App: Thalia shall obtain an App: its Workflow, its descriptor and the devices it asks for. An App contains no program of its own.
APP-5 Obtaining the Module: For a local App, Thalia shall ask the Controller to obtain the Module of the App, with its Sub-AIMs and AIM Licences, unless the Controller already has it. Thalia never obtains AIMs itself.
APP-6 Running: Thalia shall start, pause, resume and stop Apps.
APP-7 Devices: Thalia shall give the client of each App the capture and rendering devices it needs; let the User choose among devices of the same kind; and show whether the chosen device is working.
APP-8 Updating and removing: Thalia shall update and remove Apps. Removing an App shall not remove a Module that another App uses.
APP-9 Remote placement: When the device cannot run some functions of an AIM, Thalia may ask the Controller to place them elsewhere. The Controller places them and keeps the security of MPAI-AIF; Thalia never places an AIM itself.

Under discussion – open points, with the options known today.

# Requirement
APP-D1 The client of an App: Since an App contains no program of its own, the client that executes its WDL description is Thalia’s. Whether Apps that need a client of their own are to be admitted in a later version.
APP-D2 Several Apps at the same time: A Controller runs one Module and one User Agent drives it. Two Apps over different Modules can run together. Two Apps over the same Module need two runs of that Module, each with its own Controller, or one App waits for the other.
APP-D3 Sharing devices: The rules by which Thalia shares a device between Apps that want it at the same time: priority, the User’s choice, mixing.
APP-D4 Computing resources: Whether the ResourcePolicies of the AIM Metadata (Memory, CPU, GPU, …) are enough to express what a Module needs, or a further field is needed, for instance the kind of accelerator (CPU, CUDA, …) an implementation uses.
APP-D5 Where remote placement goes: Whether “elsewhere” in APP-9 means an MPAI as a Service instance, another device of the User, or both; and whether it applies to local Apps only, since in a MAS-based App the instance already places the AIMs.
APP-D6 Obtaining the Module: Which part of APP-5 the AIM repository and the AIM Licences of MPAI-AIF already cover.
APP-D7 Updating a Module: A new version of a Module (for instance a new model with Model_Update) changes each App that runs over it. Whether the User is told, or asked, before it happens.
APP-D8 Terms of an App: AIM Licences belong to the AIMs of the Module. Whether an App can have terms of its own.
APP-D9 Same behaviour in practice: For a MAS-based App the Module is in the instance, so the User never obtains a Module. How GEN-3 applies to a case that has one step less.

3 The AIM life cycle

The AIM life cycle covers AIMs specified in an MPAI standard and User-made Composite AIMs. An AIM is defined by its function and its interfaces; it is not owned by a Module or an App, and any Composite AIM may use it as it is.

Firm – what Thalia shall do.

# Requirement
AIM-1 Defining an AIM: Thalia shall let a User define the function and the interfaces of an AIM (Ports by Data Type and Port Number) as AIM Metadata of MPAI-AIF, starting from the Metadata of an existing AIM when it serves.
AIM-2 Implementing a Basic AIM: Thalia shall let a User describe an implementation of a Basic AIM (its AIM Metadata with the sources of its code and models and its resource needs).
AIM-3 Making a Composite AIM: Thalia shall let a User make a Composite AIM, specified in an MPAI standard or User-made, from Basic AIMs and Composite AIMs available in the AIM repository, used as they are.
AIM-4 Describing a Composite AIM: A Composite AIM, including a User-made one, shall be described with the AIM Metadata of MPAI-AIF (its Sub-AIMs and their connections); no new language is needed for its topology.
AIM-5 Checking conformance: Thalia shall check that the Metadata of an AIM conform to MPAI-AIF and that its data conform to their Data Types; for a Composite AIM, also that each Sub-AIM conforms, that each connection joins an Output Port and an Input Port of the same Data Type with compatible Qualifiers, and that each Port of the boundary is used and each internal Port is connected.
AIM-6 Testing: Thalia shall let a User test an AIM run by a Controller: alone, as a Sub-AIM, and as the Module of an App.
AIM-7 Using it: A Composite AIM, specified in an MPAI standard or User-made, shall be usable as a Sub-AIM of other Composite AIMs and as the Module of an App.
AIM-8 Submitting: Thalia shall let a User submit an AIM, with its AIM Licence, to the AIM repository through the Controller.
AIM-9 Updating and withdrawing: Thalia shall let the submitter of an AIM update it (for instance with Model_Update) and withdraw it.

Under discussion – open points, with the options known today.

# Requirement
AIM-D1 Identifying a User-made Composite AIM: An AIM Identifier names an MPAI standard and its version. A User-made Composite AIM needs an identifier that cannot be confused with those of MPAI, for instance in a namespace of its author or of its publisher.
AIM-D2 The Ports of a User-made Composite AIM: Whether its boundary Ports shall be MPAI Data Types. If they are, any App or Composite AIM can use it as a standard one; if they are not, it is usable only by its author.
AIM-D3 Licences: A User-made Composite AIM carries the AIM Licences of its Sub-AIMs. Whether its author can add terms of their own.
AIM-D4 The repository: Whether User-made Composite AIMs are submitted to the AIM repository like the standard ones; whether their visibility can be limited (to the author, to a group, to all); whether the repository checks conformance on arrival or relies on the check of AIM-5.
AIM-D5 A path to standardisation: Whether a User-made Composite AIM adopted by many Users can become a Composite AIM specified in an MPAI standard.
AIM-D6 End users making Composite AIMs: A developer can write AIM Metadata. An end user needs Thalia to choose AIMs from the repository and connect Ports of the same Data Type, with the check of AIM-5 made as the end user goes. Whether this is a function of Thalia or of an App running in Thalia.
AIM-D7 New functions and new Data Types: Whether AIM-1 extends to an AIM with a function no MPAI standard has, and to Data Types no MPAI standard has.
AIM-D8 Where tests run: Whether the tests of AIM-6 always run under a real Controller, as the AIM will run, or also in a test setting of Thalia.

<-References Go to ToC Workflow Description Language ->