Circuits and methods for mobility of effectful program fragments
OwnerPaul Govereau, Kevin J. Redwine +1inventors
InventorsPaul Govereau, Kevin J. Redwine, Kelly T. Heffner
Life of this patent
Estimating the term…
Abstract
Methods for mobility of effectful program fragments including a method for serializing and deserializing effectful program fragments, and a method for utilizing a program fragment in a type-directed way.
Claims22
A method of dispatching on a function call of a selected type during execution of software code by a computer system, comprising:
- searching an available set of code based on at least function name for candidate code for implementing a selected function;
- if candidate code is found, performing unification on type variables within the candidate code to determine the suitability of the candidate code;
- if the type variables unify, dispatching to the candidate code to implement the selected function;
- and
- if candidate code is not found, dynamically expanding the set of available code and searching for candidate coded in the expanded set of available code.
A method of determining whether a variable name within a set of software code being executed on a computer is associated with a path comprising:
- testing if the variable name is defined within the code but outside a code module referencing the variable name;
- if the variable name is defined outside the code module referencing the variable name, determining that the variable name is an external variable name associated with a path;
- and
- if the variable name is defined within the code module:
- testing if the variable name can be referenced by code outside of the code module defining the variable name;
- if the variable name can be referenced by code outside of the code module defining the variable name, determining that the variable name is a public variable name associated with a path;
- and
- if the variable name cannot be referenced by code outside of the code module defining the variable name, determining that the variable name is a not public variable name and is not associated with a path.
A method of serializing an expression defined in programming code running on a computer into binary data, comprising:
- testing the expression with the computer;
- and
- selectively performing serialization operations with the computer in response to testing the expression:
- if the expression is a path, encoding the path;
- if the expression is a variable, serializing the variable;
- if the expression if a program fragment, serializing the program fragment;
- and
- if the expression has free variables, localizing the free variables.
A method of de-serializing binary data with a computer to generate an expression in a corresponding programming code, comprising:
- testing the expression with the computer;
- and
- selectively performing de-serialization operations with the computer in response to testing the expression, comprising:
- if the binary data can be decoded as a path, decoding the binary data as a path;
- if the binary data cannot be decoded as a path but can be decoded as a variable, decoding the binary data as a variable;
- and
- if the binary data cannot be decoded as a path or a variable and can be decoded as a program fragment, decoding the binary data as a program fragment.
A method of installing software on a computer comprising:
- receiving binary data with the computer from an external source;
- de-serializing the binary data;
- performing a dispatch to retrieve code for operating on the de-serialized data;
- and
- installing the retrieved code on the computer and operating on the de-serialized data.
A method of exchanging program code via a network using zero-configuration software comprising:
- designating with a plurality of machines participating in zero-configuration a single overloaded function name as an entry point into programming code, the overloaded function name corresponding to a entry point function which takes a parameter;
- on a first computer, defining a non-public datatype;
- on the first computer, overloading the designated entry point function with a program fragment for the non-public datatype;
- on the first computer, serializing the program fragment defined by applying the entry point function to the non-public datatype;
- sending the serialized program fragment from the first computer to a second computer via the network;
- receiving the serialized program fragment with the second computer;
- on the second computer, deserializing the serialized program fragment and selectively running the program fragment with network-aware open dynamic dispatch.
Dependencies are inferred from the claim text.