Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lifeware
biocham
Commits
a1d1a828
Commit
a1d1a828
authored
Nov 06, 2019
by
Mathieu Hemery
Browse files
Merge branch 'develop' into feature/Hybrid
parents
5b549e3d
1d9537b4
Changes
6
Hide whitespace changes
Inline
Side-by-side
biocham_jupyter/guinbextension/src/config/workflows/commands.py
View file @
a1d1a828
...
...
@@ -34,6 +34,7 @@ commands = [
"compile_from_expression"
,
"compile_from_pivp"
,
"compile_program"
,
"compile_program_file"
,
"compile_transfer_function"
,
"compile_wgpac"
,
"continue"
,
...
...
conservation_laws.plt
View file @
a1d1a828
...
...
@@ -49,7 +49,7 @@ test(
setup(set_some_conservations),
cleanup(clear_model),
true(Conservations ==
'[0] a-a+2*a\n[1] b-b+2*b\n[2] c-c+2*c\n')
'[0]
\'
a-a
\'
+2*a\n[1]
\'
b-b
\'
+2*b\n[2]
\'
c-c
\'
+2*c\n')
]
) :-
with_output_to(atom(Conservations), command(list_conservations)).
...
...
influence_editor.pl
View file @
a1d1a828
...
...
@@ -174,7 +174,7 @@ list_model_influences :-
).
prolog
:
error_
message
(
not_an_influence_model
)
-->
prolog
:
message
(
error
(
not_an_influence_model
)
)
-->
[
'Not an influence model'
].
...
...
@@ -278,7 +278,7 @@ print_influence(_Id, Item) :-
(
Item
=
(
Force
for
BasicInfluence
)
->
format
(
'~
w
for '
,
[
Force
])
format
(
'~
p
for '
,
[
Force
])
;
BasicInfluence
=
Item
),
...
...
@@ -294,15 +294,15 @@ print_influence(_Id, Item) :-
(
Inputs
=
(
PositiveInputs
/
NegativeInputs
)
->
format
(
'~
w
/ ~
w
'
,
[
PositiveInputs
,
NegativeInputs
])
format
(
'~
p
/ ~
p
'
,
[
PositiveInputs
,
NegativeInputs
])
;
Inputs
=
(
/
NegativeInputs
)
->
format
(
'/ ~
w
'
,
[
NegativeInputs
])
format
(
'/ ~
p
'
,
[
NegativeInputs
])
;
write
(
Inputs
)
),
format
(
' ~w ~
w
'
,
[
Arrow
,
Output
]).
format
(
' ~w ~
p
'
,
[
Arrow
,
Output
]).
substract_list
([],
Difference
,
Difference
).
...
...
models.pl
View file @
a1d1a828
...
...
@@ -498,10 +498,22 @@ print_item(Id) :-
->
G
;
w
rit
e
(
Item
)
p
ri
n
t
(
Item
)
).
% make it so that print/1 does not quote things that look like a variable
user
:
portray
(
Thing
)
:-
atom
(
Thing
),
catch
(
read_term_from_atom
(
Thing
,
Term
,
[]),
_
,
fail
),
\
+
compound
(
Term
),
!,
write
(
Thing
).
:-
dynamic
(
deleting
/
1
).
...
...
@@ -635,34 +647,20 @@ inherits(Id, AncestorId) :-
).
prolog
:
error_message
(
cannot_inherit_from_itself
)
-->
[
'Cannot inherit from itself.'
].
prolog
:
message
(
error
(
cannot_inherit_from_itself
))
-->
[
'Cannot inherit from itself.'
].
prolog
:
error_message
(
already_inherits
)
-->
[
'There is already such an inheritance relation.'
].
prolog
:
message
(
error
(
already_inherits
))
-->
[
'There is already such an inheritance relation.'
].
prolog
:
error_message
(
cannot_inherit_from_descendant
)
-->
[
'Cannot inherit from descendant.'
].
prolog
:
error_message
(
kind_mismatch
(
Ident
,
Kind
,
NeededKind
)
)
-->
{
format
(
atom
(
Message
),
'There is a mismatch between the uses of ~a: ~a and ~a.'
,
[
Ident
,
Kind
,
NeededKind
]
)
},
[
Message
].
prolog
:
message
(
error
(
cannot_inherit_from_descendant
))
-->
[
'Cannot inherit from descendant.'
].
prolog
:
message
(
error
(
kind_mismatch
(
Ident
,
Kind
,
NeededKind
)))
-->
[
'There is a mismatch between the uses of ~a: ~a and ~a.'
-
[
Ident
,
Kind
,
NeededKind
]].
inherits_from
(
Id
,
AncestorId
)
:-
...
...
namespace.pl
View file @
a1d1a828
...
...
@@ -50,17 +50,10 @@ check_identifier_kind(Ident, NeededKind) :-
).
prolog
:
error_
message
(
already_defined_with_another_kind
(
Ident
,
Kind
,
NeededKind
)
prolog
:
message
(
error
(
already_defined_with_another_kind
(
Ident
,
Kind
,
NeededKind
)
)
)
-->
{
format
(
atom
(
Message
),
'~a cannot be ~a because it is already used as ~a.'
,
[
Ident
,
NeededKind
,
Kind
]
)
},
[
Message
].
[
'~a cannot be ~a because it is already used as ~a.'
-
[
Ident
,
NeededKind
,
Kind
]].
...
...
@@ -76,29 +69,24 @@ check_no_free_identifiers :-
->
true
;
throw
(
error
(
not_defined
(
FreeIdents
)
,
check_no_free_identifiers
))
throw
(
error
(
not_defined
(
FreeIdents
)))
).
prolog
:
error_
message
(
not_defined
(
FreeIdents
))
-->
prolog
:
message
(
error
(
not_defined
(
FreeIdents
))
)
-->
{
with_output_to
(
atom
(
Message
),
(
FreeIdents
=
[
FreeIdent
]
->
format
(
'~a is not defined.'
,
[
FreeIdent
])
;
write_successes
(
member
(
FreeIdent
,
FreeIdents
),
write
(
', '
),
write
(
FreeIdent
)
),
write
(
' are not defined.'
)
)
)
findall
(
'~a'
,
member
(
_
,
FreeIdents
),
As
),
atomic_list_concat
(
As
,
', '
,
Format
),
(
FreeIdents
=
[
_
]
->
Verb
=
'is'
;
Verb
=
'are'
),
atomic_list_concat
([
Format
,
Verb
,
'not defined'
],
' '
,
FullFormat
)
},
[
Message
].
[
FullFormat
-
FreeIdents
].
update_identifier_kinds
(
ModelId
)
:-
...
...
reaction_editor.pl
View file @
a1d1a828
...
...
@@ -179,7 +179,7 @@ list_model_reactions :-
).
prolog
:
error_
message
(
not_a_reaction_model
)
-->
prolog
:
message
(
error
(
not_a_reaction_model
)
)
-->
[
'Not a reaction model'
].
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment