Skip to content

Commit 58a749e

Browse files
committed
Revise spec
1 parent 60e4eb0 commit 58a749e

3 files changed

Lines changed: 43 additions & 111 deletions

File tree

docs/fpp-spec.html

Lines changed: 23 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -4065,60 +4065,15 @@ <h5 id="Definitions_Topology-Definitions_Semantics_Resolving-to-a-Partially-Numb
40654065
</li>
40664066
<li>
40674067
<p>Let the initial set of instances of <em>T</em> be the
4068-
<a href="#Specifiers_Port-Interface-Instance-Specifiers">port interface instances</a>
4069-
specified in the definition of <em>T</em>.
4070-
For each topology <em>T'</em> in <em>S</em> (step 2),
4068+
port interface instances
4069+
<a href="#Specifiers_Port-Interface-Instance-Specifiers">specified</a>
4070+
in the definition of <em>T</em>.
4071+
For each topology <em>T'</em> resolved in step 2,
40714072
<a href="#Definitions_Topology-Definitions_Importing-Subtopologies_Importing-Interface-Instances">import
40724073
the instances</a>
40734074
of <em>T'</em> into <em>T</em>.
4074-
Note that <em>T'</em> is resolved (step 2), so the set of instances of <em>T'</em> contains
4075-
all topologies transitively
4076-
imported by the definition of <em>T'</em>.</p>
4077-
</li>
4078-
<li>
4079-
<p>For each instance <em>I</em> in set <em>S</em>, compute the <strong>included port interface</strong>
4080-
<em>P<sub>I</sub></em> of <em>I</em> accessible in <em>T</em>:</p>
4081-
<div class="olist loweralpha">
4082-
<ol class="loweralpha" type="a">
4083-
<li>
4084-
<p>If <em>I</em> refers to a <a href="#Definitions_Component-Instance-Definitions">component
4085-
instance</a>, <em>P<sub>I</sub></em> is the port interface of the component instance</p>
4086-
</li>
4087-
<li>
4088-
<p>If <em>I</em> refers to a <a href="#Definitions_Topology-Definitions">topology</a>, <em>P<sub>I</sub></em> is
4089-
the port interface of the topology</p>
4090-
</li>
4091-
<li>
4092-
<p>If <em>I</em> refers to a <a href="#Definitions_Module-Template-Definitions">port interface
4093-
instance template parameter</a> <em>T<sub>P</sub></em> inside template <em>T<sub>D</sub></em> where <em>T</em> is
4094-
found in expansion <em>T<sub>E</sub></em>:</p>
4095-
<div class="olist lowerroman">
4096-
<ol class="lowerroman" type="i">
4097-
<li>
4098-
<p>The corresponding template parameter value <em>T<sub>V</sub></em> in <em>T<sub>E</sub></em> must refer to a
4099-
port interface instance</p>
4100-
</li>
4101-
<li>
4102-
<p><em>P<sub>I</sub></em> is the port interface specified in <em>T<sub>P</sub></em></p>
4103-
</li>
4104-
<li>
4105-
<p><em>P<sub>I</sub></em> must be a <a href="#Ports_Sub-Interfaces">sub-interface</a> of <em>T<sub>V</sub></em></p>
4106-
</li>
4107-
</ol>
4108-
</div>
4109-
</li>
4110-
</ol>
4111-
</div>
4112-
</li>
4113-
<li>
4114-
<p>If an instance <em>I</em> is named twice in <em>S</em> with differing port interfaces
4115-
<em>P<sub>I1</sub></em> and <em>P<sub>I2</sub></em>, the set union will be
4116-
used to compute <em>P<sub>I</sub></em>.</p>
4117-
</li>
4118-
<li>
4119-
<p>Replace all instances <a href="#Definitions_Module-Template-Definitions">port
4120-
interface instance template parameter</a> with the
4121-
component instance or topology specified in the template expansion.</p>
4075+
Note that <em>T'</em> is resolved, so the set of instances of <em>T'</em> contains all
4076+
topologies transitively imported by the definition of <em>T'</em>.</p>
41224077
</li>
41234078
<li>
41244079
<p>For each connection <em>C</em> discovered in step 3, check that each
@@ -4132,26 +4087,21 @@ <h5 id="Definitions_Topology-Definitions_Semantics_Resolving-to-a-Partially-Numb
41324087
<div class="olist loweralpha">
41334088
<ol class="loweralpha" type="a">
41344089
<li>
4135-
<p>If <em>E</em> is a <a href="#Specifiers_Connection-Graph-Specifiers_Semantics">component instance endpoint</a> with the form <em>Q</em> <code>.</code> <em>I</em>:</p>
4136-
<div class="olist lowerroman">
4137-
<ol class="lowerroman" type="i">
4138-
<li>
4139-
<p>Check that the associated port interface of the component instance contains
4140-
the port instance <em>I</em></p>
4141-
</li>
4142-
</ol>
4143-
</div>
4090+
<p>If <em>E</em> is a <a href="#Specifiers_Connection-Graph-Specifiers_Semantics">component
4091+
instance endpoint</a> with the form <em>Q</em> <code>.</code> <em>I</em>,
4092+
check that the <a href="#Ports_Port-Interface-Instances">associated port interface</a>
4093+
of the component instance contains the port instance <em>I</em>.</p>
41444094
</li>
41454095
<li>
4146-
<p>Otherwise the <a href="#Instance-Member-Identifiers_Port-Instance-Identifiers">port instance identifier</a>
4096+
<p>Otherwise if the <a href="#Instance-Member-Identifiers_Port-Instance-Identifiers">port instance identifier</a>
41474097
<em>P</em> appearing in <em>E</em> has the form <em>Q</em>
41484098
<code>.</code> <em>I</em>, where <em>Q</em> refers to a topology <em>T'</em>, and
4149-
<em>I</em> names a port of <em>T'</em>.</p>
4099+
<em>I</em> names a port of <em>T'</em>, then</p>
41504100
<div class="olist lowerroman">
41514101
<ol class="lowerroman" type="i">
41524102
<li>
4153-
<p>Check that the associated port interface of the topology contains the port
4154-
instance <em>I</em></p>
4103+
<p>Check that the associated port interface of <em>T'</em> contains the
4104+
port instance <em>I</em>,</p>
41554105
</li>
41564106
<li>
41574107
<p>Find the <a href="#Specifiers_Topology-Port-Instance-Specifiers">topology port instance specifier</a> <code>port</code> <em>I</em> <code>=</code> <em>P'</em> in <em>T'</em>.</p>
@@ -4166,6 +4116,9 @@ <h5 id="Definitions_Topology-Definitions_Semantics_Resolving-to-a-Partially-Numb
41664116
</ol>
41674117
</div>
41684118
</li>
4119+
<li>
4120+
<p>Otherwise <em>TODO: Handle bound parameter case. Check the interface, then substitute.</em></p>
4121+
</li>
41694122
</ol>
41704123
</div>
41714124
</li>
@@ -13696,8 +13649,11 @@ <h3 id="Ports_Port-Interface-Instances">24.3. Port Interface Instances</h3>
1369613649
<div class="olist arabic">
1369713650
<ol class="arabic">
1369813651
<li>
13699-
<p>For a component instance definition or a topology definition, the port
13700-
interface is given by the definition.</p>
13652+
<p>For a component instance definition <em>D</em>, the port interface is given by the
13653+
component definition referred to in <em>D</em>.</p>
13654+
</li>
13655+
<li>
13656+
<p>For a topology definition, the port interface is given by the definition.</p>
1370113657
</li>
1370213658
<li>
1370313659
<p>For a bound parameter definition \$(p, A)\$, the port interface is specified
@@ -13850,7 +13806,7 @@ <h3 id="Analysis-and-Translation_Translation-Tools">25.4. Translation Tools</h3>
1385013806
</div>
1385113807
<div id="footer">
1385213808
<div id="footer-text">
13853-
Last updated 2026-04-14 11:23:52 -0700
13809+
Last updated 2026-04-14 12:04:20 -0700
1385413810
</div>
1385513811
</div>
1385613812
<script src="code-prettify/run_prettify.js"></script>

