Choreographic programming: Difference between revisions

Content deleted Content added
Citation bot (talk | contribs)
Add: series, s2cid, doi, authors 1-1. Removed parameters. Some additions/deletions were parameter name changes. | Use this bot. Report bugs. | Suggested by Corvus florensis | #UCB_webform 1137/2500
Endpoint Projection: {{aligned table|}}
Line 43:
 
Endpoint projection returns a program for each role described in the source choreography.<ref name="mp-langs" /> For example, given the choreography above, endpoint projection would return three programs: one for <code>Client</code>, one for <code>Service</code>, and one for <code>CAS</code>. They are shown below in pseudocode form, where <code>send</code> and <code>recv</code> are primitives for sending and receiving messages to/from other roles.
{|{aligned table|class="wikitable"|cols=2|col1header=y|rowstyle=vertical-align:middle
|+title=Endpoint Projection (EPP) of the SSO choreography
!|1=Client
!|3=Service
!|5=CAS
|2=<syntaxhighlight lang="text" line>
|-
|<syntaxhighlight lang="text" line>
send (credentials, serviceID) to CAS
recv result from CAS
</syntaxhighlight>
|4=<syntaxhighlight lang="text" line>
recv result from CAS
</syntaxhighlight>
|6=<syntaxhighlight lang="text" line>
recv authRequest from Client
if check(authRequest) then
Line 66 ⟶ 65:
send Failure to Service
</syntaxhighlight>
|}}
For each role, its code contains the actions that the role should execute to implement the choreography correctly together with the others.