Commit e06285a2 authored by FAGES Francois's avatar FAGES Francois
Browse files

suppression of g++ warnings because of deprecated PPL

parent caa05b66
......@@ -34,7 +34,9 @@ compile_cpp_program(SourceFiles, Options, ExecutableFilename) :-
),
compile_program(
CXX, SourceFiles,
['--std=c++11', '-Dtypeof(x)=decltype(x)' | Options],
%FF no warning of deprecated PPL code
% ['--std=c++11', '-Dtypeof(x)=decltype(x)' | Options],
['-w', '--std=c++11', '-Dtypeof(x)=decltype(x)' | Options],
ExecutableFilename
).
......
......@@ -51,7 +51,11 @@ Rq: The distinction between pivp_string and pivp_list is not always obvious.
:- use_module(reaction_rules).
:- use_module(util).
:- doc('The Turing completeness of continuous CRNs \\cite{FLBP17cmsb} states that any computable function over the reals can be computed by a CRN over a finite set of molecular species. Biocham uses the proof of that result to compile any computable real function presented as the solution of a polynomial differential equation system into a finite CRN.').
:- doc('The Turing completeness of continuous CRNs \\cite{FLBP17cmsb} states that any computable function over the reals can be computed by a CRN over a finite set of molecular species. Biocham uses the proof of that result to compile any computable real function presented as the solution of a polynomial differential equation system with polynomial initial values (PIVP) into a finite CRN.').
:- doc('The compilation from mathematical expression is restricted to some standard functions and simple operations using a functional notation where \\texttt{id} represents the operand.').
:- doc('The compilation from PIVPs is implemented in full generality').
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......@@ -82,7 +86,8 @@ compile_from_expression(Expr, Output) :-
type(Expr, arithmetic_expression),
type(Output, name),
doc('
creates a biochemical reaction network such that Output = Expr(time).
creates a biochemical reaction network such that Output = Expr(time).
The expression is restricted to standard functions and simple operations using a functional notation where \\texttt{id} represents the time operand.
'),
option(
binomial_reduction,
......@@ -119,9 +124,11 @@ compile_from_expression(Expr, Input, Output) :-
type(Input, name),
type(Output, name),
doc('
creates a biochemical reaction network to compute the function Output = Expr(Input).'),
creates a biochemical reaction network to compute the function Output = Expr(Input).
The expression is restricted to standard functions and simple operations using a functional notation where \\texttt{id} represents the operand.
'),
doc('
The Input species is initialized with the value of a special parameter named input, and is degraded by the computation.
The Input species is initialized with the value of a special parameter named input. This species may be degraded by the computation.
'),
option(
binomial_reduction,
......@@ -154,7 +161,19 @@ compile_from_expression(Expr, Input, Output) :-
:- doc('
\\begin{example} Compilation of the expression cos(time):\n
').
:- biocham(compile_from_expression(cos, cos)).
:- biocham(compile_from_expression(cos, costime)).
:- biocham(list_model).
:- biocham(numerical_simulation(time:10)). %, method:msbdf)).
:- biocham(plot).
:- doc('
\\end{example}
').
:- doc('
\\begin{example} Compilation of the expression cos(time):\n
').
:- biocham(compile_from_expression(cos+1, costime1)).
:- biocham(list_model).
:- biocham(numerical_simulation(time:10)). %, method:msbdf)).
:- biocham(plot).
......@@ -166,7 +185,7 @@ compile_from_expression(Expr, Input, Output) :-
:- doc('
\\begin{example} Compilation of the expression cos(x) and computation of cos(4):\n
').
:- biocham(compile_from_expression(cos, x, cos)).
:- biocham(compile_from_expression(cos, x, cosx)).
:- biocham(list_model).
:- biocham(parameter(input = 4)).
:- biocham(numerical_simulation(time:10)). %, method:msbdf)).
......@@ -179,6 +198,83 @@ compile_from_expression(Expr, Input, Output) :-
:- doc('One can also compile real valued functions defined as solutions of Polynomial Initial Value Problems (PIVP), i.e. solutions of polynomial differential equations, using the following syntax:').
% Definition of the various grammars used in this module:
% pivp, pode, polynomial and monomial
% the tagging ':- grammar(_)' is here for the documentation
%! pivp(+Expression)
%
% Test if the expression correspond to a valid PIVP_string
:- grammar(pivp).
pivp((X;Y)):-
pivp(X),
pivp(Y).
pivp((X,Y)):-
number(X),
pode(Y).
%! pode(+Expression)
%
% Test if the expression correspond to a valid pODE
:- grammar(pode).
pode((d(X)/dt = Y)):-
name(X),
polynomial(Y).
%! polynomial(+Expression)
%
% Test if the expression correspond to a valid polynomial
:- grammar(polynomial).
polynomial(+ X):-
polynomial(X).
polynomial(- X):-
polynomial(X).
polynomial(X + Y):-
polynomial(X),
polynomial(Y).
polynomial(X - Y):-
polynomial(X),
monomial(Y).
polynomial(X):-
monomial(X).
%! monomial(+Expression)
%
% Test if the expression correspond to a valid monomial
:- grammar(monomial).
monomial(X ^ Y):-
name(X),
number(Y).
monomial(X * Y):-
monomial(X),
monomial(Y).
monomial(X) :-
number(X).
monomial(X) :-
name(X).
%! compile_from_pivp(+PIVP_string, +Output)
%
% biocham command
......@@ -267,81 +363,6 @@ compile_from_pivp(PIVP, Input, Output) :-
').
% Definition of the various grammars used in this module:
% pivp, pode, polynomial and monomial
% the tagging ':- grammar(_)' is here for the documentation
%! pivp(+Expression)
%
% Test if the expression correspond to a valid PIVP_string
:- grammar(pivp).
pivp((X;Y)):-
pivp(X),
pivp(Y).
pivp((X,Y)):-
number(X),
pode(Y).
%! pode(+Expression)
%
% Test if the expression correspond to a valid pODE
:- grammar(pode).
pode((d(X)/dt = Y)):-
name(X),
polynomial(Y).
%! polynomial(+Expression)
%
% Test if the expression correspond to a valid polynomial
:- grammar(polynomial).
polynomial(+ X):-
polynomial(X).
polynomial(- X):-
polynomial(X).
polynomial(X + Y):-
polynomial(X),
polynomial(Y).
polynomial(X - Y):-
polynomial(X),
monomial(Y).
polynomial(X):-
monomial(X).
%! monomial(+Expression)
%
% Test if the expression correspond to a valid monomial
:- grammar(monomial).
monomial(X ^ Y):-
name(X),
number(Y).
monomial(X * Y):-
monomial(X),
monomial(Y).
monomial(X) :-
number(X).
monomial(X) :-
name(X).
:- devdoc('
The internal data structure for PIVPs (Polynomial differential equations
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment