In SDL a variable is visible only within a process in which it has been created. If another process wants to access the value of the variable, then a signal interchange with the process owning the variable is needed. By using the imported and exported value shorthand, the user of SDL can specify this in a much simpler way.
The exporter (the process that owns the variable) defines the exported variable as follows:
where sum is the name of the exported variable, having the predefined sort Integer. The exporter controls the disclosure of the value of the exported variable by performing the task
which causes the current value of sum to be stored in an implicit copy of that variable. This implicit copy is then used when answering an import request.
The importing process makes the following import definition
IMORTED sum Integer;
where the name and the son must be the same as for the exported variable. When the import expression
IMPORT (sum, exporterid)
for example in the following task
is executed in the importer, the value stored in the implicit copy of the exported sum will replace the import expression. The expression exporterid having the sort Pld gives the address of the exporter (it can be omitted if no other process can export variables having the same name and sort).
Contact the webmaster with
questions or comments about this web site.