Mentions légales du service

Skip to content
Snippets Groups Projects
Name Last commit Last update
biocham_jupyter
conda
devdoc
doc
library
modules
tmpnb
web
.editorconfig
.gitignore
.gitlab-ci.yml
.gitmodules
Build_on_Windows.md
LICENSE
Makefile
README.md
about.pl
aliases.pl
aliases.plt
analog_digital.pl
analysis.pl
arithmetic_rules.pl
arithmetic_rules.plt
biocham.bib
biocham.pl
biocham.plt
c_compiler.pl
commandline.pl
conservation_laws.pl
conservation_laws.plt
counters.pl
ctl.bct
ctl.pl
doc.pl
events.pl
filename.pl
foltl.pl
foltl.plt
formal_derivation.pl
formal_derivation.plt
functions.pl
functions.plt
glucose.py
gpac.pl
gpac.plt
graph_editor.pl
graph_editor.plt
graphviz.pl
gsl.pl
gsl.plt
hybrid.pl
hybrid.plt
influence_editor.pl
influence_editor.plt
influence_graphs.pl
influence_properties.pl
influence_properties.plt
influence_rules.pl
initial_state.pl
initial_state.plt
install.sh
invariants.pl
junit.pl
kinetics.pl
lazy_negation.pl
lazy_negation.plt
lazy_negation_gpac.pl
lazy_negation_gpac.plt
lemon.pl
logo.png
markov.pl
matrix.pl
matrix.plt
models.pl
models.plt
molecules.pl
molecules.plt
multistability.pl
multistability.plt
multistability_command.pl
namespace.pl
numerical_simulation.pl
numerical_simulation.plt
nusmv.pl
nusmv.plt
objects.pl
ode.pl
ode.plt
odefunction.pl
odefunction.plt
oscilations.pl
pac_learning.pl
pac_learning.plt
parameters.pl
parameters.plt
part1.pl
pattern_reduction.pl
pattern_reduction.plt
plot.pl
qual_files.pl

pipeline status coverage report License

Biocham

This README file is mostly aimed at people contributing to Biocham

Getting Started

After git clone you might need to run once the install.sh script in order to install all build dependencies and to try to compile the project.

After that make will build the whole project, including documentation, tests, debug version, etc., which might be quite slow. You might want to use make biocham, make biocham_debug (a SWI-Prolog toplevel with all biocham files loaded) or make test_<unit> (to run a single test unit) for faster feedback.

Note that make test will give you, if available, some test coverage estimation, and that make test_<unit> will attempt to get into more details about which clauses were not covered (but this highly depends on the SWIPL version).

Documentation

The file toc.org is used for three things:

  • for creating the Biocham runtime from the source code, by defining the order in which the source files have to be loaded;
  • for generating the Biocham documentation in the directories doc and devdoc (from annotations in the source code using the runtime for running the examples), by defining the order of the sections and their title;
  • for generating the Biocham notebook and web interface with the same structure as the documentation.

It is also recommended to use PlDoc comments, the resulting documentation is in doc/pldoc.

Documentation example

In the odefunction.pl file:

  • a module is defined for the add_function command that is then exported;

  • the devdoc goal creates a new section in the developer's documentation (in the loading order fixed by toc.org)

  • the predicate add_function is then defined:

add_function(FunctionList) :-
  % the biocham command has a variable number of arguments treated like a list
  biocham_command(*),
  type(FunctionList, '*'(term = term)),
  % it will appear in the `doc/index.html` file with an example that will be
  % executed and inserted
  doc('
    adds reactions to compute the result of a function of the current variables in the concentration of a new variable at steady state.
    \\begin{example}
  '),
  biocham_silent(clear_model),
  biocham(present(x,1)),
  biocham(present(y,3)),
  biocham(add_function(z=x+y)),
  biocham(list_reactions),
  biocham(list_ode),
  doc('
    \\end{example}
  ),
  % now comes the proper Prolog implementation
  new_ode_system(OdeSystem),
  export_ode(FunctionList, OdeSystem),
  import_reactions_from_ode_system(OdeSystem),
  delete_item(OdeSystem).

Tests

All .plt files are executed as test programs. See for instance odefunction.plt.

General stuff

There is an EditorConfig file that specifies indentation settings and such: .editorconfig, please make your editor aware of it.

It might be a good idea to follow Prolog programming guidelines.

We tend to use GitFlow as our branching model, see our internal Wiki for more details.