Script

A script is data that can be uploaded to, and executed on/within a DP, so as to extend the functionality of that DP. The exchange of data to and from a DP, as well as any processing of such data, is controlled by the set of script in a DP.
In general, DPs will have scripts that enable data about its subject, but also about scripts themselves, to be created, read, updated, deleted, archived, etc.
Scripts may provide DPs with other functionalities as well, such as:
- combining and/or anonymizing data about its subject,
- listing the kinds of data or scripts that exists within a DP
- listing the logs of data exchanges that have occurred,
- providing data that can be used to identify the DP's subject,
- participating in cryptographic multi-party computation protocols,
- etc.
Policies, and the Execution of Scripts
The figure below illustrates a DP that contains scripts, each of which is associated with three policies:
- The access control policy (ACP) contains the data that the DP needs to determine whether or not to service a request that it has received for the execution of that script;
- The execution control policy (ECP) contains the data that the script needs to take preferences into account, and make particular decisions, e.g., whether or not to do some particular pre- or postprocessing, whether or not to take particular data items into account, what the result should be, etc.
- The response control policy (RCP) specifies how the result of the processing should be packaged, which interface (and protocol) to use for transmitting the response and where to send the result. Note that errors, or the decision to not process a request, may also be considered a result for which a response may be sent.

This enables a DP to generically function by
- awaiting request for executing a particular script (purple arrow at the left);
- getting its ACP, and use it to decide whether or not to service the request (orange arrow);
- executing the (identified) script, using parameters of the request, and the ECP; this can include accessing data pertaining to the subject of the DP (pink arrows), and creating the result.
- getting its RCP, that enables the packaging of the result (or the errors) into a response, and sending it.