# US 11,119,741 B2 · Compiling device and method

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,119,741 B2
- Document ID: US11119741B2
- Status: Granted
- Kind: B2
- Application number: 16/955,113
- Filed: 2018-12-19
- Published: 2020-10-01
- Granted: 2021-09-14
- Earliest claimed: 2017-12-20
- Assignees: Koninklijke Philips N.V.
- Applicants: Koninklijke Philips N.V.
- Inventors: William Charles Mallon; Alan Pestrin; Oscar Garcia Morchon
- Web page: https://patentgrep.com/patent/US11119741B2

## CPC

- G06F 8/433: {Dependency analysis; Data or control flow analysis}
- G06F 21/14: against software analysis or reverse engineering, e.g. by obfuscation
- G06F 8/451: {Code distribution (considering CPU load at run-time G06F9/505; load rebalancing G06F9/5083)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Some embodiments are directed to a compiler device (100) configured to identify a sub-graph (210) in a data flow graph having one or more output nodes marked as encoded and one or more output nodes marked as non-encoded, and to replace the sub-graph by an encoded first sub-graph (210.1), and a non-encoded second sub-graph (210.2), wherein the first sub-graph has only encoded output nodes, and the second sub-graph has only non-encoded output nodes.

## Claims

### Claim 1

A compiler device comprising:
an input interface circuit, wherein the input interface circuit is arranged to receive a computer program representation; and
a processor circuit,
wherein the processor circuit is arranged to obtain a data flow graph representation from the computer program representation,
wherein the data flow graph comprises nodes,
wherein at least a portion of the nodes in the data flow graph are marked as encoded or as non-encoded,
wherein an encoded node represents an operation on encoded data,
wherein a non-encoded node represents an operation on non-encoded data,
wherein the processor circuit is arranged to amend the data flow graph by identifying a sub-graph in the data flow graph, wherein the sub-graph has at least one output nodes marked as encoded and at least one output nodes marked as non-encoded,
wherein the processor circuit is arranged to replace the sub graph by an encoded first sub-graph and a non-encoded second sub-graph,
wherein the encoded first sub-graph has only encoded output nodes, and the non-encoded second sub-graph has only non-encoded output nodes,
wherein the encoded first sub-graph and the non-encoded second sub-graph are selected from the sub-graph as further sub-graphs,
wherein the processor circuit is arranged to insert at least one insert nodes into the data flow graph, wherein the insert nodes represent an encoding operation before the encoded first sub-graph such that the encoded first sub-graph operates only on encoded data, and/or the insert nodes represent a decoding operation before the non-encoded second sub-graph such that the non-encoded second sub-graph operates only on non-encoded data,
wherein the processor circuit is arranged to obtain a compilation of the computer program representation from at least the amended data flow graph.

### Claim 2 (depends on 1)

The compiler device as in claim 1, wherein at least an input node of the sub-graph is duplicated in the encoded first sub-graph and the non-encoded second sub-graph.

### Claim 3 (depends on 1)

The compiler device as in claim 1, wherein the encoded first sub-graph and the non-encoded second sub-graph are a duplication of the sub-graph.

### Claim 4 (depends on 3)

The compiler device as in claim 3, wherein the compiler device performs a dead-code removal optimization on the amended sub-graph.

### Claim 5 (depends on 1)

The compiler device as in claim 1,
wherein the encoded first sub-graph comprises first nodes,
wherein the first nodes are marked encoded,
wherein the non-encoded second sub-graph comprises second nodes,
wherein the second nodes are marked non-encoded.

### Claim 6 (depends on 1)

The compiler device as in claim 1, wherein the data flow graph is a static single assignment graph.

### Claim 7 (depends on 1)

The compiler device as in claim 1 wherein the sub-graph consists of phi and copy nodes.

### Claim 8 (depends on 1)

The compiler device as in claim 1 wherein the encoding is a homomorphic encryption.

### Claim 9 (depends on 1)

The compiler device as in claim 1,
wherein the computer program representation identifies at least one nodes in the data flow graph as marked encoded or as non-encoded.

### Claim 10 (depends on 1)

The compiler device as in claim 1,
wherein the sub-graph indicates a datum,
wherein the datum has multiple sources and multiple targets.

### Claim 11 (depends on 1)

The compiler device as in claim 1, wherein the sub-graph in the data flow graph has at least one inputs nodes marked as encoded and at least one input nodes marked as non-encoded.

### Claim 12 (depends on 1)

The compiler device as in claim 1,
wherein the processor circuit is arranged to identify a flow node in the amended or un-amended data flow graph,
wherein the processor circuit is arranged to identify an operating node before the flow node,
wherein the processor circuit is arranged to identify an operating node after the flow node,
wherein the flow node is a phi node or a copy node,
wherein the processor circuit is arranged to remove the operating node from after the flow node,
wherein the processor circuit is arranged to insert at least one operating nodes before the flow node,
wherein the processor circuit is arranged to merge an inserted operating node with an encoding or decoding operation.

### Claim 13

A compiler device comprising:
an input interface circuit, wherein the input interface circuit is arranged to receive a computer program representation; and
a processor circuit,
wherein the processor circuit is arranged to obtain a data flow graph representation from the computer program representation,
wherein the data flow graph comprises nodes,
wherein at least a portion of the nodes in the data flow graph is marked as encoded or as non-encoded,
wherein the processor circuit is arranged to identify a flow node in the amended or un-amended data flow graph,
wherein the processor circuit is arranged to identify an operating node before the flow node,
wherein the processor circuit is arranged to identify an operating node after the flow node,
wherein the flow node is selected from the group consisting of a copy node or a phi node,
wherein the copy node distributes an incoming value to at least one further nodes,
wherein the processor circuit is arranged to amend the data flow graph by:
removing the operating node from after the flow node and inserting at least one operating nodes before the flow node; and
merging the operation represented by an inserted operating node with the encoding or decoding operation, and
wherein the processor circuit is arranged to obtain a compilation of the computer program representation from at least the amended data flow graph.

### Claim 14

A compiler method comprising:
receiving a computer program representation;
obtaining a data flow graph representation from the computer program representation,
wherein the data flow graph comprises nodes,
wherein at least part of the nodes in the data flow graph are marked as encoded or as non-encoded;
amending the data flow graph by identifying a sub-graph in the data flow graph,
wherein the data flow graph has at least one output nodes marked as encoded and at least one or more output nodes marked as non-encoded,
wherein an encoded node represents an operation on encoded data,
wherein a non-encoded node represents an operation on non-encoded data;
replacing the sub-graph by an encoded first sub-graph, and a non-encoded second sub graph,
wherein the encoded first sub-graph has only encoded output nodes,
wherein the non-encoded second sub-graph has only non-encoded output nodes,
wherein the encoded first sub-graph and the non-encoded second subgraph are selected from the sub-graphs as further sub-graphs;
inserting at least one insert nodes
wherein the at least one insert nodes represent an encoding operation before the encoded first sub-graph such that the encoded first sub-graph operates only on encoded data, and/or inserting at least one nodes representing a decoding operation before the non-encoded second sub-graph such that the non-encoded second sub-graph operates only on non-encoded data; and
obtaining a compilation of the computer program representation from at least the amended data flow graph.

### Claim 15

A compiler method comprising:
receiving a computer program representation;
obtaining a data flow graph representation from the computer program representation, wherein at least a portion of the nodes in the data flow graph are marked as encoded or as non-encoded;
amending the data flow graph by identifying in the amended or un-amended data flow graph a flow node, an operating node before the flow node, and an operating node after the flow node,
wherein the flow node is a copy node or phi node,
wherein the copy node distributes an incoming value to at least one further nodes;
removing the operating node from after the flow node;
inserting at least one operating nodes before the flow node;
merging the operation represented by an inserted operating node with the encoding or decoding operation; and
obtaining a compilation of the computer program representation from at least the amended data flow graph.

### Claim 16 (depends on 14)

A computer program stored on a non-transitory medium, wherein the computer program when executed on a processor performs the method as claimed in claim 14.

### Claim 17 (depends on 15)

A computer program stored on a non-transitory medium, wherein the computer program when executed on a processor performs the method as claimed in claim 15.

### Claim 18 (depends on 1)

The compiler device as in claim 1,
wherein the processor circuit is arranged to apply encoding rules to mark some nodes as non-encoded and marking the remaining nodes as encoded.

### Claim 19 (depends on 14)

The method as in claim 14, wherein at least an input node of the sub-graph is duplicated in the encoded first sub-graph and the non-encoded second sub-graph.

### Claim 20 (depends on 15)

The method as in claim 15, wherein at least an input node of the sub-graph is duplicated in the encoded first sub-graph and the non-encoded second sub-graph.
