CIF explorer crashes on models with function-typed discrete variables without an initial value
CIF model:
automaton a:
disc func bool(bool) f2; // A dummy function is created for the default initial value.
location:
initial;
end
Running the CIF explorer on this model, with the 'enable report' option enabled, gives:
java.lang.NullPointerException: Cannot invoke "org.eclipse.escet.common.position.metamodel.position.PositionObject.eContainer()" because "parent" is null
at org.eclipse.escet.cif.common.CifTextUtils.getAbsName(CifTextUtils.java:1340)
at org.eclipse.escet.cif.common.CifTextUtils.getAbsName(CifTextUtils.java:1277)
at org.eclipse.escet.cif.common.CifEvalUtils.objToStr(CifEvalUtils.java:1706)
at org.eclipse.escet.cif.explorer.runtime.BaseState.printDebug(BaseState.java:267)
at org.eclipse.escet.cif.explorer.app.ExplorerApplication.writeReportOutput(ExplorerApplication.java:215)
at org.eclipse.escet.cif.explorer.app.ExplorerApplication.runInternal(ExplorerApplication.java:325)
at org.eclipse.escet.common.app.framework.Application.runApplication(Application.java:315)
at org.eclipse.escet.common.app.framework.Application.run(Application.java:180)
at org.eclipse.escet.common.eclipse.ui.BaseFileCommandHandler.run(BaseFileCommandHandler.java:261)
at org.eclipse.escet.common.eclipse.ui.BaseFileCommandHandler$1.run(BaseFileCommandHandler.java:102)
at java.base/java.lang.Thread.run(Thread.java:840)
The CIF explorer creates functions for the default values of function-typed variables, to store in the state objects. These objects have no name, and are not contained in the specification. Hence, getting their absolute name fails.