Index-based method for supporting multimethod function overloading with
compile-time type checking and run-time dispatch
    1.
    发明授权
    Index-based method for supporting multimethod function overloading with compile-time type checking and run-time dispatch 失效
    基于索引的方法,支持使用编译时类型检查和运行时调度的多方法函数重载

    公开(公告)号:US5696973A

    公开(公告)日:1997-12-09

    申请号:US390886

    申请日:1995-02-17

    IPC分类号: G06F9/42 G06F9/45

    CPC分类号: G06F8/437 G06F9/4431

    摘要: Programming language systems commonly allow for the use of function calls within a body of program source code. Since function names are generally descriptive, it is sometimes the case that two different functions ("function instances") will have the same name, and be distinguishable by having either a different number of arguments ("arity"), or arguments of different types. Both at compile time and at run time, the possibility of error exists if there is a mismatch between the arguments required by a function and the arguments provided to the function by the function call. Methods and related apparatus, for use in programming language systems, are set forth which support compile-time type checking and run-time dispatch for overloaded functions in an environment supporting subtypes with multiple inheritance. At both compile time and run time, the method of the invention takes into consideration the types of all arguments of a function call, to select a proper function instance to execute, for a given function invocation. In accordance with the invention, a precedence ordering is made from among multiple function instances having the same name and arity. Furthermore, the methods contemplated by the invention identify at compile time the set of function instances which might be invoked due to subtype substitutions for the actual arguments. Since type errors on function invocations or variable assignments are usually indicative of a programming error, program reliability can be improved and faults that would otherwise result in run-time errors can be corrected through the use of the invention prior to program deployment.

    摘要翻译: 编程语言系统通常允许在程序源代码体内使用函数调用。 由于函数名通常是描述性的,有时两种不同的函数(“函数实例”)将具有相同的名称,并且可以通过使用不同数量的参数(“arity”)或不同类型的参数来区分 。 在编译时和运行时,如果函数所需的参数与通过函数调用提供给函数的参数之间存在不匹配,则存在错误的可能性。 阐述了在编程语言系统中使用的方法和相关设备,其支持在支持具有多重继承的子类型的环境中的重载函数的编译时类型检查和运行时调度。 在编译时和运行时,本发明的方法考虑到函数调用的所有参数的类型,以便为给定的函数调用选择要执行的正确的函数实例。 根据本发明,从具有相同名称和特征的多个功能实例中进行优先级排序。 此外,本发明考虑的方法在编译时识别由于实际参数的子类型替换而可能调用的一组函数实例。 由于功能调用或变量分配上的类型错误通常表示编程错误,因此程序可靠性可以提高,否则会导致运行时错误的故障可以在程序部署之前通过使用本发明来纠正。

    Database management system, method and program for supporting the
mutation of a composite object without read/write and write/write
conflicts
    2.
    发明授权
    Database management system, method and program for supporting the mutation of a composite object without read/write and write/write conflicts 失效
    数据库管理系统,支持复制对象突变的方法和程序,无需读/写和写/写冲突

    公开(公告)号:US5857182A

    公开(公告)日:1999-01-05

    申请号:US786605

    申请日:1997-01-21

    IPC分类号: G06F17/30

    摘要: The system, method, and program of this invention avoids potential write/write conflicts and read/write conflicts when a subcomponent of a composite object (e.g., an ADT) is mutated. The embodiments of this invention define a copy semantic for the mutation function. In one embodiment, a copy function is inserted prior to any mutation function. In a another embodiment, a global compile-time analysis is performed to determine if a write/write or read/write conflict exists; and to eliminate redundant copy constructors if a conflict does exist. In a preferred embodiment, only a local analysis is performed during the parsing phase, thereby avoiding a global compile-time analysis. A mutation safe flag is associated with each parse tree node. A read target leaf parse tree node is set to false while non-leaf parse tree nodes (functions) derive their value from an incoming node, except that constructors and copy constructor functions are always true. Whether or not a copy is made of the composite object (i.e., whether or not a copy constructor is inserted) prior to a mutation is determined according to the setting of the mutation safe flags and according to the following. If a mutation safe flag for a mutation function is false, a copy constructor is inserted for the mutated composite object and the mutation safe flag is set to true. In addition, for update and trigger statements, the mutation safe flag for a mutated target is defaulted to true. Furthermore, related update entries are grouped together and a copy is generated for the common target. The generated copy is used as the common target for all of the mutations caused by the update entries grouped together in order to accumulate all of the desired mutations in a same copy of the composite object.

    摘要翻译: 本发明的系统,方法和程序在复合对象(例如,ADT)的子组件被突变时避免潜在的写入/写入冲突和读/写冲突。 本发明的实施例定义了突变功能的复制语义。 在一个实施例中,在任何突变功能之前插入复制功能。 在另一实施例中,执行全局编译时分析以确定是否存在写/写或读/写冲突; 并且如果存在冲突,则消除冗余的拷贝构造函数。 在优选实施例中,在解析阶段仅执行局部分析,从而避免了全局编译时分析。 突变安全标志与每个解析树节点相关联。 读取目标叶解析树节点设置为false,而非叶解析树节点(函数)从传入节点导出其值,除了构造函数和复制构造函数始终为真。 根据突变安全标志的设置,根据以下来确定复制对象(即,是否插入复制构造函数)之前的副本是否被复制。 如果突变功能的突变安全标志为假,则为突变复合对象插入复制构造函数,并将突变安全标志设置为true。 另外,对于更新和触发语句,突变目标的突变安全标志默认为true。 此外,将相关的更新条目分组在一起,并为共同目标生成副本。 生成的拷贝被用作由更新条目组合在一起引起的所有突变的共同目标,以便累积复合对象的相同副本中的所有期望的突变。