osprey是什么牌子| 阑尾炎输液输什么药| 慢性胃炎和浅表性胃炎有什么区别| 鸡的祖先是什么| 月经为什么推迟不来| 天门冬氨酸氨基转移酶是什么| 男人肾虚吃什么补得快| 孕妇梦见自己出轨是什么意思| 母亲节送妈妈什么礼物好| 传媒公司主要做什么| 七月一日是什么节日| 赛脸什么意思| 国家专项是什么意思| 4a广告公司什么意思| 甲状腺有血流信号是什么意思| 什么是形声字| 什么菜降血压效果最好| 梦见抓鸟是什么征兆| 银耳是什么| 天仙配是什么剧种| 皮肤发黄什么原因| 睡醒后腰疼是什么原因| pr医学上是什么意思| 右肺疼是什么原因| 粽子叶子是什么叶子| 工科和理科有什么区别| 9月19是什么星座| 绿字五行属什么| 陈皮的作用是什么| 脾胃气虚吃什么中成药| 什么叫三焦| 太阳为什么能一直燃烧| 香草是什么植物| 老公护着婆婆说明什么| 渡船是什么意思| 明天是什么节日| 舅舅的舅舅叫什么| 口干咽干是什么原因| 什么是象限| 申遗是什么意思| 三点水一个分读什么| 虎毒不食子什么意思| 回族信仰什么教| 三轮体空什么意思| 阳虚湿热吃什么中成药| 1995属什么生肖| 茶学专业学什么| 隔离霜是干什么用的| 7月去青海带什么衣服| 7.1是什么星座| 女人太瘦吃什么增肥| 近亲是什么意思| 脊髓灰质炎是什么病| 两融是什么意思| 尿为什么是黄色的| 例假提前半个月是什么原因造成的| 四维是检查什么| 马粟是什么| 维生素b是什么食物| 香港脚是什么| 女人喝甘草水有什么好处| 名号是什么意思| 内痔疮吃什么药最好| 鸡胗是什么器官| minute什么意思| 狗肉配什么菜好吃| 半硬半软是什么症状| 快照是什么意思| 不孕不育都检查什么项目| 不经历风雨怎能见彩虹是什么意思| 孕妇吃葡萄对胎儿有什么好处| 打火机的气体是什么| 肾病吃什么水果好| dr检查是什么意思| 什么是晶体| 抗生素药对人体有什么危害| 床上为什么会有跳蚤| 战国时期是什么时候| 古井贡酒属于什么档次| 蛇为什么有毒| 精子是什么味道| 藏医最擅长治什么病| 有因必有果什么意思| 纤维蛋白原是什么意思| 睡不着吃什么药最有效| 胃不舒服想吐是什么原因| 多喝白开水有什么好处| 虹膜是什么意思| 青鹏软膏主要治疗什么| 脚趾第二个比第一个长有什么说法| 什么叫前庭功能| 马华念什么| 女性尿路感染吃什么药好得快| 人大常委会副主任是什么级别| lgg什么意思| 中医内科主要看什么| 整体认读音节有什么| 姨妈期能吃什么水果| 山竹里面黄黄的是什么可以吃吗| 拉仇恨是什么意思| 骨髓增生活跃是什么意思| 性早熟是什么意思| 车水马龙是什么生肖| 太阳绕着什么转| 色字头上一把刀什么意思| 冬至节气的含义是什么| 尿潜血弱阳性是什么意思| lp是什么| 双向情感障碍是什么病| 无期是什么意思| 囡是什么意思| 湖北有什么好玩的| 大侠是什么意思| 咳嗽一直不好是什么原因怎么治| 苡是什么意思| 嘴巴苦吃什么药| 七月份可以种什么菜| mango是什么意思| 什么是抗生素类药物| 尉迟恭是什么生肖| 玻璃什么时候传入中国| 怀孕前三个月需要注意什么| 三点水加个有字念什么| 脸跳动是什么原因| 50岁女人出轨为了什么| 浮木是什么意思| etf什么意思| 脾虚胃热吃什么中成药| 20岁长白头发是什么原因造成的| 什么时候测试怀孕最准确的| 梦到绿色的蛇是什么意思| 脑梗吃什么东西好| 虹膜是什么意思| 取关是什么意思| 妇科衣原体是什么病| 马中赤兔人中吕布什么意思| 彩排是什么意思| 什么的遐想| mirage轮胎什么牌子| 肥肠炒什么菜好吃| 农历12月是什么月| 夏天喝什么茶比较好| 80年出生属什么生肖| 头疼头胀是什么原因| 三月有什么节日| 22点是什么时辰| 翡翠属于什么五行| 喜欢花的女人是什么性格| 14年是什么年| 水晶为什么要消磁| 蝴蝶是什么意思| 冲床工是做什么的| 脚底褪皮是什么原因| 植物奶油是什么做的| 科学的尽头是什么| 西米露是什么做的| 农历10月19日是什么星座| 男孩学什么专业有前途| 什么回忆| 山代表什么生肖| 书犹药也下一句是什么| 幽默是什么意思| 妈妈吃什么帮宝宝排气| 什么人容易怀葡萄胎| 央行放水是什么意思| 依达拉奉注射功效与作用是什么| 死鬼是什么意思| 牛筋草用什么除草剂| 水晶和玻璃有什么区别| dha什么时候吃效果最好| 殁年是什么意思| 低压是什么意思| 探病是什么意思| 类风湿有什么特效药| 肝不好吃什么药效果好| 甲醛中毒吃什么药| 你要干什么| 无私是什么意思| 肺部钙化灶是什么意思| 什么是包茎| 凿壁偷光形容什么| 不成功便成仁的仁是什么意思| 绿豆汤为什么是红色的| 重楼的别名叫什么| 96年什么命| 风寒感冒喉咙痛吃什么药| 雀舌属于什么茶| 放屁特别臭是什么原因| 胃疼是什么感觉| 火可以加什么偏旁| 吃什么容易长胖| 主动脉弓钙化什么意思| 天秤座是什么性格| 仙风道骨指什么生肖| 什么是用户名| 北京晚上有什么好玩的景点| 瘆人是什么意思| 为什么会得梅毒| 回苏灵又叫什么| 十指不沾阳春水是什么意思| 1975年五行属什么| 什么东西补肾最好| 空气炸锅什么牌子好| izzue是什么牌子| 熊猫为什么会成为国宝| 才美不外见的见是什么意思| baumwolle是什么面料| 有什么书| 地主之谊是什么意思| 眼睛下面有痣代表什么| 做激光近视眼手术有什么危害| 绝望的绝是什么意思| 培根是什么肉做的| 双肾盂分离是什么意思| 眼睛充血是什么原因造成的| 什么姿势睡觉最好| 纸是什么生肖| 唔该是什么意思| 花哨是什么意思| 经理是什么级别| 孩子为什么不愿意上学| 唇炎用什么药| 脾胃不好吃什么食物可以调理| 流金铄石是什么意思| 低血糖要吃什么| dan什么意思| 强劲的动物是什么生肖| m什么单位| 鳞状上皮炎症反应性改变是什么意思| 被蟑螂咬了擦什么药| 胃炎吃什么好| 杨的右边念什么| 1月24日什么星座| 天蝎座什么象星座| 被动什么意思| cpc什么意思| 刮脸有什么好处与坏处| 左甲状腺是什么病| 白细胞低是什么意思| 知性是什么意思| 恶寒什么意思| 三道杠是什么牌子| 陈皮是什么皮做的| 心电图窦性心动过速是什么意思| 电饼铛什么牌子好| 包皮手术是什么| 女人吃桃子有什么好处和坏处| 芦荟胶有什么作用| 双子座是什么星座| 高碱性食物都有什么| 1月22号什么星座| 过度换气是什么意思| 老年阴道炎用什么药| 蜻蜓点水是什么行为| 低密度脂蛋白偏高什么意思| 全会是什么意思| 痔疮有什么特征| qq2g在线是什么意思| 感冒吃什么| 人为什么会长痣| 粉盒和硒鼓有什么区别| 俄罗斯人是什么人种| 猪肝补什么功效与作用| tmd什么意思| 百度Jump to content