docs/spec/Definitions/Topology-Definitions.adoc

Lines changed: 16 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -120,43 +120,15 @@ connections C { a.b -> c.d, e.f -> g.h }
120120
+
121121

122122
. Let the initial set of instances of _T_ be the
123-
<<Specifiers_Port-Interface-Instance-Specifiers,port interface instances>>
124-
specified in the definition of _T_.
125-
For each topology _T'_ in _S_ (step 2),
123+
port interface instances
124+
<<Specifiers_Port-Interface-Instance-Specifiers,specified>>
125+
in the definition of _T_.
126+
For each topology _T'_ resolved in step 2,
126127
<<Definitions_Topology-Definitions_Importing-Subtopologies_Importing-Interface-Instances,import
127128
the instances>>
128129
of _T'_ into _T_.
129-
Note that _T'_ is resolved (step 2), so the set of instances of _T'_ contains
130-
all topologies transitively
131-
imported by the definition of _T'_.
132-
133-
. For each instance _I_ in set _S_, compute the **included port interface**
134-
_P~I~_ of _I_ accessible in _T_:
135-
136-
.. If _I_ refers to a <<Definitions_Component-Instance-Definitions,component
137-
instance>>, _P~I~_ is the port interface of the component instance
138-
139-
.. If _I_ refers to a <<Definitions_Topology-Definitions,topology>>, _P~I~_ is
140-
the port interface of the topology
141-
142-
.. If _I_ refers to a <<Definitions_Module-Template-Definitions,port interface
143-
instance template parameter>> _T~P~_ inside template _T~D~_ where _T_ is
144-
found in expansion _T~E~_:
145-
146-
... The corresponding template parameter value _T~V~_ in _T~E~_ must refer to a
147-
port interface instance
148-
149-
... _P~I~_ is the port interface specified in _T~P~_
150-
151-
... _P~I~_ must be a <<Ports_Sub-Interfaces,sub-interface>> of _T~V~_
152-
153-
. If an instance _I_ is named twice in _S_ with differing port interfaces
154-
_P~I1~_ and _P~I2~_, the set union will be
155-
used to compute _P~I~_.
156-
157-
. Replace all instances <<Definitions_Module-Template-Definitions,port
158-
interface instance template parameter>> with the
159-
component instance or topology specified in the template expansion.
130+
Note that _T'_ is resolved, so the set of instances of _T'_ contains all
131+
topologies transitively imported by the definition of _T'_.
160132

