An object reference is tagged with an isolation permission modifier. At least two permissions can be included, and in an example three permissions are included. In implementing the permissions, type modifiers for controlling access to type members through references pointing at an object are defined. One of the type modifiers is associated with each occurrence of a type name. Each of the of type modifiers defines a different access permission to restrict operations on the object to which the reference points.
Legal claims defining the scope of protection. Each claim is shown in both the original legal language and a plain English translation.
1. A computer readable storage medium, which is not a transitory propagating signal, storing computer executable instructions for controlling a computing device to perform a method comprising: defining a plurality of type modifiers for controlling access to type members through references pointing at an object in a shared-access memory; and associating one of the plurality of type modifiers with a type name for all concurrent occurrences of the type name, wherein each of the plurality of type modifiers defines a different access permission to restrict operations on the pointed-to object to which the reference points, the access permissions including: an immutable permission allows the pointed-to object to be shared among concurrent threads wherein changes to the pointed-to object are confined to the scope of a called function but the state of the pointed to object is statically determined not to change in a calling function; a read permission allows the pointed-to object to be shared among concurrent threads with concurrency safety for concurrent reads; a write permission does not allow the pointed-to object to be shared among concurrent threads; and defining an isolated method as the called function that obey the access permissions.
A system for managing memory access in a multi-threaded environment uses type modifiers to control access to objects in shared memory. The system defines type modifiers (immutable, read, and write) which are associated with type names. The immutable modifier allows objects to be shared between threads, with changes confined to a function's scope and no state change in the calling function. The read modifier allows concurrent reads with concurrency safety. The write modifier restricts objects to not be shared, providing exclusive access. An isolated method respects these modifiers, ensuring safe concurrent access.
2. The computer readable storage medium of claim 1 wherein the method specifies the type modifier in a context of a type.
The memory access control system from the previous description specifies the type modifiers (immutable, read, and write) within the context of a type, to control access to objects in shared memory. This means the access permission is associated with the type itself, not just individual instances. The immutable modifier allows objects to be shared between threads, with changes confined to a function's scope and no state change in the calling function. The read modifier allows concurrent reads with concurrency safety. The write modifier restricts objects to not be shared, providing exclusive access. An isolated method respects these modifiers, ensuring safe concurrent access.
3. The computer readable medium of claim 2 wherein the type modifier may appear on one of a formal parameter declaration, a local variable declaration, an instance field declaration, a static field declaration, and a generic type parameter.
In the memory access control system where type modifiers (immutable, read, and write) are specified in a context of a type, the type modifier can be applied to several declarations. The type modifier can appear on a formal parameter declaration (method argument), a local variable declaration (within a method), an instance field declaration (object member), a static field declaration (class member), or a generic type parameter. The immutable modifier allows objects to be shared between threads, with changes confined to a function's scope and no state change in the calling function. The read modifier allows concurrent reads with concurrency safety. The write modifier restricts objects to not be shared, providing exclusive access. An isolated method respects these modifiers, ensuring safe concurrent access.
4. The computer readable storage medium of claim 1 wherein an immutable reference points at objects possibly-shared between concurrent threads where state that does not change is accessed through the reference; wherein a read reference points at objects possibly-shared between concurrent threads for which there are no concurrent writes; and wherein a write reference points to an object that is one of not shared or shared but includes an exclusive access.
The memory access control system uses specific references based on the type modifiers. An immutable reference points to objects that may be shared between concurrent threads, accessing state that does not change. A read reference points to objects possibly shared between threads, where concurrent writes are not allowed. A write reference points to an object that is either not shared or is shared but with exclusive access granted. The system ensures safe concurrent access based on these reference types.
5. The computer readable storage medium of claim 4 wherein a single-assignment-value is accessed through an immutable permission.
In the memory access control system using immutable, read, and write references, a single-assignment-value (a value that is only assigned once) is accessed through an immutable permission. Since the value cannot change after its initial assignment, it is safe to share it between concurrent threads without any synchronization mechanisms. This ensures data consistency and avoids race conditions.
6. The computer readable storage medium of claim 4 wherein a read reference implies immutable access and allows reads of mutable fields.
In the memory access control system using immutable, read, and write references, a read reference implies immutable access. Read references allow reads of mutable fields, but the system still ensures concurrency safety. While the field itself might change, the read reference guarantees that any concurrent read operations will not lead to data corruption or race conditions. This could be achieved through internal locking or other synchronization mechanisms.
7. The computer readable storage medium of claim 4 wherein a write to the reference can be done with safe concurrency.
In the memory access control system using immutable, read, and write references, a write to a write reference can be done with safe concurrency. This means that even though the write reference generally implies exclusive access, the system implements mechanisms to ensure that concurrent write operations using write references are handled safely, preventing data corruption or race conditions. This might involve locking or other synchronization primitives.
8. The computer readable storage medium of claim 1 including combining the access permissions to protect an object graph with the access permission of a root reference.
The memory access control system combines the access permissions (immutable, read, write) to protect an object graph. The access permission of a root reference (the starting point of the object graph) determines the overall access level for the entire graph. This ensures that the entire object structure is protected according to the initial access permission.
9. The computer readable medium of claim 8 wherein the reference resulting from the combination will not be stronger than the weakest permission of the combination.
In the memory access control system that combines access permissions, the resulting reference from the combination will not be stronger than the weakest permission in the combination. For example, if an object graph has a root reference with "read" permission and contains a sub-object with "write" permission, the overall access permission for that sub-object, when accessed through the root reference, will be limited to "read". This prevents accidental modification of objects when accessed through a weaker permission.
10. The computer readable storage medium of claim 1 including constraining generic type parameters.
The memory access control system constrains generic type parameters using the defined access permissions (immutable, read, write). This means that when defining generic types, the system can enforce constraints on the access permissions of the type parameters. This ensures type safety and prevents operations that would violate the defined access rules.
11. A system, comprising: a computing device having a shared-access memory supporting a plurality of threads; and an imperative framework operably coupled to the computing device, where in the imperative framework includes a plurality of type modifiers configured to control access to type members through references that point at an object in the shared-access memory; wherein one of the plurality of type modifiers is associated with a type name for all occurrences of the type name; wherein each of the plurality of type modifiers defines a different access permission to restrict operations on the object to which the reference points, the access permissions including: an immutable permission allows the pointed-to object to be shared among concurrent threads wherein changes to the pointed-to object are confined to the scope of a called function but the state of the pointed to object is statically determined not to change in a calling function; a read permission allows the pointed-to object to be shared among concurrent threads with concurrency safety for concurrent reads; and a write permission does not allow the pointed-to object to be shared among concurrent threads; and wherein an isolated method is defined as the called function to obey the access permissions.
A computer system comprises a computing device with shared memory supporting multiple threads, and an imperative framework controlling access. The framework uses type modifiers (immutable, read, and write) to manage object access in shared memory. These modifiers are associated with type names. Immutable objects can be shared between threads, with changes confined to the called function and the state statically determined not to change in the calling function. Read objects are shared with concurrency-safe reads. Write objects are not shared. An isolated method adheres to these access permissions.
12. The system of claim 11 wherein an immutable reference points at objects possibly-shared between concurrent threads where state that does not change is accessed through the object; wherein a read reference points at objects possibly-shared between concurrent threads for which there are no concurrent writes; and wherein a write reference points to an object that is one of not shared or shared but includes an exclusive access.
The computer system from the previous description uses specific references based on the type modifiers. An immutable reference points to objects possibly shared between concurrent threads, where state that does not change is accessed. A read reference points to objects possibly shared between threads, where there are no concurrent writes. A write reference points to an object that is either not shared or is shared but with exclusive access.
13. The system of claim 12 wherein the immutable permission is associated with an immutable field.
In the computer system using immutable, read, and write references, the immutable permission is associated with an immutable field. This reinforces the immutability of the field, preventing any modifications after initialization and ensuring safe concurrent access.
14. The method of claim 12 wherein the read permission is associated with a read lock.
In the computer system using immutable, read, and write references, the read permission is associated with a read lock. This ensures that multiple threads can read the object concurrently without any data corruption, but any write operations will be blocked until all read locks are released.
15. The system of claim 12 wherein the write permission is associated with an exclusive lock.
In the computer system using immutable, read, and write references, the write permission is associated with an exclusive lock. This guarantees that only one thread can write to the object at any given time, preventing race conditions and data corruption. All other threads will be blocked until the exclusive lock is released.
16. The system of claim 11 wherein the type modifiers are specified in a context of a type.
In the computer system, type modifiers (immutable, read, and write) are specified within the context of a type. This means the access permission is associated with the type itself, not just individual instances, controlling access to type members through references that point at an object in the shared-access memory.
17. The system of claim 11 wherein the imperative framework includes an isolation region defined with the access permissions and an other region outside of the isolation region, wherein the isolation region maps to program scopes, and wherein the other region is configured to selectively ignore access permissions.
The computer system includes an imperative framework with isolation regions defined by access permissions (immutable, read, write), and an "other" region outside this isolation. The isolation region maps to program scopes, and the "other" region can selectively bypass the access permissions. This provides a mechanism for temporarily relaxing access control for specific purposes, while maintaining overall safety in the isolated regions.
18. The system of claim 11 wherein the imperative framework includes isolated methods capable of respecting the access permissions.
The computer system includes isolated methods capable of respecting the access permissions (immutable, read, write). These methods are designed to operate within the constraints of the defined access control system, ensuring that they do not violate the established rules for concurrent access to shared memory.
19. The system of claim 18 wherein the imperative framework includes isolated delegates that bind to isolated methods having input and output parameters access compatible with delegate parameters.
The computer system includes isolated delegates that bind to isolated methods. These delegates have input and output parameters access compatible with the delegate parameters and with the established access permissions (immutable, read, write). This ensures that the delegate's access rights align with the underlying method's requirements, maintaining type safety and access control.
20. A computer readable storage medium, which is not a transitory propagating signal, storing computer executable instructions for controlling a computing device to perform a method comprising: defining at least three type modifiers for controlling access to type members through references pointing at an object in a shared-access memory; and associating no more than one of the plurality of type modifiers with a type name for all occurrences of the type name; wherein each of the plurality of type modifiers defines a different access permission to restrict operations on the object to which the reference points including: an immutable permission, which allows the pointed-to object to be shared among concurrent threads wherein changes to the pointed-to object are confined to the scope of a called function but the state of the pointed to object is statically determined not to change in a calling function; a read permission, which allows the pointed-to object to be shared among concurrent threads with concurrency safety for concurrent reads, and a read reference implies immutable access and allows reads of mutable fields; and a write permission, which does not allow the pointed-to object to be shared among concurrent threads, wherein a write to the reference can be done with safe concurrency; and defining an isolated method as the called function to obey the access permissions.
A system for managing memory access in a multi-threaded environment uses at least three type modifiers to control access to objects in shared memory. The system defines type modifiers (immutable, read, and write), with each type name having one modifier. The immutable modifier allows objects to be shared between threads, with changes confined to a function's scope and no state change in the calling function. The read modifier allows concurrent reads with concurrency safety, implying immutable access and permitting reads of mutable fields. The write modifier restricts objects to not be shared, but writes can be safely done with concurrency. An isolated method respects these modifiers, ensuring safe concurrent access.
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
April 13, 2009
July 23, 2013
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.