车讯:2种配置 广汽传祺GA3S PHEV将于7月上市

From Wikipedia, the free encyclopedia
百度 张大千常以画论吃,以吃论画。

In theoretical computer science and formal language theory, a regular tree grammar is a formal grammar that describes a set of directed trees, or terms.[1] A regular word grammar can be seen as a special kind of regular tree grammar, describing a set of single-path trees.

Definition

[edit]

A regular tree grammar G is defined by the tuple G = (N, Σ, Z, P), where:

  • N is a finite set of nonterminals,
  • Σ is a ranked alphabet (i.e., an alphabet whose symbols have an associated arity) disjoint from N,
  • Z is the starting nonterminal, with ZN, and
  • P is a finite set of productions of the form At, with AN, and tTΣ(N), where TΣ(N) is the associated term algebra, i.e. the set of all trees composed from symbols in Σ ∪ N according to their arities, where nonterminals are considered nullary.

Derivation of trees

[edit]

The grammar G implicitly defines a set of trees: any tree that can be derived from Z using the rule set P is said to be described by G. This set of trees is known as the language of G. Formally, the relation ?G on the set TΣ(N) is defined as follows:

A tree t1TΣ(N) can be derived in a single step into a tree t2TΣ(N) (in short: t1 ?G t2), if there is a context S and a production (At) ∈ P such that:

  • t1 = S[A], and
  • t2 = S[t].

