Commit 2eeb290d authored by FAGES Francois's avatar FAGES Francois

devcom

parent b80f50c3
......@@ -71,8 +71,10 @@ format_doc_html(document_opening(Title)) :-
h5 {font-family: "Courier New"; font-size: 1.1em; font-weight: normal; }
div.indented {margin-left: 1cm; }
div.example {margin-left: 1cm; }
blockquote.gray {color : gray; }
blockquote.red {color : red; }
blockquote {color : gray; }
blockquote.FF {color : red; }
blockquote.SS {color : orange; }
blockquote.TM {color : green; }
</style>
<body>
<h1>~a</h1>
......@@ -195,9 +197,21 @@ format_doc_html(end(emph)) :-
!,
format('</em>', []).
format_doc_html(begin(paragraph)) :-
!,
format('<div>', []).
format_doc_html(end(paragraph)) :-
!,
format('</div>', []).
format_doc_html(begin(quote)) :-
!,
format('<blockquote class="red"><em><strong>Comment. </strong>', []).
format('<blockquote><em>', []).
format_doc_html(quoteAuthor(Author)) :- % patch for author color
!,
format('</em></blockquote><blockquote class="~a"><em><strong>Comment. </strong>', [Author]).
format_doc_html(end(quote)) :-
!,
......@@ -486,11 +500,23 @@ format_doc_tex(end(emph)) :-
format_doc_tex(begin(quote)) :-
!,
format('\\color{red}\\begin{quote}\\emph{\\bold{Comment. }', []).
format('\\color{gray}\\begin{quotation}', []).
format_doc_tex(quoteAuthor(Author)) :-
!,
format('\\color{~a}\\emph{\\bold{Comment. }}', [Author]).
format_doc_tex(end(quote)) :-
!,
format('}\\end{quote}\\color{black}', []).
format('\\end{quotation}\\color{black}', []).
format_doc_tex(begin(paragraph)) :-
!,
format('\n\n', []).
format_doc_tex(end(paragraph)) :-
!,
format('\n\n', []).
format_doc_tex(begin(texttt)) :-
!,
......@@ -1032,14 +1058,26 @@ generate_body_item_stream(SourceStream, Type) :-
generate_clause(Clause, Variables, VariableNames, Type) :-
(
(
Clause = (:- doc(Contents))
Clause = (:- doc(Content)),
atom_concat('\\begin{paragraph}',Content,A),
atom_concat(A,'\\end{paragraph}',Contents)
;
Clause = (:- devdoc(Contents)),
Clause = (:- devdoc(Content)),
atom_concat('\\begin{paragraph}',Content,A),
atom_concat(A,'\\end{paragraph}',Contents),
Type = devdoc
;
Clause = (:- devcom(Comment)),
atom_concat('\\begin{quote}',Comment,BC),
atom_concat(BC,'\\end{quote}',Contents),
((atom_chars(Comment,[A1,A2|_]),'A'@=<A1,A1@=<'Z','A'@=<A2,A2@=<'Z')
->
atom_chars(Author,[A1,A2])
;
Author='gray'
),
atom_concat('\\begin{quote}\\quoteAuthor{',Author,A),
atom_concat(A,'}',B),
atom_concat(B,Comment,C),
atom_concat(C,'\\end{quote}',Contents),
Type = devdoc
)
->
......@@ -1487,7 +1525,11 @@ write_doc_chars(['~' | Tail]) :-
write_doc_chars([Char | Tail]) :-
format_doc(char(Char)),
write_doc_chars(Tail).
write_doc_chars(Tail),
!.
write_doc_chars(Argument):-
throw(error(doc_parsing(Argument))).
parse_latex_command(Chars, Command, Argument, Tail) :-
......@@ -1600,6 +1642,14 @@ write_command(begin, quote) :-
!,
format_doc(begin(quote)).
write_command(quoteAuthor, Author) :-
!,
format_doc(quoteAuthor(Author)).
write_command(begin, paragraph) :-
!,
format_doc(begin(paragraph)).
write_command(item, Argument) :-
!,
close_opened_li,
......@@ -1625,6 +1675,10 @@ write_command(end, quote) :-
!,
format_doc(end(quote)).
write_command(end, paragraph) :-
!,
format_doc(end(paragraph)).
write_command(section, Argument) :-
!,
nb_getval(current_counters, Counters),
......@@ -1638,8 +1692,8 @@ write_command(cite, Argument) :-
!,
format_doc(cite(Argument)).
write_command(Command, _Argument) :-
throw(error(unknown_command(Command))).
write_command(Command, Argument) :-
throw(error(unknown_command((Command,Argument)))).
close_opened_li :-
......
......@@ -22,6 +22,9 @@
:- devdoc('\\section{Commands}').
:-devcom('FF: I am not sure we should separate reaction models and influence models, and exclude hybrid reaction-influence models. We have shown in our CMSB 2016 paper the encoding of influence systems into reaction systems. Arguments against it welcome !').
:- devcom('FF: For several reasons, I am wondering whether we should automatically introduce kinetic parameters k_1, k_2, etc. for the default mass action law kinetics of reactions given without kinetic expression. The same could go for initial_state concentrations which BTW should be definable by parameters or functions, introducing concentration parameters c_1, c_2, etc. for present molecules. The pros are an encouragement to use parameters, parameter search, sensitivity and robustness analyses. The cons are are an irrelevant encouragement for logical models until it becomes relevant. ').
add_reaction(Reaction) :-
biocham_command,
......
......@@ -13,6 +13,11 @@
:- devdoc('\\section{Commands}').
:- devcom('FF: It would be nice to have a notion of input/output and draw graphs accordingly, with inputs on top and outputs bottom in all (reaction or influence) graphs.
The input species could be those present at initial_state. The output species could be those not reactant (nor catalyst) of any reaction, nor source of any nfluence.
Alternatively we could have input/output annotations on molecular species. It could be useful also for some analyses.').
reaction_graph :-
biocham_command,
......
......@@ -19,7 +19,7 @@
- types.pl
* Syntax of Biocham Influence Systems
- influence_rules.pl
* Syntax of Biocham Temporal Properties
* Syntax of Biocham Behavioral Properties
** Boolean temporal logic CTL
- ctl.pl
** First-order numerical temporal logic FOLTL(R)
......
......@@ -17,19 +17,15 @@
]).
:- devdoc('\\section{Commands}').
quit :-
biocham_command,
doc('quits the interpreter.'),
halt.
:- doc('
The exhaustive list of Biocham commands avaiable at toplevel is described in the following sections.
New reactions and new influences can also be entered directly at toplevel, as a short hand for the commands \\texttt{add_reaction} and \\texttt{add_influence} respectively.
').
:- doc('
Some commands (e.g., \\command{numerical_simulation/1}) take named options
Some commands (e.g., \\command{numerical_simulation/1} in the example below) take named options
as arguments.
All the options can either be defined either locally for a single command or
All the options can be defined either locally for a single command or
globally for the whole model.
Options can be defined for a single command
by adding additional arguments of the form \\texttt{Option: Value}.
......@@ -48,11 +44,19 @@ quit :-
Local options take precedence over global options.
').
:- devdoc('\\section{Commands}').
list_options :-
biocham_command,
doc('lists the set of options defined in the current model.'),
list_items([kind: option]).
quit :-
biocham_command,
doc('quits the interpreter.'),
halt.
:- devdoc('\\section{Public API}').
......
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