The list hereafter is a summary of the guidelines, to quickly check a program. Some are requirements, others are only recommendations. This document details and explains the guidelines later.
main(), algorithmic and auxiliary code in different files
This document is the official IPOL Software Guidelines, version 1.04, published on May 14th, 2018. It is immediately applicable and obsoletes previous versions. The reference version is available at https://tools.ipol.im/wiki/ref/software_guidelines/.
When needed, future versions of this document will be published and will replace the current version. The current version will still be available, with a summary of the differences. This revision will be announced on the IPOL website and the IPOL discussion list.
Changes from version 1.02:
These guidelines are designed for a research journal whose articles include some software material. They are written for IPOL, but may be used by others.
In this document, the term “published software” designates the reference software implementation of an algorithm submitted for publication in a journal article. The “web demo” is an online facility used to test this software. An article may contain more than one software, and a demo may use more than one software.
In this document, the words must, must not, should, should not, recommended, and may are used to express required, recommended, and optional items. IETF RFC2119 describes their interpretation, and Annex A adds details in the context of these guidelines.
This document is licensed under a CC-BY License. It can be freely reused and modified as long as its origin is credited. Modified versions must be mentioned as such and not misrepresented as the original IPOL version.
A published software must be packaged as a compressed archive file. This file archive can either be a single volume .ZIP compressed archive or a GZIP compressed tar archive1. In the remainder of this document, we will use the terms “zip archive” and “tar/gzip archive” for convenience.
Annex B of this document provides some examples of programs that can be used to produce such compressed archives.
The compressed archive file of a published software must be named according to the
name_version.extension pattern, where:
versionmust consist only of lower case letters (
a-z), digits (
0-9), minus (
-) and period (
namemust indicate the name of the program; this name can be the name of the executable program file, or another name, at the author’s will;
versionmust start with a digit; it must indicate a version number for the program, in the sense that two different releases of the program must have two different version numbers; if no version numbering scheme is established for the program, the
YYYYMMDDpattern based on the year, month and day of the release date may be used;
zipfor zip archives and
tgzfor tar/gzip archives.
All the files and folders extracted from the compressed archive must be located inside a base folder named
version are identical to those used for the compressed archive file name. Absolute path must not be used for files and folders extracted from the archive.
The name of all files and folders composing the published software must consist only of lower or upper case letters (
A-Z), digits (
0-9), minus (
-), underscore (
_) and period (
.) signs. They should start with a letter.
The names should provide a meaningful hint of the content of these files and folders.
A published software should not include hidden files or folders or by-products of the tools used by the authors, such as (but not limited to):
The software should not be distributed with files not useful to build, use or study the implementation of the algorithm published in the journal.
A published software must include all the material necessary to build one or more executable program files implementing the algorithm published in the journal. This material must be provided in human-readable source code form. A published software must not be distributed with binary precompiled files if these files can be obtained from source code2.
Annex C provides some information for the authors to help them perform some frequent implementation tasks.
The source code of a published software must follow the published standard syntax of one or more programming languages.
The source code of a published software must not require any extension of the language or its standard library, or any resource specific to a hardware environment, operating system or compiler. These extensions and resources may be used to achieve better performances if they are available but their availability must be detected during the compilation or execution and an alternative portable implementation must be used in their absence. This includes (but is not limited to)
C:\Documents and Settings,
Special attention will be given to the Linux 64-bit environment because it is currently the primary environment for the web demos. But the program must also be usable in other environments and this portability must not be limited to the Win32/POSIX alternative.
A published software must not use external software components except for the libraries and APIs listed hereafter. The program may expect these basic software components to be correctly installed and configured during the compilation and execution:
libtiffversion 3.x or 4.x and
libpngversion 1.4.x to read and write files, with their dependencies
fftwversion 3.x (single and double precision) for Fourier transforms;
libgslversion 1.14+ for mathematical routines.
libeigenversion 3.x for linear algebra3.
clapackfor linear algebra.
Other libraries can be examined and may be added to this list on request, if they are portable, widely used, with a stable API.
This restriction only applies to software components used by the published software but not distributed in source form with the program. Other libraries can be used if provided with the published software, as detailed in the next section.
Authors may include some code from other software projects and libraries in their published software to reuse standard and well-defined algorithmic blocks, if it helps improve the quality of the implementation. This support code must follow the current implementation guidelines: distributed in source form, written in a standard programming language, portable, automatically compiled, without external dependencies except for the ones allowed.
To be reusable, the published software should only use the support code via calls to algorithmic functions, and should not be based on it. The function calls to this code should be clearly identified, with a description of their expected behavior.
This support code should be kept as small as possible; a huge library should not be involved for a tiny algorithm: to compute the eigenvalues of a 2×2 matrix, authors should not use a linear algebra library.
A published software should be minimal and only perform the algorithm published in the journal. It must be usable from the command line environment without any user interaction, taking all its parameters from the command line.
Annex C provides some information for the authors to help them use external libraries to read and write images.
The program must not need more than 30 seconds to process typical data. For slow algorithms, this limit may be achieved with parallel processing or a limit on input size.
Annex C provides some information for the authors to help them improve the performance of their implementation and check the memory used.
Every source code file in a published software must mention its authors in a copyright attribution line at the top of the file. This mention may be omitted in trivial files such as header code.
Every person whose contribution to this file is not trivial and implies some creative work must be credited. Of course, if the authors use or modify a file previously written by other persons, the copyright attribution to the previous authors must not be removed. The copyright attribution must include the years of production of the work, the full name and an e-mail address for contributor. It may also include other relevant information such as the employer, affiliation or web site.
An simple example for a single author can be:
Copyright (C) 2011, Jane Doe <email@example.com>
A complex example with three contributors can be:
Copyright (C) 1998-2003, Taro Yamada <firstname.lastname@example.org> Copyright (C) 2005-2011, Juan Perez <email@example.com> Copyright (C) 2011, Marie Untel, ENS Cachan <firstname.lastname@example.org>
When the authors are aware or suspect that a source code file implements an algorithm which might be linked to a patent (the main algorithm published in the journal or another algorithm used for this implementation), a patent warning must be inserted after the copyright attribution, in every file potentially linked to this patent. This wording is recommended:
This file implements an algorithm possibly linked to the patent <REFERENCE OF THE PATENT>. This file is made available for the exclusive aim of serving as scientific tool to verify the soundness and completeness of the algorithm description. Compilation, execution and redistribution of this file may violate patents rights in certain countries. The situation being different for every country and changing over time, it is your responsibility to determine which patent rights restrictions apply to you before you compile, use, modify, or redistribute this file. A patent lawyer is qualified to make this determination. If and only if they don't conflict with any patent terms, you can benefit from the following license terms attached to this file.
Every source code file must mention a usage and redistribution license after the copyright attribution (and patent warning for algorithms potentially linked to a patent). Of course, if the authors use or modify a file previously written by other persons, the license chosen by the previous authors must not be modified.
These wordings are recommended:
This program is free software: you can use, modify and/or redistribute it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. You should have received a copy of this license along this program. If not, see <http://www.gnu.org/licenses/>. This program is free software: you can use, modify and/or redistribute it under the terms of the simplified BSD License. You should have received a copy of this license along this program. If not, see <http://www.opensource.org/licenses/bsd-license.html>. To the extent possible under law, the authors have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty. You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. This program is provided for research and education only: you can use and/or modify it for these purposes, but you are not allowed to redistribute this work or derivative works in source or executable form. A license must be obtained from the patent right holders for any other use.
The exact terms can differ, for example when a different GPL/LGPL/AGPL license version is chosen. The full text of the license must be included in a separate file with the source code.
Authors should verify that the usage of these licenses for their software publications complies with their employer policy and local situation and jurisdiction.
Every published software must provide a file named
README.txt in the base folder and written in plain text and in English. This
README.txt file must include the following essential information, in any order:
If this information is too long, the
README.txt file may be split: compilation instructions in
INSTALL.txt, usage instructions and example in
USAGE.txt, changes in the software in
CHANGES.txt and list of files in
MANIFEST.txt. These secondary information files must be referenced in
README.txt file may contain other information, and may also be completed by another documentation, possibly with more details, in text, PDF, HTML or any other format.
For a simple code, the license information in
README.txt can be
This program is written by Jane Doe <email@example.com> and distributed under the terms of the GPLv3 license.
A complex case (multiple authors, patents and licenses) can be:
This program is written by Taro Yamada <firstname.lastname@example.org> and Juan Perez <email@example.com> with contributions from Marie Untel, ENS Cachan <firstname.lastname@example.org>. - mmatch.c and rot_tree.c may be linked to the pending EU patent 123.456 by Taro Yamada and Juan Perez and are provided for scientific and education only. - demoz.c may be linked to the US patent 65.43.21 by Jane Doe; see the file for license terms. - eizo.c and linalg_lib.c are distributed under the terms of the BSD license. - All the other files are distributed under the terms of the LGPLv3 license.
In a published software, the source code is a primary material for the publication. It will be reviewed, published and read like any other part of the article. The authors must take care of the clarity of their program.
The source code of a published software must be consistently indented and spaced. Lines should be limited to 80 characters and should not end with blank characters (spaces, tabs, …). Files should not have more than 1000 lines. The line terminations should be the same (DOS/Windows
CRLF or UNIX
CR style) for all the files of the program.
Functions should be grouped by abstraction level in different source code files:
main()function, command-line processing and input/output calls in one file,
Annex D provides some examples of programs that can be used to improve the indentation, spacing and presentation of a source code.
The source code of a published software must be commented precisely and exhaustively. Authors should target the “1/8 comment/instruction ratio”, but the quality of the comments is more important than the quantity. The source code must be written in English, including all variables, functions names and comments.
Authors must ensure that the code is understandable, to the satisfaction of the editor and reviewers, so that consistency between the description of the algorithm and its implementation can be verified. The relation between each part of the implementation and the respective part of the description of the algorithm must be explained in the comments.
Authors should apply simpler implementations when available, follow the conventions of the programming language, and use comments to explain implementation choices and every complicated or subtle point in the program. Clarity is more important than virtuosity.
Every function must be documented with at least one line explaining what the function is doing, and the meaning of its parameters and return value.
The Doxygen source code documentation format is recommended for every published software.
Annex D provides some examples of programs that can be used to count the comment, instruction and blank lines.
The authors should provide an example of input file to test the published software and the result to expect when this input file is processed by the program.
The key words must, must not, required, shall, shall not, should, should not, recommended, may, and optional in this document are to be interpreted as described in IETF RFC2119.
No article will be published if a program included in this article doesn’t follow such requirements or prohibitions.
The rationale for not following such recommendations must be agreed by the authors, reviewers and editor before an article is accepted for publication.
These file formats are defined by the PKZIP APPNOTE specification, version 6.3.2, for the .ZIP compressed archive format, the IETF RFC1952 for the GZIP compressed format, and the POSIX.1 ustar definition for the tar archive format.↩
If the authors want to distribute binary versions, they can do it in the journal as supplementary material but not via the compressed archive of the published software covered by these guidelines.↩
Only the “official” Eigen modules are allowed, no code form the “unsupported” experimental section.↩
Distribution “for research and education” can help avoid conflicts between patent rights and software license when the patent inventors are the source code authors. It is not needed in other situations because the validity of the license will depend on the local patent regulations, as stated in the last sentence of the patent warning.↩