161133
. For each connection _C_ discovered in step 3, check that each
162134
<<Specifiers_Connection-Graph-Specifiers_Syntax,endpoint>> of _C_
@@ -166,18 +138,18 @@ refers to one of the port interface instances computed in the previous step.
166138
<<Specifiers_Connection-Graph-Specifiers_Syntax,connection endpoint>>
167139
_E_ of a connection computed in step 3, do the following:
168140

169-
.. If _E_ is a <<Specifiers_Connection-Graph-Specifiers_Semantics,component instance endpoint>> with the form _Q_ `.` _I_:
141+
.. If _E_ is a <<Specifiers_Connection-Graph-Specifiers_Semantics,component
142+
instance endpoint>> with the form _Q_ `.` _I_,
143+
check that the <<Ports_Port-Interface-Instances,associated port interface>>
144+
of the component instance contains the port instance _I_.
170145

171-
... Check that the associated port interface of the component instance contains
172-
the port instance _I_
173-
174-
.. Otherwise the <<Instance-Member-Identifiers_Port-Instance-Identifiers,port instance identifier>>
146+
.. Otherwise if the <<Instance-Member-Identifiers_Port-Instance-Identifiers,port instance identifier>>
175147
_P_ appearing in _E_ has the form _Q_
176148
`.` _I_, where _Q_ refers to a topology _T'_, and
177-
_I_ names a port of _T'_.
149+
_I_ names a port of _T'_, then
178150

179-
... Check that the associated port interface of the topology contains the port
180-
instance _I_
151+
... Check that the associated port interface of _T'_ contains the
152+
port instance _I_,
181153

182154
... Find the <<Specifiers_Topology-Port-Instance-Specifiers,
183155
topology port instance specifier>> `port` _I_ `=` _P'_ in _T'_.
@@ -187,6 +159,8 @@ Retain the port number assignment, if any, at _E_ computed in step 1.
187159

188160
... Reapply steps a and b to the endpoint _E_.
189161

162+
.. Otherwise _TODO: Handle bound parameter case. Check the interface, then substitute._
163+
190164
. For each topology _T'_ in _S_,
191165
<<Definitions_Topology-Definitions_Importing-Subtopologies_Importing-Connections,import
192166
the connections>>

docs/spec/Ports.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,10 @@ parameter>>.
111111

112112
Each of these elements has an *associated port interface* _I_:
113113

114-
. For a component instance definition or a topology definition, the port
115-
interface is given by the definition.
114+
. For a component instance definition _D_, the port interface is given by the
115+
component definition referred to in _D_.
116+
117+
. For a topology definition, the port interface is given by the definition.
116118

117119
. For a bound parameter definition stem:[(p, A)], the port interface is specified
118120
in the parameter _p_.

0 commit comments

Comments
 (0)