Commit 3e5c40d2 authored by SOLIMAN Sylvain's avatar SOLIMAN Sylvain
Browse files

pldoc

parent 4c376390
/** <module> Influence graph export in Lemon graph format
*
* Lemon is a C++ graph library, lgf is its input format
* @author Sylvain Soliman
* @license GPL
* @copyright Inria EPI Lifeware 2018
*/
:- module(
lemon,
[
......@@ -6,10 +13,14 @@
]
).
:- use_module(doc).
% :- use_module(doc).
:- use_module(counters).
%! export_lemon_graph(+OutputFile) is det.
%
% exports the current influence graph to OutputFile (adding '.lgf' extension
% if needed)
export_lemon_graph(OutputFile) :-
automatic_suffix(OutputFile, '.lgf', write, FilenameLgf),
setup_call_cleanup(
......@@ -19,6 +30,9 @@ export_lemon_graph(OutputFile) :-
).
%! export_lemon_stream(+Stream) is det.
%
% exports the current influence graph to the given Stream
export_lemon_stream(Stream) :-
setup_call_cleanup(
new_graph(GraphId),
......@@ -30,9 +44,17 @@ export_lemon_stream(Stream) :-
).
%! species(-Species, -Uid) is nondet.
%
% stores a unique identifier Uid for each Species
:- dynamic(species/2).
%! export_lemon_stream(+Id, +Stream) is det.
%
% exports the graph associated to Id to the stream Stream
%
% @tbd export conservation laws
export_lemon_stream(Id, Stream) :-
write(Stream, '@nodes\nlabel\tspecies\n'),
set_counter(species, 0),
......@@ -74,10 +96,18 @@ export_lemon_stream(Id, Stream) :-
write(Stream, '@attributes\n').
%! reactions(-Reaction, -Uid) is nondet.
%
% stores a unique identifier Uid for each Reaction
:- dynamic(reactions/2).
% TODO handle reverse reactions
%! number_reactions is det.
%
% associates a unique number to each reaction
% such that reaction that are stoichiometrically inverse get opposite numbers
%
% @tbd handle reverse reactions
number_reactions :-
retractall(reactions(_, _)),
set_counter(reactions, 0),
......@@ -90,5 +120,8 @@ number_reactions :-
).
%! sign(+Atom, -Number) is det.
%
% associates number Number to a sign Atom
sign('+', 1).
sign('-', -1).
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