Patent Description:
In general, a computer program can process a maximum number of possible parameters. This maximum number of possible parameters has to be high enough for any application of the computer program in the future.

In standard applications, a maximum amount of memory space on a storage device of the computer is necessary for executing the program with the maximum number of configurable parameters.

To enable high maximum numbers of possible/configurable parameters within one application, the memory size of memory devices has increased over the years continuously. Moreover, the memory size of the memory devices has increased over the years continuously to enable executing several applications simultaneously, which all have high maximum numbers of possible/configurable parameters. But the increasing of memory size of memory devices is limited. For example, static memory allocation may be used to allocate memory for computer programs before compilation, as in <CIT>.

This problem is solved nowadays for quite a lot of applications by using dynamic memory allocation. By means of dynamic memory allocation, the necessary memory space can be allocated, while the computer program is executed. However, for safety relevant and/or security relevant computer programs, the dynamic memory allocation is not allowed for safety reasons.

One objective of the invention is to provide an enhanced method for reducing the amount of necessary memory space, which eliminates the disadvantages of the prior art.

This objective is accomplished by means of a method according to claim <NUM>.

The invention is based on the idea, that the necessary amount of memory space can be determined before executing the compiled computer program. Hence, the necessary amount of memory space can be allocated statically before executing the computer program. In this way, the allocation of memory space may be specific to the number of input parameters to be processed. Particularly, the allocated memory space may not be changed during the execution of the compiled computer program with this method. Therefore, expediently the invention is suitable for safety relevant and/or security relevant computer programs.

Advantageously, the compiled computer program is available in form of an executable file. Further, the computer program may be available in form of a generic binary file. Moreover, the computer program may be available in form of a machine readable code and/or in form of a bytecode.

It is preferred that the determined minimum amount of memory space, in the following also called minimum amount of memory space, is needed to support the number of input parameters to be processed by the computer program. Hence, a minimum amount of memory space, that is necessary for executing the computer program with the parameters to be processed, in the meaning of the invention, may be a minimum amount of memory space, which is needed to support the number of input parameters to be processed by the computer program.

The allocated memory space may be continuous and/or fragmented. Moreover, the allocated memory space may be volatile and/or non-volatile. Thus, the storage device may be a volatile and/or non-volatile storage device. Further, the storage device may be a working memory device. Moreover, the storage device may be a combination of several storage devices of the computer.

Preferentially, the number of parameters to be processed by the compiled computer program is set during a configuration.

The number of input parameters to be processed may be set directly during the configuration, particularly by a number. Further, the number of input parameters to be processed may be set indirectly during the configuration, for example by setting identifiers for the input parameters to be processed, particularly by setting names, addresses and/or other identifiers for the input parameters to be processed.

Particularly, the number of input parameters to be processed by the computer program may be set within a configuration file. The configuration file may be loaded during the execution of the compiled computer program, particularly during a start-up procedure of the compiled computer program.

Advantageously, for determining the number of input parameters to be processed, the configuration is read, particularly the configuration settings may be read. It is preferred that, for determining the number of input parameters to be processed, the configuration file is read. Further, for determining the minimum amount of memory space necessary for executing the program with the input parameters to be processed, the configuration may be read, particularly the configuration settings and/or the configuration file may be read.

For executing the compiled computer program, a maximum number of input parameters may be configurable. A maximum amount of memory space may be necessary for executing the compiled computer program with the maximum number of configurable parameters. It is advantageous, that the determined minimum amount of memory space is less than the maximum amount of memory space. Hence, the amount of memory space, which is allocated statically for executing the compiled computer program, may be reduced by the invention. In this way, the amount of memory space, which expediently is blocked by the execution of the compiled computer program, may be reduced by the invention.

The number of input parameters to be processed is equal to the maximum number of configurable parameters. In this case, the determined minimum amount of memory space may be equal to the maximum amount of memory space.

The computer program comprises a memory map. Advantageously, the determined minimum amount of memory space is allocated statically by adjusting the memory map of the computer program. Moreover, for the allocation of the (determined) minimum amount of memory space for executing the compiled computer program, the memory map of the computer program may be read and/or adjusted.

A memory map in the meaning of the invention is a description that informs what areas of memory a compiler has allocated to items used within the compiled computer program. Advantageously, the programmer initially sets up the memory map. During the set-up of the memory map, the compiler may be directed where to store different items. The items may be configurable input parameters as well as preconfigured items. Then the compiler may generate the memory map. Before the adjustment (of the memory map), preferentially the memory map comprises storage locations of all configurable input parameters.

Expediently, the memory map is adjusted according to the configuration settings. Particularly, the memory map may be given, e.g. by the programmer, and then adjusted according to the configuration settings. By means of the adjustment, the memory map may be updated.

The memory map is adjusted as it is reduced by the storage locations of the unnecessary input parameters. Accordingly, not only the number of input parameters to be processed may be determined, but also unnecessary input parameters may be identified.

Particularly, the adjusted memory map may comprise the storage locations of the compiled computer program itself. Moreover, the adjusted memory map may comprise the storage locations of the input parameters to be processed. The adjusted memory map may comprise the storage location of any data as it comprises addresses, where the respective data is stored on the storage device.

The computer program may be a safety relevant and/or a security relevant computer program.

The invention and/or the described embodiments thereof may be realised - at least partially or completely - in software and/or in hardware, latter e. by means of a special electrical circuit.

Further, the invention and/or the described embodiments thereof may be realised - at least partially or completely - by means of a computer readable medium having a software, which software executes the invention and/or the embodiments thereof.

According to the invention, it is checked, if the determined minimum amount of memory space is available on the storage device of the computer. The check may be done by the compiled computer program itself, particularly during a start-up procedure of the computer program. Further, the check can be done before executing the compiled computer program, particularly by the software.

Further, if the determined minimum amount of memory space is available on the storage device of the computer, the compiled computer program is executed and/or the compiled computer program is run.

If the determined minimum amount of memory space is not available on the storage device, the compiled computer program is stopped and/or is not executed. Moreover, if the determined minimum amount of memory is not available on the storage device, an error message may be created. For example, the error message may say that not enough memory is available.

Further, it may be checked, how much memory space is available on the storage device. A possible number of input parameters may be determined on the basis of the available amount of memory space.

If the determined minimum amount of memory space is not available, the error message may say, e. , how much memory space is missing. Moreover, the error message may show, e. , the possible number of parameters, for which the available memory space is enough.

Advantageously, the input parameters to be processed are connection parameters of sensors and/or of signals and/or of track switches and/or of communications channels of the railway network. A connection parameter may be a name and/or an address (of the respective component). Further, the input parameters can be any other parameters of the railway network and/or of its components.

Further, the invention is related to a method for operating a railway network, using a compiled computer program (<NUM>) which is operated according to the above mentioned method. Moreover, in the method for operating a railway network, the input parameters to be processed may be parameters of the railway network. The railway network, the compiled computer program and/or the input parameters may be the same as mentioned above.

Moreover, the invention is related to a computer program product, particularly a computer readable medium, having a software for execution on a computer, which software, when executed on a computer, causes the computer to perform the method mentioned above.

Features, which are mentioned above (in connection with the method) may also refer to the computer program product.

Even if terms are used in the singular or in a specific numeral form, the scope of the invention should not be restricted to the singular or the specific numeral form.

The previously given description of advantageous embodiments of the invention contains numerous features which are partially combined with one another in the dependent claims. Expediently, these features can also be considered individually and be combined with one another into further suitable combinations. More particularly, these features may be combined with the computer program product and the method according to the respective independent claim individually as well as in any suitable combination. Furthermore, features of the method, formulated as apparatus features, may be considered as features of the computer program product and, accordingly, features of the computer program product, formulated as process features, may be considered as features of the method.

The above-described characteristics, features and advantages of the invention and the manner in which they are achieved can be understood more clearly in connection with the following description of exemplary embodiments which will be explained with reference to the drawings. The exemplary embodiments are intended to illustrate the invention, but are not supposed to restrict the scope of the invention to combinations of features given therein, neither with regard to functional features. Furthermore, suitable features of each of the exemplary embodiments can also be explicitly considered in isolation, be removed from one of the exemplary embodiments, be introduced into another of the exemplary embodiments and/or be combined with any of the appended claims.

<FIG> shows a flow chart <NUM>. The flow chart <NUM> shows a memory allocation in a computer having a computer program <NUM> without using the invention. <FIG> schematically shows a section of a memory map <NUM> according to the memory allocation shown in <FIG>. Thus, the following description regards to both, <FIG>.

A computer program <NUM> has been programmed by a programmer. The programmer has set the memory map <NUM> of the computer program <NUM>. For running/executing the computer program <NUM>, parameters <NUM> are needed to be set/configured. The memory map <NUM> comprises the storage locations of all preconfigured items <NUM> as well as the storage locations of all configurable parameters <NUM>.

In this example, the computer program <NUM> is an interlocking software program of a railway network. Further, in this example, the parameters <NUM> are connection parameters of communication channels of the railway network. Connection parameters of the communication channels may be names, addresses and/or frequencies of the communication channels. Hence, the computer having the interlocking software program can be connected with a configurable number of communication channels. Particularly, the computer having the interlocking software program can be connected over a configurable number of communication channels with an equal number of other computers having other interlocking software programs.

During a configuration, a maximum number of parameters <NUM> is configurable. In this example, twenty-five parameters <NUM> are configurable. Further, during the configuration it is set how many parameters <NUM> are needed to be processed. The number of parameters to be processed <NUM> is less than the maximum number of configurable parameters <NUM>. The number of parameters to be processed <NUM> by the computer program <NUM> is set/configured within a configuration file <NUM>. In this example, five parameters <NUM> are needed to be processed. The configuration file <NUM> is loaded during the execution <NUM> of the computer program <NUM>, particularly during a start-up procedure of the computer program <NUM>. In this way, the parameters to be processed <NUM> are passed to the computer program <NUM>, particularly indirectly, by means of the configuration file <NUM>.

For the allocation of memory space for executing <NUM> the computer program <NUM>, the memory map <NUM> is used. The amount of memory space for executing <NUM> the computer program <NUM>, which is allocated, depends on the number of configurable parameters <NUM>.

In particular, the amount of allocated memory space is the maximum memory space, which is necessary for executing <NUM> the computer program <NUM> with the maximum number of configurable parameters <NUM> (here twenty-five).

Hence, memory space for twenty-five (configurable) parameters <NUM> is blocked within this example, even if only five parameters <NUM> are needed to be processed. Hence, memory space for twenty (unnecessary) parameters is not used - and, thus, wasted.

<FIG> shows another flow chart <NUM>. The flow chart describes the method for operating a computer according to the invention. Essentially identical elements to <FIG> are generally denoted by the same reference numbers.

Before executing a compiled computer program <NUM> on the computer, the following steps are done, by means of a software of the computer or of another computer:
It is determined <NUM>, how many input parameters <NUM> are needed to be processed by the computer program <NUM>. Thus, the first step is the determination <NUM> of the needed number of input parameters to be processed <NUM>. Further, a minimum amount of memory space on a storage device of the computer is determined <NUM>, that is necessary for executing the compiled computer program with the parameters to be processed <NUM>. Hence, the second step is the determination <NUM> of the minimum (necessary) amount of memory space. Moreover, the determined <NUM> minimum amount of memory space is allocated <NUM> statically for executing the computer program. Thus, the third step is the allocation <NUM> of the (determined <NUM>) minimum amount of memory space.

The method for operating the computer may comprise further steps. Further possible steps are, for instance, described in <FIG> and <FIG>.

<FIG> shows another flow chart <NUM> describing the method for operating a computer according to the invention. <FIG> schematically shows an adjustment of the memory map <NUM> according the memory allocation as shown in <FIG>. Thus, the following description regards to both, <FIG> and <FIG>.

Further, the following description refers to the example of <FIG> as well as to the embodiment of <FIG>. Essentially identical elements are generally denoted by the same reference numbers and not mentioned features are included in the following embodiment without being described again.

A compiled computer program <NUM> has been produced by a programmer. The programmer sets the memory map <NUM> of the computer program <NUM> (as described in <FIG>).

In this example the compiled computer program <NUM> is an interlocking software program of a railway network. Further, in this example, the configurable input parameters <NUM> are connection parameters of communication channels of the railway network.

During a configuration, a maximum number of input parameters <NUM> is configurable. Further, during the configuration the number of input parameters to be processed <NUM> is set/configured within a configuration file <NUM>. The number of input parameters to be processed <NUM> is less than the maximum number of configurable input parameters <NUM>.

In general, a maximum number (n) of configurable input parameters <NUM> (X1, X2,. Xn) can be set/configured within the configuration file <NUM>. The number (i, with i<n or i≤n) of input parameters to be processed <NUM> (X1,. Xi) is set during the configuration within the configuration file <NUM>. Thus, in general the configuration settings are X1,.

In this example, twenty-five input parameters <NUM> (here: Communication Channel <NUM>, Communication Channel <NUM>,. Communication Channel <NUM>) are configurable. In this example, five input parameters <NUM> (here: Communication Channel <NUM>,. Communication Channel <NUM>) are need to be processed.

A software, which may be stored at the computer as well, reads the configuration file <NUM>. The configuration file <NUM> comprised configuration settings, particularly the input parameters to be processed <NUM>. The software determines <NUM> the number of input parameters to be processed <NUM> from the configuration file <NUM>.

A minimum amount of memory space for executing the compiled computer program <NUM> with the input parameters to be processed <NUM> is determined <NUM>, by means of the software. Then, the determined minimum amount of memory space is allocated <NUM> statically for executing the computer program <NUM>, by means of the software.

The determined minimum amount of memory space is allocated <NUM> statically by adjusting <NUM> a memory map <NUM> of the computer program <NUM> (see especially <FIG>).

