摘要:
In general, in one aspect, the invention relates to a method for integrating dimensional analysis in a program comprising defining a specific dimension class within the program, wherein the specific dimension class is an instance of the dimension meta-class, defining an instantiation of a unit class within the program, wherein the instantiation of the unit class comprises the specific dimension class as a type parameter associated with the instantiation of the unit class, defining a method within the program using the instantiation of the unit class and the specific dimension class, and compiling the program to generate an executable code corresponding to the program, wherein the program is written in an object-oriented language.
摘要:
The disclosed embodiments provide a system that facilitates the development and execution of a software program. During runtime of the software program, the system obtains a function call associated with an overloaded function and a generic type hierarchy that lacks contravariance. Next, the system determines an applicability of an implementation of the overloaded function to the function call. Finally, the system selects the implementation for invocation by the function call based on the determined applicability and a partial order of implementations for the overloaded function.
摘要:
The disclosed embodiments provide a system that facilitates the development and execution of a software program. During runtime of the software program, the system obtains a function call associated with an overloaded function and a generic type hierarchy that lacks contravariance. Next, the system determines an applicability of an implementation of the overloaded function to the function call. Finally, the system selects the implementation for invocation by the function call based on the determined applicability and a partial order of implementations for the overloaded function.
摘要:
The disclosed embodiments provide a system that facilitates the development and execution of a software program. During runtime of the software program, the system obtains a function call associated with an overloaded function and a generic type hierarchy. Next, the system determines an applicability of an implementation of the overloaded function to the function call. Finally, the system selects the implementation for invocation by the function call based on the determined applicability and a partial order of implementations for the overloaded function.
摘要:
The disclosed embodiments provide a system that facilitates the development and execution of a software program. During runtime of the software program, the system obtains a function call associated with an overloaded function and a generic type hierarchy. Next, the system determines an applicability of an implementation of the overloaded function to the function call. Finally, the system selects the implementation for invocation by the function call based on the determined applicability and a partial order of implementations for the overloaded function.
摘要:
A system for managing transactions, including a first reference cell associated with a starting value for a first variable, a first thread having an outer atomic transaction including a first instruction to write a first value to the first variable, a second thread, executing in parallel with the first thread, having an inner atomic transaction including a second instruction to write a second value to the first variable, where the inner atomic transaction is nested within the outer atomic transaction, a first value node created by the outer atomic transaction and storing the first value in response to execution of the first instruction, and a second value node created by the inner atomic transaction, storing the second value in response to execution of the second instruction, and having a previous node pointer referencing the first value node.
摘要:
A system for managing transactions, including a first reference cell associated with a starting value for a first variable, a first thread having an outer atomic transaction including a first instruction to write a first value to the first variable, a second thread, executing in parallel with the first thread, having an inner atomic transaction including a second instruction to write a second value to the first variable, where the inner atomic transaction is nested within the outer atomic transaction, a first value node created by the outer atomic transaction and storing the first value in response to execution of the first instruction, and a second value node created by the inner atomic transaction, storing the second value in response to execution of the second instruction, and having a previous node pointer referencing the first value node.
摘要:
A set of structures and techniques are described herein whereby an exemplary concurrent shared object, namely a shared skip list, can be implemented in a lock-free manner. Indeed, we have developed a number of interesting variants of a lock-free shared skip-list, including variants that may be employed to provide a lock-free shared dictionary. In some variants, a key-value dictionary is implemented.
摘要:
A methodology has been discovered for transforming garbage collection-dependent algorithms, shared object implementations and/or concurrent software mechanisms into a form that does not presume the existence of an independent, or execution environment provided, garbage collector. Algorithms, shared object implementations and/or mechanisms designed or transformed using techniques described herein provide explicit reclamation of storage using lock-free pointer operations. Transformations can be applied to lock-free algorithms and shared object implementations and preserve lock-freedom of such algorithms and implementations. As a result, existing and future lock-free algorithms and shared object implementations that depend on a garbage-collected execution environment can be exploited in environments that do not provide garbage collection. Furthermore, algorithms and shared object implementations that employ explicit reclamation of storage using lock-free pointer operations such as described herein may be employed in the implementation of a garbage collector itself.
摘要:
One embodiment of the present invention provides a system for generating executable code. During operation, the system receives source code, wherein the source code can include declarations for types and operations, wherein the type declarations may be parameterized, and wherein the source code may specify subtyping relationships between declared types. Next, the system compiles or interprets the source code to produce executable code, wherein the type parameters may be instantiated by different types during execution, and wherein the result of executing operations may depend upon the instantiations of the type parameters. While compiling or interpreting the source code, the system checks the types and operations in the source code to ensure that the executable code generated is type-safe, and hence will not generate type errors during execution.