在巴科斯-诺尔范式中,逗号 ',' 的作用是什么?定义符号时的意思
我对 Pi 微积分和巴科斯诺尔范数都是新手。 这是 Pi 微积分的核心 BNF 之一(可在 Peter Sewell 的“Applied Pi - A Brief Tutorial”中找到)
P,Q ::= 0 nil
P | Q parallel composition of P and Q
~cv output v on channel c
cw.P input from channel c
new c in P new channel name creation
事实上,我专注于学习 Pi 微积分。但我确实想知道 BNF 定义中 P,Q ::= 的含义。
我会理解 P ::= 意味着 Pi 演算的过程 P 是这个或这个或这个。 但是 P,Q ::= 代表什么?
I am as much newbie to Pi-Calculus as I am with Backus Naur Form.
Here is one of the core BNF for Pi Calculus ( found in "Applied Pi - A Brief Tutorial" by Peter Sewell)
P,Q ::= 0 nil
P | Q parallel composition of P and Q
~cv output v on channel c
cw.P input from channel c
new c in P new channel name creation
In deed I am focussed on learning Pi Calculus. But I do wonder about the meaning of P,Q ::= in the definition of the BNF.
I would understand P ::= meaning that a process P of Pi calculus is this or this or this.
But what P,Q ::= stands for ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在这里,这意味着字母
P
和Q
都用来表示进程。例如,在P | Q
、P
是一个进程,Q
是一个进程。作者本来可以写,但更愿意允许两个不同的字母引用相同的概念,以使公式更具可读性。
顺便说一下,传统上,BNF 中的替代方案是用竖线分隔的;但由于竖线
|
在 pi 演算中具有含义,因此作者不想同时使用它们的 pi 演算含义和 BNF 含义。该定义仍应解读为“进程要么为零,要么并行组合,要么……”。Here, this means that the letters
P
andQ
are both used to denote processes. For example, inP | Q
,P
is a process andQ
is a process. The author could have writtenbut preferred to allow two distinct letters to refer to the same concept in order to make formulas a bit more readable.
By the way, classically the alternatives in BNF are separated by a vertical bar; but since the vertical bar
|
has a meaning in pi-calculus, the author didn't want to use them both in their pi-calculus meaning and in their BNF meaning. The definition should still be read as “a process is either nil, or a parallel composition, or …”.