The memory map <NUM> is adjusted <NUM> according to the configuration settings of the configuration file <NUM>, particularly according to the set input parameters to be processed <NUM>. By means of the adjustment, the memory map <NUM> is reduced by the storage locations of the unnecessary input parameters <NUM>. Unnecessary input parameters <NUM> are any configurable input parameters <NUM>, which are not needed to be processed. In this example, unnecessary input parameters <NUM> are Communication Channel <NUM> up to Communication Channel <NUM>. In <FIG>, the unnecessary input parameters <NUM> of the memory map <NUM> are framed by a dashed line.

Accordingly, not only the number of input parameters to be processed <NUM> is determined <NUM>, but also unnecessary input parameters <NUM> are identified by means of the software.

By means of the adjustment <NUM>, the memory map <NUM> is updated by an adjusted memory map <NUM>. The adjusted memory map <NUM> comprises the storage locations of the computer program itself and/or of preconfigured items <NUM>. Moreover, the adjusted memory map <NUM> comprises the storage locations of the input parameters to be processed <NUM>. However, the adjusted memory map <NUM> does not comprise the storage locations of unnecessary input parameters <NUM>. In contrast, the storage locations of unnecessary input parameters <NUM> are removed from the adjusted memory map <NUM>. Hence, memory space is freed by means of the adjustment <NUM> and/or by means of the allocation <NUM>.

In this example, the (determined <NUM>) minimum amount of memory space is less than the maximum amount of memory space, which would be necessary for executing <NUM> the compiled computer program <NUM> with the maximum number of configurable input parameters <NUM>. In this way, the software reduces the amount of memory space to the minimum amount of memory space, which is necessary for executing <NUM> the compiled computer program <NUM> with the needed number of input parameters to be processed <NUM>. Hence, the amount of memory space, which is allocated <NUM> to the compiled computer program, is reduced by the invention.

The steps executed by the software are framed by a dashed line in <FIG>.

The configuration file <NUM> is loaded during the execution of the compiled computer program <NUM>, particularly during a start-up procedure <NUM> of the computer program <NUM>.

Within the start-up procedure <NUM> of the compiled computer program <NUM> it is checked <NUM>, if the determined minimum amount of memory space is available on the storage device of the computer. In this example, it is checked <NUM>, if the memory space for executing <NUM> the compiled computer program <NUM> with five parameters to be processed <NUM> is available. The check <NUM> is done by the computer program <NUM> itself.

If the determined amount of memory space is available on the storage device of the computer, the compiled computer program <NUM> is executed further/completely <NUM>.

If the determined amount of memory space is not available on the storage device of the computer, the compiled computer program is stopped <NUM> and an error message <NUM> will occur. to the compiled computer program, is reduced by the invention.

If the determined amount of memory space is not available on the storage device of the computer, the compiled computer program is stopped <NUM> and an error message <NUM> will occur.

Claim 1:
Method for operating a computer,
wherein, before executing (<NUM>) a computer program (<NUM>) on the computer,
- a programmer produces the computer program using a maximum number of configurable input parameters (<NUM>) and sets a memory map (<NUM>) of the computer program, where the memory map is a description that informs what areas of memory a compiler is directed to use to store input parameters (<NUM>) used within the compiled computer program;
- a number of input parameters (<NUM>) of the configurable input parameters (<NUM>) are configured to be processed, wherein the number of input parameters to be processed (<NUM>) is less than the maximum number of configurable input parameters (<NUM>);
the following steps are done by means of a software of the computer
- it is determined (<NUM>), how many input parameters (<NUM>) are needed to be processed by the computer program (<NUM>),
- a minimum amount of memory space of the computer is determined (<NUM>), that is necessary on the storage device of the computer for executing (<NUM>) the computer program (<NUM>) with the input parameters to be processed (<NUM>),
- the determined (<NUM>) minimum amount of memory space is allocated (<NUM>) statically for executing (<NUM>) the computer program (<NUM>);
- wherein
- the computer program is a compiled computer program and the compiled computer program (<NUM>) is an interlocking software program for controlling a railway network;
- it is checked (<NUM>), if the minimum amount of memory space is available on the storage device of the computer;
- if the minimum amount of memory space is available on the storage device of the computer, the compiled computer program (<NUM>) is executed (<NUM>)
- if the minimum amount of memory space is not available on the storage device of the computer, the compiled computer program (<NUM>) is not executed and/or the compiled computer program (<NUM>) is stopped (<NUM>);
- the minimum amount of memory space is allocated (<NUM>) statically by adjusting (<NUM>) a memory map (<NUM>) of the computer program (<NUM>) and the memory map (<NUM>) is adjusted (<NUM>) as the memory map (<NUM>) is reduced by storage locations of unnecessary parameters (<NUM>), where unnecessary input parameters (<NUM>) are any configurable input parameters (<NUM>) which are not needed to be processed.