Extensible compiler utilizing a plurality of question handlers
AssigneeMicrosoft Corporation
InventorsPaul Kwiatkowski, David Richter, William Aitken, Brian Dickens, Charles Simonyi, Muthukrishnan Paramasivam, Steve Eisner, Ioannis Samaragdakis
Life of this patent
Estimating the term…
Abstract
A compiler architecture uses a question and answer methodology between a reduction engine and nodes of a graph representing the program being compiled to provide for easy expandability of the compiler. By using the question and answer methodology, additional functionality can be added to the compiler by users, whether they be part of the original design team of the compiler or be a subsequent user.
Claims51
A method comprising:
- associating one or more question handlers with each of a plurality of nodes of a graph representing a program, the plurality of nodes being interconnected via a plurality of links;
- and
- transforming the program into a desired output by submitting a plurality of questions to a plurality of question handlers corresponding to the plurality of nodes, wherein the transforming comprises communicating information between the plurality of question handlers by submitting questions and receiving responses between one another.
At least one computer-readable media having stored thereon a computer program that, when executed by one or more processors, causes the one or more processors to perform functions to transform a program into an intermediary language, the functions including:
- receiving questions from a plurality of question handlers corresponding to nodes of a graph representing the program, wherein the questions comprise requests for intermediary language corresponding to the nodes;
- dispatching the questions to selected ones of the plurality of question handlers;
- receiving responses to the questions from the selected ones of the plurality of question handlers;
- and
- providing the responses to the question handlers from which the questions were received.
A method comprising:
- associating one or more question handlers with each of a plurality of nodes of a graph representing a program, the plurality of nodes being interconnected via a plurality of links;
- altering the graph by a question handler corresponding to one of the plurality of nodes adding one or more new nodes to the plurality of nodes;
- and
- disallowing any question handler corresponding to one of the plurality of nodes from deleting any of the plurality of nodes.
A method for transforming a program represented as a graph into a desired output, the method comprising:
- receiving a first plurality of questions from a plurality of question handlers corresponding to a plurality of nodes of the graph;
- dispatching a second plurality of questions to the plurality of question handlers;
- receiving responses to the second plurality of questions from the plurality of question handlers;
- providing responses to the first plurality of questions to the plurality of question handlers;
- detecting when a response provided to a question handler of the first plurality of question handlers included incorrect information;
- and
- re-dispatching at least a subset of the second plurality of questions in response to detecting the response that included incorrect information.
A system comprising:
- a plurality of question handlers, wherein individual question handlers of the plurality of question handlers are associated with nodes of a graph representing a program;
- and
- a reduction engine to transform the program into a desired output by,
- receiving questions from the individual question handlers,
- dispatching questions to the individual question handlers, and
- providing responses to the individual question handlers.
A system comprising:
- an initialization program to associate one or more question handlers with each of a plurality of graph nodes representing a program;
- and
- a reduction engine to transform the program into a desired output by,
- dispatching questions to the plurality of question handlers,
- receiving responses from the plurality of question handlers, and
- providing the received responses to the appropriate ones of the plurality of question handlers.
A computer-readable storage medium comprising computer-executable instructions that implement interface methods, the interface methods performing respective functions comprising:
- dispatching a question to a question handier corresponding to a node of a graph representing a program;
- dispatching a question to a question handler corresponding to a node coupled to a specified link;
- and
- noting that further instructions cannot be executed by a question handler until an answer to a specified question is received by the question handler.
A method, implemented in a reduction engine communicating with a plurality of question handlers, of transforming a program into a desired output, the method comprising:
- receiving, at the reduction engine, questions from individual question handlers of the plurality of question handlers, wherein the individual question handlers are associated with nodes of a graph representing the program;
- dispatching, from the reduction engine, questions to the individual question handlers;
- and
- providing, by the reduction engine, responses to the individual question handlers.
One or more computer-readable media having stored thereon a plurality of instructions that, when executed by one or more processors, cause the one or more processors to:
- associate one or more question handlers with each of a plurality of graph nodes representing a program;
- and
- implement a reduction engine to transform the program into a desired output by,
- dispatching questions to the plurality of question handlers,
- receiving responses from the plurality of question handlers, and
- returning the received responses to the appropriate ones of the plurality of question handlers.
Dependencies are inferred from the claim text.