- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
,, ,, ,, ,, ,, ,, Using Views to Implement Datalog Programs Inverse Rules Duschka’s Algorithm Inverting Rules Idea: “invert” the view definitions to give the global predicates definitions in terms of views and function symbols. Plug the globals’ definitions into the body of the query to get a direct expansion of the query into views. Even works when the query is a program. Inverting Rules --- (2) But the query may have function symbols in its solution, and these symbols actually have no meaning. We therefore need to get rid of them. Trick comes from Huyn - Qian - Duschka. Skolem Functions Logical trick for getting rid of existentially quantified variables. In terms of safe Datalog rules: For each local (nondistinguished) variable X, pick a new function symbol f (the Skolem constant). Replace X by f (head variables). Example v(X,Y) :- p(X,Z) p(Z,Y) Replace Z by f(X,Y) to get: v(X,Y) :- p(X,f(X,Y)) p(f(X,Y),Y) Intuition: for v(X,Y) to be true, there must be some value, depending on X and Y, that makes the above body true. HQD Rule Inversion Replace a Skolemized view definition by rules with: A subgoal as the head, and The view itself as the only subgoal of the body. Example v(X,Y) :- p(X,f(X,Y)) p(f(X,Y),Y) becomes: p(X,f(X,Y)) :- v(X,Y) p(f(X,Y),Y) :- v(X,Y) Running Example: Maternal Ancestors Global predicates: m(X,Y) = “Y is the mother of X.” f(X,Y) = “Y is the father of X.” manc rules: r1: manc(X,Y) :- m(X,Y) r2: manc(X,Y) :- f(X,Z) manc(Z,Y) r3: manc(X,Y) :- m(X,Z) manc(Z,Y) Example --- Continued The views: v1(X,Y) :- f(X,Z) m(Z,Y) v2(X,Y) :- m(X,Y) Inverse rules: r4: f(X,g(X,Y)) :- v1(X,Y) r5: m(g(X,Y),Y) :- v1(X,Y) r6: m(X,Y) :- v2(X,Y) Evaluating the Rules Treat views as EDB. Apply semina?ve evaluation to query (Datalog program). In general, function symbols - no convergence. Evaluating the Rules But here, all function symbols are in the heads of global predicates. These are like EDB as far as the query is concerned, so no nested function
您可能关注的文档
- The First Lessonforthe O C E Class培训课件.ppt
- The First Periodof Unit1, S E F C I培训课件.ppt
- The Game Development Process培训课件.ppt
- The Hydropower Integrated Automation System培训课件.ppt
- The Interactive Data Language交互式数据语言培训课件.ppt
- The Internet Protocol培训课件.ppt
- The Internetas Channel培训课件.ppt
- The Internetwillcreatenewwinnersandburythelaggards培训课件.ppt
- The Learning Review Table( L R T)培训课件.ppt
- The Model Checker S P I N培训课件.ppt
- Using-a-best-fit-regression-model-to-estimate-viscosity-of-培训课件.ppt
- Using-optics-to-scale- Internet- Routers- Computer- Forum,- May-培训课件.ppt
- V- C60- I- D- E的使用和程序调试技巧培训课件.ppt
- V- E- E- G阅图操作界面标识培训课件.ppt
- V- P-+-去-与-去-+- V- P格式培训课件.ppt
- V- T- K-&- Para- View培训课件.ppt
- V-star会员账户及激活码获取手册培训课件.ppt
- Verifying- Concurrent- Message-- Passing- C- Programs-with-培训课件.ppt
- Verilog- H- D- L- Overview培训课件.ppt
- Verilog- H- D- L语言初步培训课件.ppt
文档评论(0)