Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions specification/hugr.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ edges. The following operations are *only* valid as immediate children of a
There may also be other [scoped definitions](#scoped-definitions).

(scoped-definitions)=
### Scoped Definitions
### Scoped Definitions and Entry Points

The following operations are valid at the module level as well as in dataflow
regions and control-flow regions:
Expand All @@ -193,10 +193,15 @@ regions and control-flow regions:
A **loadable HUGR** is a module HUGR where all input ports are connected and there are
no `FuncDecl/AliasDecl` nodes.

In Hugr, an entry point is just a distinguished node. This node could be a `FuncDefn` and its children would define the body of the function. This `FuncDefn` node, together with its children define a region of the HUGR graph. Entry points must be region-container nodes, meaning that they contain children in the hierachy.

An **executable HUGR** or **executable module** is a loadable HUGR where the
root Module node has a `FuncDefn` child with function name
"main", that is the designated entry point. Modules that act as libraries need
not be executable.
root Module node has a `FuncDefn` child node that is the designated entry point. This function must take no arguments as input. Modules that act as libraries need not be executable.

Some examples of region-container nodes are the following:
* `FuncDefn` nodes
* Dataflow nodes
* Conditional nodes

(dataflow)=
### Dataflow
Expand Down
Loading