Open leuschel opened 1 year ago
The error message with "not ASSIGNMENT" is also misleading. The error also appears when using just the predicate:
In Tcl/Tk it works; maybe because it uses the B Parser and not the Event-B parser?? Also, in ProB2UI the expression newTemperatureT((21|->Kelvin)) does not work in the B Console.
Actually, ProB2UI also works when we open the Rodin model via the .eventb file and not directly from Rodin.
The archive is available at examples/EventBPrologPackages/Toulouse/Mendil/TemperatureAggregatorPrefix.zip
In Console for model loaded directly from Rodin .bum file:
ProB B-Console
EventB> x=newTemperatureT((21|->Kelvin))
Could not parse formula:
Parsing predicate failed because: Preconditions for this extended operator are not fulfilled
Preconditions for this extended operator are not fulfilled
Parsing expression failed because: Preconditions for this extended operator are not fulfilled
Preconditions for this extended operator are not fulfilled
Parsing substitution failed because: Unknown operator: (expected to find an assignment operator)
Unknown operator: (expected to find an assignment operator)
Code: x=newTemperatureT((21|->Kelvin))
Unicode translation: x=newTemperatureT((21↦Kelvin))
After loading .eventb file:
Model loaded: T_TemperatureMachinePrefix_mch
EventB> x=newTemperatureT((21|->Kelvin))
TRUE (x = newTemperatureT((21↦Kelvin)))
EventB>
The console uses the current state space to execute expressions. It might not have been fully initialized?
For the model T_TemperatureMachinePrefix_mch.eventb in prob_examples/examples/EventBPrologPackages/Toulouse/Mendil the execute by predicate command does not work when providing values for the parameter. On the other hand, writing a predicate like unit(para)=Celsius works.