Elm Exactly

Rule 186p-proc-spawn

TransitionsK→⟨ℓ⟩K′K\step{\opt{\ell}}K'
P(pid)=(tk,s′,o)tk→atk′a=spawn(tk0)⇓succeed pid′pid′∉Dom PP′=P+{pid↦(tk′,s,o), pid′↦(tk0,s,spawned)}(s,v,M,P,sb,Q,H)→a(s,v,M,P′,sb,Q,H)\frac{\begin{array}{c}P(\pid)=(\tk,s',\pgorig)\premsep\tk\effred{\effa}\tk'\premsep \effa=\effdone{\effspawn(\tk_0)}{\effsucceed\,\pid'}\\ \pid'\notin\Dom P\premsep P'=P+\{\pid\mapsto(\tk',s,\pgorig),\ \pid'\mapsto(\tk_0,s,\pgspawned)\}\end{array}}{\begin{array}{c}(s,v,M,P,\sbv,Q,H)\step{\effa}(s,v,M,P',\sbv,Q,H)\end{array}}
(186)
Read it in its chapter·Permanent address: /standard/rules/p-proc-spawn

Comments

The new process names a process never started before, and its origin is spawned\pgspawned: its outcome goes to no other process, and it gives no message (rule (189)).

TeX source
\defnrule[r:p-proc-spawn]
  {P(\pid)=(\tk,s',\pgorig)\premsep\tk\effred{\effa}\tk'\premsep
   \effa=\effdone{\effspawn(\tk_0)}{\effsucceed\,\pid'}\\
   \pid'\notin\Dom P\premsep
   P'=P+\{\pid\mapsto(\tk',s,\pgorig),\ \pid'\mapsto(\tk_0,s,\pgspawned)\}}
  {(s,v,M,P,\sbv,Q,H)\step{\effa}(s,v,M,P',\sbv,Q,H)}

Tests (7)

Discussions

Discuss this rule·Search the discussions on GitHub

Discussions are on GitHub; one about this rule has [r:p-proc-spawn] in its title.

A Standard Definition of Elm? (Draft version 0.4) © Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.