Where clause in Preceded_by
La propriété Heating
Heating: Temp t preceded_by Heat hh where t.v1 > 100;
lève une exception sur le fichier test_trace.json et ne s'évalue pas correctement sur le fichier small_trace.json.
Dans l'interpréteur de Partrap, cela se bloque.
Ci-dessous les messages d'erreur que j'obtiens. Je joins le fichier partrap et deux traces qui devraient toutes deux renvoyer OK.OtherExamples.partrapsmall_trace.jsontest_trace.json
13:31:16.711 [INFO] *********** Evaluating property : 'Heating'**********
----- Trace file : 'small_trace.json' :
Evaluating the pattern on the scope from : 0 to : 6::
The environment is : null
after composite :
resultspath : C:/Users/ledru/workspaces/EclipsePhotonPartrap/MyPartrapProject/results/OtherExamples/Heating/Heating_small_trace.txt
13:31:16.727 [WARNING] False on trace small_trace.json:
Heating: Temp t preceded_by Heat hh where t.v1 > 100;
The property 'Heating' is executed on trace 'C:/Users/ledru/workspaces/EclipsePhotonPartrap/MyPartrapProject/traces/small_trace.json'
The property 'Heating' is false Scope from 1 to 7 with the environment null
An empty scope is found with the environment{t={trace_occ_index=1, time=1.447204242753E9, id=Temp, v1=40.22}}
-Before the event t : {trace_occ_index=2, time=1.447204816611E9, id=Temp, v1=41.44},
No event t of type 'Heat' and satisfying the condition 't.v1 > 100' is found
13:32:04.756 [INFO] *********** Evaluating property : 'Heating'**********
----- Trace file : 'test_trace.json' :
Evaluating the pattern on the scope from : 0 to : 19::
The environment is : null
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 20, Size: 20
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at partrap.util.Short_Result_Explanation.explain(Short_Result_Explanation.java:85)
at OtherExamples.Heating.evaluate_prop(Heating.java:344)
at OtherExamples.Heating.execute_on_tree(Heating.java:215)
at OtherExamples.Heating.main(Heating.java:170)