Commit 1cfcc645 authored by Mathieu Hemery's avatar Mathieu Hemery

Improve hidden_molecule detection

parent caeea3c3
......@@ -871,7 +871,25 @@ substitute_all(K, X, Xm, In, Out) :-
% hidden_molecules(+Expression, -Species)
%
% Detect the implicit species in an expression
% Detect the implicit molecules in an expression
% Note that we search for hidden molecules at the monomial level to avoid false alert with
% simple degradation.
hidden_molecules(Expr-Monom, S) :-
!,
(
hidden_molecules(Expr, S)
;
hidden_molecules(Monom, S)
).
hidden_molecules(Expr+Monom, S) :-
!,
(
hidden_molecules(Expr, S)
;
hidden_molecules(Monom, S)
).
hidden_molecules(Expression, K-X-Y) :-
(
......
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