<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.blackboxframework.org/index.php?action=history&amp;feed=atom&amp;title=System_structure_and_interface_separation</id>
	<title>System structure and interface separation - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.blackboxframework.org/index.php?action=history&amp;feed=atom&amp;title=System_structure_and_interface_separation"/>
	<link rel="alternate" type="text/html" href="http://wiki.blackboxframework.org/index.php?title=System_structure_and_interface_separation&amp;action=history"/>
	<updated>2026-06-21T13:50:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>http://wiki.blackboxframework.org/index.php?title=System_structure_and_interface_separation&amp;diff=430&amp;oldid=prev</id>
		<title>Josef templ at 10:44, 17 March 2017</title>
		<link rel="alternate" type="text/html" href="http://wiki.blackboxframework.org/index.php?title=System_structure_and_interface_separation&amp;diff=430&amp;oldid=prev"/>
		<updated>2017-03-17T10:44:40Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:44, 17 March 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l11&quot;&gt;Line 11:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Any module whose implementation may cause a circular import is split.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Any module whose implementation may cause a circular import is split.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The module Kernel is considered to be the lowest-level module not importing any other module. Therefore it may not cause a circular import and it is not required to be split. In addition, splitting the module Kernel may cause problems when starting the system because Kernel contains the runtime system procedures that must be resolved by the loader. This may be more &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;complicate &lt;/del&gt;if Kernel is split.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The module Kernel is considered to be the lowest-level module not importing any other module. Therefore it may not cause a circular import and it is not required to be split. In addition, splitting the module Kernel may cause problems when starting the system because Kernel contains the runtime system procedures that must be resolved by the loader. This may be more &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;complicated &lt;/ins&gt;if Kernel is split.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Similarly, the modules Math and SMath are considered not to cause any circular imports because of their narrow focus. In addition, any indirection caused by a split would also slow down the execution.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Similarly, the modules Math and SMath are considered not to cause any circular imports because of their narrow focus. In addition, any indirection caused by a split would also slow down the execution.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The import relation between an interface and the corresponding implementation module is such that the implementation module imports the interface module. If it were the other way round it would not serve to avoid circular imports. Importing the interface from the implementation, however, has the consequence that the implementation is not available right when the interface module is loaded but only after an appropriate ''Install''-procedure has been called that installs the implementation in a hook of the interface module. The right order of calling such install procedures cannot be checked by the compiler. Using an interface before the implementation has been installed typically leads to a NIL trap. Care has to be taken in particular in the module bodies of the implementation modules that any module used has its implementation already installed.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The import relation between an interface and the corresponding implementation module is such that the implementation module imports the interface module. If it were the other way round it would not serve to avoid circular imports. Importing the interface from the implementation, however, has the consequence that the implementation is not available right when the interface module is loaded but only after an appropriate ''Install''-procedure has been called that installs the implementation in a hook of the interface module. The right order of calling such install procedures cannot be checked by the compiler. Using an interface before the implementation has been installed typically leads to a NIL trap. Care has to be taken in particular in the module bodies of the implementation modules that any module used has its implementation already installed.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Josef templ</name></author>
	</entry>
	<entry>
		<id>http://wiki.blackboxframework.org/index.php?title=System_structure_and_interface_separation&amp;diff=429&amp;oldid=prev</id>
		<title>Josef templ at 09:41, 15 March 2017</title>
		<link rel="alternate" type="text/html" href="http://wiki.blackboxframework.org/index.php?title=System_structure_and_interface_separation&amp;diff=429&amp;oldid=prev"/>
		<updated>2017-03-15T09:41:20Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:41, 15 March 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l14&quot;&gt;Line 14:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Similarly, the modules Math and SMath are considered not to cause any circular imports because of their narrow focus. In addition, any indirection caused by a split would also slow down the execution.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Similarly, the modules Math and SMath are considered not to cause any circular imports because of their narrow focus. In addition, any indirection caused by a split would also slow down the execution.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The import relation between an interface and the corresponding implementation module is such that the implementation module imports the interface module. If it were the other way round it would not serve to avoid circular imports. Importing the interface from the implementation, however, has the consequence that the implementation is not available right when the interface module is loaded but only after an appropriate ''Install''-procedure has been called that installs the implementation in a hook of the interface module. The right order of calling such install procedures cannot be checked by the compiler. Using an interface before the implementation has been installed typically leads to a NIL trap. Care has to be taken in particular in the module bodies of the implementation modules that any used &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;module &lt;/del&gt;has its implementation already installed.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The import relation between an interface and the corresponding implementation module is such that the implementation module imports the interface module. If it were the other way round it would not serve to avoid circular imports. Importing the interface from the implementation, however, has the consequence that the implementation is not available right when the interface module is loaded but only after an appropriate ''Install''-procedure has been called that installs the implementation in a hook of the interface module. The right order of calling such install procedures cannot be checked by the compiler. Using an interface before the implementation has been installed typically leads to a NIL trap. Care has to be taken in particular in the module bodies of the implementation modules that any &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;module &lt;/ins&gt;used has its implementation already installed.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Josef templ</name></author>
	</entry>
	<entry>
		<id>http://wiki.blackboxframework.org/index.php?title=System_structure_and_interface_separation&amp;diff=428&amp;oldid=prev</id>
		<title>Josef templ at 09:39, 15 March 2017</title>
		<link rel="alternate" type="text/html" href="http://wiki.blackboxframework.org/index.php?title=System_structure_and_interface_separation&amp;diff=428&amp;oldid=prev"/>
		<updated>2017-03-15T09:39:19Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:39, 15 March 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The BlackBox 1.7 subsystem named &amp;quot;System&amp;quot; contains the basic modules of the BlackBox system. Most of the modules are portable but some are not. The portability of the modules is achieved by separating them into a portable &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;definition &lt;/del&gt;(in System) and an unportable implementation (in Host). The question arises if this separation is a general rule, which is sometimes violated, or if there are other aspects to be considered in order to understand and justify the current &amp;quot;System&amp;quot; architecture.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The BlackBox 1.7 subsystem named &amp;quot;System&amp;quot; contains the basic modules of the BlackBox system. Most of the modules are portable but some are not. The portability of the modules is achieved by separating them into a portable &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;interface &lt;/ins&gt;(in System) and an unportable implementation (in Host). The question arises if this separation is a general rule, which is sometimes violated, or if there are other aspects to be considered in order to understand and justify the current &amp;quot;System&amp;quot; architecture.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This memo tries to shed some light on this question.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This memo tries to shed some light on this question.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l6&quot;&gt;Line 6:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 6:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;On the other side, modules such as Files, Fonts, Ports, Dialog, etc. are split, i.e. there exists a corresponding HostFiles, HostFonts, HostPorts, and HostDialog module.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;On the other side, modules such as Files, Fonts, Ports, Dialog, etc. are split, i.e. there exists a corresponding HostFiles, HostFonts, HostPorts, and HostDialog module.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;So what is the general rule behind this rather arbitrary looking situation. In order to answer this question, let us look into the module Fonts, for example. This module has no imports. Now let us assume that Fonts is not split. Then we also have to look into HostFonts. HostFonts has an import of HostRegistry, among other imports. HostRegistry in turn has an import of Dialog. Dialog has no imports that cause any problems. Now, let us assume that Dialog is not split. By looking into HostDialog we find a large number of imports including an import of HostFonts. This is what is called a circular import, because HostFonts is exactly the module we started with. We notice that the split of a module into &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a definition &lt;/del&gt;and an implementation is a means for avoiding a circular import. And this is actually the key for understanding the BlackBox 1.7 &amp;quot;System&amp;quot; architecture.  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;So what is the general rule behind this rather arbitrary looking situation. In order to answer this question, let us look into the module Fonts, for example. This module has no imports. Now let us assume that Fonts is not split. Then we also have to look into HostFonts. HostFonts has an import of HostRegistry, among other imports. HostRegistry in turn has an import of Dialog. Dialog has no imports that cause any problems. Now, let us assume that Dialog is not split. By looking into HostDialog we find a large number of imports including an import of HostFonts. This is what is called a circular import, because HostFonts is exactly the module we started with. We notice that the split of a module into &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;an interface &lt;/ins&gt;and an implementation is a means for avoiding a circular import. And this is actually the key for understanding the BlackBox 1.7 &amp;quot;System&amp;quot; architecture&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. With the chosen approach all basic modules are able to use all other basic modules without running into circular imports&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The rule is roughly like this:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The rule is roughly like this:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l14&quot;&gt;Line 14:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Similarly, the modules Math and SMath are considered not to cause any circular imports because of their narrow focus. In addition, any indirection caused by a split would also slow down the execution.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Similarly, the modules Math and SMath are considered not to cause any circular imports because of their narrow focus. In addition, any indirection caused by a split would also slow down the execution.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The import relation between an interface and the corresponding implementation module is such that the implementation module imports the interface module. If it were the other way round it would not serve to avoid circular imports. Importing the interface from the &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;definition&lt;/del&gt;, however, has the consequence that the implementation is not available right when the interface module is loaded but only after an appropriate ''Install''-procedure has been called that installs the implementation in a hook of the interface module. The right order of calling such install procedures cannot be checked by the compiler. Using an interface before the implementation has been installed typically leads to a NIL trap.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The import relation between an interface and the corresponding implementation module is such that the implementation module imports the interface module. If it were the other way round it would not serve to avoid circular imports. Importing the interface from the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;implementation&lt;/ins&gt;, however, has the consequence that the implementation is not available right when the interface module is loaded but only after an appropriate ''Install''-procedure has been called that installs the implementation in a hook of the interface module. The right order of calling such install procedures cannot be checked by the compiler. Using an interface before the implementation has been installed typically leads to a NIL trap&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. Care has to be taken in particular in the module bodies of the implementation modules that any used module has its implementation already installed&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Josef templ</name></author>
	</entry>
	<entry>
		<id>http://wiki.blackboxframework.org/index.php?title=System_structure_and_interface_separation&amp;diff=427&amp;oldid=prev</id>
		<title>Josef templ at 08:16, 15 March 2017</title>
		<link rel="alternate" type="text/html" href="http://wiki.blackboxframework.org/index.php?title=System_structure_and_interface_separation&amp;diff=427&amp;oldid=prev"/>
		<updated>2017-03-15T08:16:35Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:16, 15 March 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l13&quot;&gt;Line 13:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 13:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The module Kernel is considered to be the lowest-level module not importing any other module. Therefore it may not cause a circular import and it is not required to be split. In addition, splitting the module Kernel may cause problems when starting the system because Kernel contains the runtime system procedures that must be resolved by the loader. This may be more complicate if Kernel is split.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The module Kernel is considered to be the lowest-level module not importing any other module. Therefore it may not cause a circular import and it is not required to be split. In addition, splitting the module Kernel may cause problems when starting the system because Kernel contains the runtime system procedures that must be resolved by the loader. This may be more complicate if Kernel is split.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Similarly, the modules Math and SMath are considered not to cause any circular imports because of their narrow focus. In addition, any indirection caused by a split would also slow down the execution.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Similarly, the modules Math and SMath are considered not to cause any circular imports because of their narrow focus. In addition, any indirection caused by a split would also slow down the execution.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The import relation between an interface and the corresponding implementation module is such that the implementation module imports the interface module. If it were the other way round it would not serve to avoid circular imports. Importing the interface from the definition, however, has the consequence that the implementation is not available right when the interface module is loaded but only after an appropriate ''Install''-procedure has been called that installs the implementation in a hook of the interface module. The right order of calling such install procedures cannot be checked by the compiler. Using an interface before the implementation has been installed typically leads to a NIL trap.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Josef templ</name></author>
	</entry>
	<entry>
		<id>http://wiki.blackboxframework.org/index.php?title=System_structure_and_interface_separation&amp;diff=426&amp;oldid=prev</id>
		<title>Josef templ at 15:15, 14 March 2017</title>
		<link rel="alternate" type="text/html" href="http://wiki.blackboxframework.org/index.php?title=System_structure_and_interface_separation&amp;diff=426&amp;oldid=prev"/>
		<updated>2017-03-14T15:15:27Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:15, 14 March 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The BlackBox subsystem named &amp;quot;System&amp;quot; contains the basic modules of the BlackBox system. Most of the modules are portable but some are not. The portability of the modules is achieved by separating them into a portable definition (in System) and an unportable implementation (in Host). The question arises if this separation is a general rule, which is sometimes violated, or if there are other aspects to be considered in order to understand and justify the current &amp;quot;System&amp;quot; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;structure&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The BlackBox &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1.7 &lt;/ins&gt;subsystem named &amp;quot;System&amp;quot; contains the basic modules of the BlackBox system. Most of the modules are portable but some are not. The portability of the modules is achieved by separating them into a portable definition (in System) and an unportable implementation (in Host). The question arises if this separation is a general rule, which is sometimes violated, or if there are other aspects to be considered in order to understand and justify the current &amp;quot;System&amp;quot; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;architecture&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This memo tries to shed some light on this question.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This memo tries to shed some light on this question.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l6&quot;&gt;Line 6:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 6:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;On the other side, modules such as Files, Fonts, Ports, Dialog, etc. are split, i.e. there exists a corresponding HostFiles, HostFonts, HostPorts, and HostDialog module.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;On the other side, modules such as Files, Fonts, Ports, Dialog, etc. are split, i.e. there exists a corresponding HostFiles, HostFonts, HostPorts, and HostDialog module.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;So what is the general rule behind this rather arbitrary looking situation. In order to answer this question, let us look into the module Fonts, for example. This module has an import of HostRegistry. HostRegistry in turn has an import of Dialog&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, among other imports&lt;/del&gt;. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Now let us look into &lt;/del&gt;Dialog&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. We notice that it does not have any interesting &lt;/del&gt;imports&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, only some low-level modules &lt;/del&gt;that &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;can be imported without &lt;/del&gt;any problems. Now let us assume that &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;HostDialog and &lt;/del&gt;Dialog &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;are &lt;/del&gt;not split. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;How would the situation be if we look at the union of both import lists? &lt;/del&gt;By looking into HostDialog we find a large number of imports including an import of &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Fonts&lt;/del&gt;. This is what is called a circular import, because &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Fonts &lt;/del&gt;is exactly the module we started with. We notice that the split of &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;modules &lt;/del&gt;into a definition and an implementation is a means for avoiding a circular import. And this is actually the key for &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the &lt;/del&gt;understanding &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;of &lt;/del&gt;the &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;current &lt;/del&gt;&amp;quot;System&amp;quot; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;structure&lt;/del&gt;.  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;So what is the general rule behind this rather arbitrary looking situation. In order to answer this question, let us look into the module Fonts, for example. This module &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;has no imports. Now let us assume that Fonts is not split. Then we also have to look into HostFonts. HostFonts &lt;/ins&gt;has an import of HostRegistry&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, among other imports&lt;/ins&gt;. HostRegistry in turn has an import of Dialog. Dialog &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;has no &lt;/ins&gt;imports that &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;cause &lt;/ins&gt;any problems. Now&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, &lt;/ins&gt;let us assume that Dialog &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;is &lt;/ins&gt;not split. By looking into HostDialog we find a large number of imports including an import of &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;HostFonts&lt;/ins&gt;. This is what is called a circular import, because &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;HostFonts &lt;/ins&gt;is exactly the module we started with. We notice that the split of &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a module &lt;/ins&gt;into a definition and an implementation is a means for avoiding a circular import. And this is actually the key for understanding the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;BlackBox 1.7 &lt;/ins&gt;&amp;quot;System&amp;quot; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;architecture&lt;/ins&gt;.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The rule is like this:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The rule is &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;roughly &lt;/ins&gt;like this:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Any module whose implementation may cause a circular import is split.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Any module whose implementation may cause a circular import is split.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The module Kernel is considered to be the lowest-level module not importing any other module. Therefore it may not cause a circular import and it is not required to be split. In addition, splitting the module Kernel may cause problems when starting the system because Kernel contains the runtime system procedures that must be resolved by the loader. This may be more complicate if Kernel is split.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The module Kernel is considered to be the lowest-level module not importing any other module. Therefore it may not cause a circular import and it is not required to be split. In addition, splitting the module Kernel may cause problems when starting the system because Kernel contains the runtime system procedures that must be resolved by the loader. This may be more complicate if Kernel is split.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Similarly, the modules Math and SMath are considered not to cause any circular imports because of their narrow focus. In addition, any indirection caused by a split would also slow down the execution.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Similarly, the modules Math and SMath are considered not to cause any circular imports because of their narrow focus. In addition, any indirection caused by a split would also slow down the execution.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Josef templ</name></author>
	</entry>
	<entry>
		<id>http://wiki.blackboxframework.org/index.php?title=System_structure_and_interface_separation&amp;diff=424&amp;oldid=prev</id>
		<title>Josef templ: Created page with &quot;The BlackBox subsystem named &quot;System&quot; contains the basic modules of the BlackBox system. Most of the modules are portable but some are not. The portability of the modules is a...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.blackboxframework.org/index.php?title=System_structure_and_interface_separation&amp;diff=424&amp;oldid=prev"/>
		<updated>2017-03-14T14:13:04Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;The BlackBox subsystem named &amp;quot;System&amp;quot; contains the basic modules of the BlackBox system. Most of the modules are portable but some are not. The portability of the modules is a...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The BlackBox subsystem named &amp;quot;System&amp;quot; contains the basic modules of the BlackBox system. Most of the modules are portable but some are not. The portability of the modules is achieved by separating them into a portable definition (in System) and an unportable implementation (in Host). The question arises if this separation is a general rule, which is sometimes violated, or if there are other aspects to be considered in order to understand and justify the current &amp;quot;System&amp;quot; structure.&lt;br /&gt;
