Formal objects and executors
OwnerLior Malkainventor
Life of this patent
Estimating the term…
Abstract
Embodiments are provided for formal objects and executors. In one embodiment, a formal object serialization allows retrieving the object value using a Get method, writing the object value using a Write method, and reading the object value using a Read method. In one embodiment, a formal object validation uses a validator to validate assignments to the object value. Formal validation and serialization may be combined. In one embodiment, a formal executor is guaranteed to be closed regardless of whether an error has occurred or not.
Claims6
A method of ensuring a Value variable of a program is initialized correctly, the method being performed on an object having a get method, a write method and a read method, wherein the method performs the steps of:
- receiving an input and initializing the object with the input, wherein said input comprises an initial value for a Boolean Readable variable, a call to one of the methods within the object and a value for the Value variable that is only initialized if the Boolean Readable is FALSE;
- based on the call associated with the input, performing the steps of:
- if the call of the input is a Read method call;
- executing the Read method on a stream that when invoked returns an error if Readable is FALSE, and otherwise sets the Readable to FALSE and sets the Value variable to a value read from the stream;
- if the call of the input is a Get method call,
- executing the Get method that returns the Value variable if Readable is FALSE, otherwise return an error;
- and
- if the call of the input is a Write method call,
- executing the Write method that writes the value to a stream if Readable is FALSE, otherwise return an error.
Dependencies are inferred from the claim text.