Commit ea097da5 authored by Thierry Martinez's avatar Thierry Martinez

Fixed syntax \\ -> /. But warning: priorities are wrong...

parent 62febb13
......@@ -216,18 +216,18 @@ inputs(PositiveInputEnum, PositiveInputList, []) :-
->
true
;
PositiveInputEnum \= (_ \ _),
PositiveInputEnum \= (\ _)
PositiveInputEnum \= (_ / _),
PositiveInputEnum \= (/ _)
),
list_enumeration(PositiveInputList, PositiveInputEnum),
!.
inputs(\ NegativeInputEnum, [], NegativeInputList) :-
inputs(/ NegativeInputEnum, [], NegativeInputList) :-
list_enumeration(NegativeInputList, NegativeInputEnum),
!.
inputs(
PositiveInputEnum \ NegativeInputEnum,
PositiveInputEnum / NegativeInputEnum,
PositiveInputList,
NegativeInputList
) :-
......
......@@ -6,12 +6,12 @@
test(
'add_influence',
[Influences == [(a, b \ c -> d), (b -< c), (\ a -< a)]]
[Influences == [((a, b) / c -> d), (b -< c), (/ a -< a)]]
) :-
clear_model,
command((a, b \ c -> d)),
command(((a, b) / c -> d)),
command(b -< c),
command(\ a -< a),
command(/ a -< a),
all_items([kind: influence], Influences).
test(
......@@ -40,7 +40,7 @@ test(
test(
'influence builds',
[Influence == (2 for a, b \ c -> d)]
[Influence == (2 for (a, b) / c -> d)]
) :-
influence(Influence, 2, [a, b], [c], +, d).
......@@ -52,7 +52,7 @@ test(
test(
'influence builds with negative inputs',
[Influence == (\ a -< a)]
[Influence == (/ a -< a)]
) :-
influence(Influence, 'MA'(1), [], [a], -, a).
......@@ -71,7 +71,7 @@ test(
]
) :-
influence(
(2 for a, b \ c -> d),
(2 for (a, b) / c -> d),
Force,
PositiveInputs,
NegativeInputs,
......@@ -97,7 +97,7 @@ test(
result('MA'(1), [], [a], -, a)
]
) :-
influence((\ a -< a), Force, PositiveInputs, NegativeInputs, Sign, Output).
influence((/ a -< a), Force, PositiveInputs, NegativeInputs, Sign, Output).
test(
'compute_ode_for_influence_model',
......
......@@ -8,8 +8,7 @@
enumeration/1,
op(1050, xfx, (->)),
op(1050, xfx, (-<)),
op(1025, xfx, (\)),
op(1025, fx, (\))
op(1025, fx, (/))
]
).
......@@ -49,12 +48,12 @@ basic_influence(Inputs -< Output) :-
:- grammar(inputs).
inputs(PositiveInputs \ NegativeInputs) :-
inputs(PositiveInputs / NegativeInputs) :-
enumeration(PositiveInputs),
enumeration(NegativeInputs).
inputs(\ NegativeInputs) :-
inputs(/ NegativeInputs) :-
enumeration(NegativeInputs).
......
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