&lt;br /&gt;
This memo tries to shed some light on this question.&lt;br /&gt;
&lt;br /&gt;
Let us first look at the exceptions. The most prominent exception is the module Kernel. There is no module HostKernel that provides the non-portable implementation of it. Similarly, the modules Math and SMath are exceptions because they use code procedures specific to the i387 coprocessor. &lt;br /&gt;
On the other side, modules such as Files, Fonts, Ports, Dialog, etc. are split, i.e. there exists a corresponding HostFiles, HostFonts, HostPorts, and HostDialog module.&lt;br /&gt;
&lt;br /&gt;
So what is the general rule behind this rather arbitrary looking situation. In order to answer this question, let us look into the module Fonts, for example. This module has an import of HostRegistry. HostRegistry in turn has an import of Dialog, among other imports. Now let us look into Dialog. We notice that it does not have any interesting imports, only some low-level modules that can be imported without any problems. Now let us assume that HostDialog and Dialog are not split. How would the situation be if we look at the union of both import lists? By looking into HostDialog we find a large number of imports including an import of Fonts. This is what is called a circular import, because Fonts is exactly the module we started with. We notice that the split of modules into a definition and an implementation is a means for avoiding a circular import. And this is actually the key for the understanding of the current &amp;quot;System&amp;quot; structure. &lt;br /&gt;
&lt;br /&gt;
The rule is like this:&lt;br /&gt;
Any module whose implementation may cause a circular import is split.&lt;br /&gt;
&lt;br /&gt;
The module Kernel is considered to be the lowest-level module not importing any other module. Therefore it may not cause a circular import and it is not required to be split. In addition, splitting the module Kernel may cause problems when starting the system because Kernel contains the runtime system procedures that must be resolved by the loader. This may be more complicate if Kernel is split.&lt;br /&gt;
Similarly, the modules Math and SMath are considered not to cause any circular imports because of their narrow focus. In addition, any indirection caused by a split would also slow down the execution.&lt;/div&gt;</summary>
		<author><name>Josef templ</name></author>
	</entry>
</feed>