首页> 外国专利> Method and apparatus for automatically determining optimum placement of privileged code locations in existing code

Method and apparatus for automatically determining optimum placement of privileged code locations in existing code

机译:自动确定现有代码中特权代码位置的最佳位置的方法和装置

摘要

A method and apparatus for automatically determining optimum placement of privileged code enablement locations in existing code are provided. With the apparatus and method, a method invocation graph of existing code is generated and a static analysis of the method invocation graph is performed. The static analysis is used to analyze the permission propagation through chains of method invocations in the method invocation graph. When a method invocation in the method invocation graph satisfies one or more user definable criteria, the location in the method invocation graph is save to a file that identifies recommended insertion points for a call to the authorization enablement code. A default criteria for insertion of a call to authorization enablement is the boundary between application code and API code. Thus, if no other points in the chain of method invocations satisfies the user definable criteria for insertion of a call to privileged mode enablement, the location at which the boundary between client code and API code is identified is written to the recommended privileged code enablement location file. This file may then be used user to manually review the code to determine if a call to privileged mode enablement should actually be made at the identified locations. ;Alternatively, the call to privileged mode enablement may be automatically inserted at the indicated locations using refactoring.
机译:提供了一种用于自动确定现有代码中特权代码启用位置的最佳位置的方法和装置。利用该装置和方法,生成现有代码的方法调用图,并对该方法调用图进行静态分析。静态分析用于分析方法调用图中方法调用链中的权限传播。当方法调用图中的方法调用满足一个或多个用户可定义的条件时,方法调用图中的位置将保存到一个文件,该文件标识建议的插入点,以用于调用授权启用代码。插入对授权启用的调用的默认标准是应用程序代码和API代码之间的边界。因此,如果方法调用链中没有其他点满足用户定义的用于插入对特权模式启用的调用的标准,则将标识客户端代码和API代码之间的边界的位置写入推荐的特权代码启用位置文件。然后,该文件可用于用户手动查看代码,以确定是否应在标识的位置实际调用特权模式启用。 ;或者,可以使用重构将对特权模式启用的调用自动插入到指示的位置。

著录项

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号