Elm Exactly

Rule 187p-proc-kill

TransitionsK→⟨ℓ⟩K′K\step{\opt{\ell}}K'
P(pid)=(tk,s′,o)tk→atk′a=kill(pid′)⇓tk′′P′=(P+{pid′↦ended})+{pid↦(tk′,s,o)}(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{\effkill(\pid')}{\tk''}\\ P'=(P+\{\pid'\mapsto\pgended\})+\{\pid\mapsto(\tk',s,\pgorig)\}\end{array}}{\begin{array}{c}(s,v,M,P,\sbv,Q,H)\step{\effa}(s,v,M,P',\sbv,Q,H)\end{array}}
(187)
Read it in its chapter·Permanent address: /standard/rules/p-proc-kill

Comments

The killed process takes no further step, and if it was performing the task of a leaf it gives no message. Killing a process that has ended changes nothing. When a process kills itself, the second modification overrides the first, so it is not ended and goes on with tk′\tk'.

Referred to from

TeX source
\defnrule[r:p-proc-kill]
  {P(\pid)=(\tk,s',\pgorig)\premsep\tk\effred{\effa}\tk'\premsep
   \effa=\effdone{\effkill(\pid')}{\tk''}\\
   P'=(P+\{\pid'\mapsto\pgended\})+\{\pid\mapsto(\tk',s,\pgorig)\}}
  {(s,v,M,P,\sbv,Q,H)\step{\effa}(s,v,M,P',\sbv,Q,H)}

Tests (5)

Discussions

Discuss this rule·Search the discussions on GitHub

Discussions are on GitHub; one about this rule has [r:p-proc-kill] 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.