What is Pyke?

Pyke integrates a form of Logic Programming into Python by providing a knowledge engine that can:

    * Do both forward-chaining (data driven) and backward-chaining (goal directed) inferencing.
          o Pyke may be embedded into any Python program.
    * Automatically generate Python programs by assembling individual Python functions into complete call graphs.
          o This is done through a unique design where the individual Python functions are attached to backward-chaining rules.
          o Unlike other approaches to code reuse (e.g. Object-oriented programming, Zope adapters, generic functions), this allows the inference engine to ensure that all of the function's requirements are completely satisfied, by examining the entire call graph down to the leaves, before any of the functions are executed.
          o This is an optional feature. You don't need to use it if you just want the inferencing capability by itself.

 

Pyke提供一个知识引擎将一种逻辑编程语言整合进Python中:

  • 作前向链接(数据驱动的)和后向链接(指定目标)的推理。Pyke可以潜入到所有的Python程序中。
  • 将单独的Python功能组合成完整的调用图,可以自动生成Python程序。

              *通过一个专门的设计将单独的Python功能关联到后向链接规则中。

              *不同于其他代码重用的方式(例如面向对象编程,Zope适配器,通用函数)。Pyke允许推理机通过在执行功能前检查整个调用图直到叶节点,来确保所有的功能需求是完全合适的。

              *这是一个可选特性。如果你只想要它的推理能力,你不需要一定使用它


The Knowledge Engine Supports:

    * Multiple fact bases, each with its own list of facts.
    * Both forward-chaining rules and backward-chaining rules.
    * Multiple rule bases, each with its own list of forward-chaining and/or backward-chaining rules.
    * Rule base inheritance -- activating the derived rule base includes the rules from the parent rule base.
    * The inference rules are compiled into Python functions, allowing Python code snippets to be used within the rules. This greatly enhances the expressiveness of the rules.

 

知识引擎支持:

  • 多种事实基准,它自身的事实列表
  • 前向链接规则和后向链接规则
  • 多种规则基准,自身的前向 和/或 后向规则列表
  • 规则基准继承-产生一个包含父规则基准所有规则的继承规则基准
  • 推理规则编译到Python函数中,允许在规则中使用Python代码。这大大增强了规则的表现能力。

 


Automatic Program Generation:

    * Calls the generated Python programs plans.
    * Plans may be run multiple times without needing to rerun the inference rules.
    * Plans may be pickled and cached to disk to be used by other programs or in later runs of the same program.
    * Only one small Pyke module is required to run the plans.

 

程序自动生成:

  • 调用生成的Python程序方案
  • 无须再次执行推理规则,方案可以执行多次
  • 方案可以包装并存储到硬盘上以供其他程序或者本身之后使用
  • 仅需要一个小的Pyke模块运行这个方案


Potential Pyke Applications:

    * Complicated decision making applications.
    * The back-end (code generation and optimization) of compilers. Pyke is used as the back-end of its own compiler that translates rules into Python code.
    * Automatic SQL statement generation.
    * Automatic HTML generation and automatic HTML template processing.
    * Automatic program builder to reuse a common set of functions for many different specific situations. This could also easily incorporate a new custom function into a much larger program, where the use of the custom function might influence the choice of other standard functions in other parts of the program.
    * The control module for a web framework tool.
    * A high-level planner to automatically distribute the modules of a large system over several computers in a distributed system to meet specific performance and capacity goals. This could be used to automatically scale the same system code from a small one program, one computer system to much larger distributed systems to meet a wide range of performance goals.
    * Diagnosis systems, including automated customer service systems.
    * Program or library customization for specific uses.
    * In addition to being able to build programs, Pyke can instantiate, configure and interconnect a network of objects to meet a specific need or situation.

 

Pyke可能的应用:

  • 形成应用时的复杂判定
  • 编译器后端(代码生成和最优化)。Pyek用在它自身编译器的后端将规则翻译成Python代码。
  • SQL语句自动生成。
  • HTML自动生成,HTML模板自动处理。
  • 对于多种不同情况时重用公共部分功能的自动程序建立。这也很容易将一个新的自定义功能加入到非常大的程序中,即使这个函数会影响到程序其他功能的选择。
  • web框架的控制模块。
  • 一个高等级的规划者,可以自动根据性能和容量指标将分布式系统中大程序的模块分配和其他计算机。这也可以用来从一个小程序中自动衡量相同的系统代码,对于巨大的分布式系统一个单独的计算机系统如何确定性能指标。
  • 诊断系统,包括自动化客户服务系统。
  • 对于特定使用的程序和库的自定制。
  • 除了建立程序,Pyke还可以实例化,配置和连接目标网络来确定特定的需求和情况。

-----------------

硬是没看懂……

你可能感兴趣的:(sql,编程,python,网络应用,performance)