diff --git a/Core/src/ca/uqac/lif/cep/functions/ApplyFunction.java b/Core/src/ca/uqac/lif/cep/functions/ApplyFunction.java index cb9fdd7f..3866f60c 100755 --- a/Core/src/ca/uqac/lif/cep/functions/ApplyFunction.java +++ b/Core/src/ca/uqac/lif/cep/functions/ApplyFunction.java @@ -172,6 +172,10 @@ public void associateTo(int id, NodeFunction f, int out_stream_index, int out_st public void associateToInput(int id, int in_stream_index, int in_stream_pos, int out_stream_index, int out_stream_pos) { + if (in_stream_index > getInputArity()) + { + System.out.println("EILLE"); + } if (m_eventTracker != null) { m_eventTracker.associateToInput(getId(), in_stream_index, m_inputCount, @@ -183,7 +187,11 @@ public void associateToInput(int id, int in_stream_index, int in_stream_pos, public void associateToOutput(int id, int in_stream_index, int in_stream_pos, int out_stream_index, int out_stream_pos) { - // Nothing to do + if (m_eventTracker != null) + { + m_eventTracker.associateToOutput(getId(), in_stream_index, m_inputCount, + out_stream_index, m_outputCount); + } } @Override diff --git a/Core/src/ca/uqac/lif/cep/functions/Constant.java b/Core/src/ca/uqac/lif/cep/functions/Constant.java index d0bdf9e9..a9690207 100755 --- a/Core/src/ca/uqac/lif/cep/functions/Constant.java +++ b/Core/src/ca/uqac/lif/cep/functions/Constant.java @@ -62,7 +62,7 @@ public void evaluate(Object[] inputs, Object[] outputs, Context context, EventTr outputs[0] = m_value; if (tracker != null) { - tracker.associateToOutput(-1, 0, 0, 0, 0); + tracker.associateToInput(-1, 0, 0, 0, 0); } } diff --git a/Core/src/ca/uqac/lif/cep/functions/Cumulate.java b/Core/src/ca/uqac/lif/cep/functions/Cumulate.java index c701f7d0..04ad43df 100755 --- a/Core/src/ca/uqac/lif/cep/functions/Cumulate.java +++ b/Core/src/ca/uqac/lif/cep/functions/Cumulate.java @@ -67,7 +67,7 @@ protected boolean compute(Object[] inputs, Object[] outputs) // ...and to the previous output event // -1 and -2 since the count has already been incremented by the // call to super.compute() above - associateToInput(j, m_outputCount - 2, k, m_outputCount - 1); + associateToOutput(j, m_outputCount - 2, k, m_outputCount - 1); } } diff --git a/Core/src/ca/uqac/lif/cep/functions/StreamVariable.java b/Core/src/ca/uqac/lif/cep/functions/StreamVariable.java index 1ae28c4a..5735ce59 100755 --- a/Core/src/ca/uqac/lif/cep/functions/StreamVariable.java +++ b/Core/src/ca/uqac/lif/cep/functions/StreamVariable.java @@ -108,7 +108,7 @@ public void evaluate(Object[] inputs, Object[] outputs, Context context, EventTr outputs[0] = inputs[m_index]; if (tracker != null) { - tracker.associateToOutput(-1, m_index, 0, 0, 0); + tracker.associateToInput(-1, m_index, 0, 0, 0); } }