Here, a context means a tree with exactly one hole in it; if S is such a context, S[t] denotes the result of filling the tree t into the hole of S.

The tree language generated by G is the language L(G) = { tTΣ | Z ?G* t }.

Here, TΣ denotes the set of all trees composed from symbols of Σ, while ?G* denotes successive applications of ?G.

A language generated by some regular tree grammar is called a regular tree language.

Examples

[edit]
Example derivation tree from G1 in linear (upper left table) and graphical (main picture) notation

Let G1 = (N11,Z1,P1), where

  • N1 = {Bool, BList } is our set of nonterminals,
  • Σ1 = { true, false, nil, cons(.,.) } is our ranked alphabet, arities indicated by dummy arguments (i.e. the symbol cons has arity 2),
  • Z1 = BList is our starting nonterminal, and
  • the set P1 consists of the following productions:
    • Boolfalse
    • Booltrue
    • BListnil
    • BListcons(Bool,BList)

An example derivation from the grammar G1 is

BList ? cons(Bool,BList) ? cons(false,cons(Bool,BList)) ? cons(false,cons(true,nil)).

The image shows the corresponding derivation tree; it is a tree of trees (main picture), whereas a derivation tree in word grammars is a tree of strings (upper left table).

The tree language generated by G1 is the set of all finite lists of boolean values, that is, L(G1) happens to equal TΣ1. The grammar G1 corresponds to the algebraic data type declarations (in the Standard ML programming language):

datatype Bool
  = false
  | true
datatype BList
  = nil
  | cons of Bool * BList

Every member of L(G1) corresponds to a Standard-ML value of type BList.

For another example, let G2 = (N1, Σ1, BList1, P1P2), using the nonterminal set and the alphabet from above, but extending the production set by P2, consisting of the following productions:

  • BList1cons(true,BList)
  • BList1cons(false,BList1)

The language L(G2) is the set of all finite lists of boolean values that contain true at least once. The set L(G2) has no datatype counterpart in Standard ML, nor in any other functional language. It is a proper subset of L(G1). The above example term happens to be in L(G2), too, as the following derivation shows:

BList1 ? cons(false,BList1) ? cons(false,cons(true,BList)) ? cons(false,cons(true,nil)).

Language properties

[edit]

If L1, L2 both are regular tree languages, then the tree sets L1L2, L1L2, and L1 \ L2 are also regular tree languages, and it is decidable whether L1 ? L2, and whether L1 = L2.

Alternative characterizations and relation to other formal languages

[edit]

Applications

[edit]

Applications of regular tree grammars include:

See also

[edit]

References

[edit]
  1. ^ "Regular tree grammars as a formalism for scope underspecification". CiteSeerX 10.1.1.164.5484.
  2. ^ Comon, Hubert; Dauchet, Max; Gilleron, Remi; L?ding, Christof; Jacquemard, Florent; Lugiez, Denis; Tison, Sophie; Tommasi, Marc (12 October 2007). "Tree Automata Techniques and Applications". Retrieved 25 January 2016.
  3. ^ Alur, R.; Madhusudan, P. (2004). "Visibly pushdown languages" (PDF). Proceedings of the thirty-sixth annual ACM symposium on Theory of computing - STOC '04. pp. 202–211. doi:10.1145/1007352.1007390. ISBN 978-1581138528. S2CID 7473479. Sect.4, Theorem 5,
  4. ^ Alur, R.; Madhusudan, P. (2009). "Adding nesting structure to words" (PDF). Journal of the ACM. 56 (3): 1–43. CiteSeerX 10.1.1.145.9971. doi:10.1145/1516512.1516518. S2CID 768006. Sect.7
  5. ^ Emmelmann, Helmut (1991). "Code Selection by Regularly Controlled Term Rewriting". Code Generation - Concepts, Tools, Techniques. Workshops in Computing. Springer. pp. 3–29.
  6. ^ Comon, Hubert (1990). "Equational Formulas in Order-Sorted Algebras". Proc. ICALP.
  7. ^ Gilleron, R.; Tison, S.; Tommasi, M. (1993). "Solving Systems of Set Constraints using Tree Automata". 10th Annual Symposium on Theoretical Aspects of Computer Science. LNCS. Vol. 665. Springer. pp. 505–514.
  8. ^ Burghardt, Jochen (2002). "Axiomatization of Finite Algebras". Advances in Artificial Intelligence. LNAI. Vol. 2479. Springer. pp. 222–234. arXiv:1403.7347. Bibcode:2014arXiv1403.7347B. ISBN 3-540-44185-9.
  9. ^ Ziv-Ukelson, Smoly (2016). Algorithms for Regular Tree Grammar Network Search and Their Application to Mining Human–viral Infection Patterns. J. of Comp. Bio. [1]

