Skip to content

Commit

Permalink
Other fixes to provenance
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvainhalle committed Jan 14, 2023
1 parent cf51e2f commit a758057
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
10 changes: 9 additions & 1 deletion Core/src/ca/uqac/lif/cep/functions/ApplyFunction.java
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Core/src/ca/uqac/lif/cep/functions/Constant.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
2 changes: 1 addition & 1 deletion Core/src/ca/uqac/lif/cep/functions/Cumulate.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);

}
}
Expand Down
2 changes: 1 addition & 1 deletion Core/src/ca/uqac/lif/cep/functions/StreamVariable.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit a758057

Please sign in to comment.