Further reading

[edit]
  • Regular tree grammars were already described in 1968 by:
  • A book devoted to tree grammars is: Nivat, Maurice; Podelski, Andreas (1992). Tree Automata and Languages. Studies in Computer Science and Artificial Intelligence. Vol. 10. North-Holland.
  • Algorithms on regular tree grammars are discussed from an efficiency-oriented view in: Aiken, A.; Murphy, B. (1991). "Implementing Regular Tree Expressions". ACM Conference on Functional Programming Languages and Computer Architecture. pp. 427–447. CiteSeerX 10.1.1.39.3766.
  • Given a mapping from trees to weights, Donald Knuth's generalization of Dijkstra's shortest-path algorithm can be applied to a regular tree grammar to compute for each nonterminal the minimum weight of a derivable tree. Based on this information, it is straightforward to enumerate its language in increasing weight order. In particular, any nonterminal with infinite minimum weight produces the empty language. See: Knuth, D.E. (1977). "A Generalization of Dijkstra's Algorithm". Information Processing Letters. 6 (1): 1–5. doi:10.1016/0020-0190(77)90002-3.
  • Regular tree automata have been generalized to admit equality tests between sibling nodes in trees. See: Bogaert, B.; Tison, Sophie (1992). "Equality and Disequality Constraints on Direct Subterms in Tree Automata". Proc. 9th STACS. LNCS. Vol. 577. Springer. pp. 161–172.
  • Allowing equality tests between deeper nodes leads to undecidability. See: Tommasi, M. (1991). Automates d'Arbres avec Tests d'égalités entre Cousins Germains. LIFL-IT.
生肖猪和什么生肖最配 文化大革命什么时候 秦五行属什么 黄疸是什么病 吃什么有助于睡眠
鱼腥草有什么作用 手上长汗疱疹用什么药 最大的哺乳动物是什么 胸胀是什么原因 什么时候立夏
眼白有黄斑是什么原因 日本古代叫什么 端午节应该吃什么 生冷辛辣指的是什么 什么水果含铁
匪夷所思是什么意思 为什么喝绞股蓝会死亡 政五行属什么 今天什么生肖最旺 刚生完宝宝的产妇吃什么好
鸡胗是鸡的什么部位hcv8jop4ns2r.cn 吃芒果有什么好处和坏处naasee.com gucci什么品牌hcv7jop6ns6r.cn 侧颜杀是什么意思hcv9jop4ns4r.cn 脱臼是什么感觉hcv7jop4ns8r.cn
直肠炎吃什么药最好hcv8jop7ns4r.cn 状物是什么意思hcv8jop4ns7r.cn 专家是什么意思hcv9jop5ns0r.cn 合寿木是什么意思hcv7jop4ns6r.cn 什么动物吃蚊子hcv9jop5ns8r.cn
月子早餐吃什么好bfb118.com 1944年属什么生肖hcv7jop6ns8r.cn 脉弦滑是什么意思hcv9jop5ns2r.cn 蜂窝网络是什么hcv8jop6ns0r.cn 白居易被称为什么gangsutong.com
武则天代表什么生肖hcv9jop8ns3r.cn 白头翁幼鸟吃什么hcv9jop5ns4r.cn 头晕头重昏昏沉沉是什么原因hcv8jop3ns3r.cn 每晚都做梦是什么原因hcv7jop6ns0r.cn 肾钙化是什么意思mmeoe.com
百度