NPE in (pure) deployment synthesis
Steps to reproduce
- File menu ->Import the attached model
- Switch to DSE perspective
- Import DSE configuration: Home ->Select / Change Project -> ACC ->NEW DSE ->Finish
- Switch to _Deployment Synthesis
- Select Rule Set “x” (contains a single HW cost minization objective)
- Generate
- Observe below NPE
java.lang.NullPointerException
at org.fortiss.af3.exploration.smt.modeltransformation.DSMLTransformationService.getFunctionForLeftSideType(DSMLTransformationService.java:513)
at org.fortiss.af3.exploration.smt.modeltransformation.DSMLTransformationService.getAllocFunctionForLeftSideType(DSMLTransformationService.java:523)
at org.fortiss.af3.exploration.smt.modeltransformation.ConstraintToNonQuantifiedSMT.createAllocationExpression(ConstraintToNonQuantifiedSMT.java:345)
at org.fortiss.af3.exploration.smt.modeltransformation.ConstraintToNonQuantifiedSMT.toSMTBoolean(ConstraintToNonQuantifiedSMT.java:209)
at org.fortiss.af3.exploration.smt.modeltransformation.ConstraintToNonQuantifiedSMT.toSMT(ConstraintToNonQuantifiedSMT.java:140)
at org.fortiss.af3.exploration.smt.modeltransformation.ConstraintToNonQuantifiedSMT.toSMTBinder(ConstraintToNonQuantifiedSMT.java:178)
at org.fortiss.af3.exploration.smt.modeltransformation.ConstraintToNonQuantifiedSMT.toSMT(ConstraintToNonQuantifiedSMT.java:136)
at org.fortiss.af3.exploration.smt.modeltransformation.ConstraintToNonQuantifiedSMT.toSMTBinder(ConstraintToNonQuantifiedSMT.java:173)
at org.fortiss.af3.exploration.smt.modeltransformation.ConstraintToNonQuantifiedSMT.toSMT(ConstraintToNonQuantifiedSMT.java:136)
at org.fortiss.af3.exploration.smt.modeltransformation.ConstraintToNonQuantifiedSMT.transfrom(ConstraintToNonQuantifiedSMT.java:129)
at org.fortiss.af3.exploration.smt.modeltransformation.DSMLtoSMTTransformator.transform(DSMLtoSMTTransformator.java:193)
at org.fortiss.af3.exploration.smt.modeltransformation.SolverRun.solveOptimized(SolverRun.java:323)
at org.fortiss.af3.exploration.smt.modeltransformation.SolverRun.solve(SolverRun.java:192)
at org.fortiss.af3.exploration.smt.backend.Z3Backend.executeDSE(Z3Backend.java:85)
at org.fortiss.af3.exploration.service.internal.DSEBackendService$1.run(DSEBackendService.java:164)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:60)
Analysis
-
org.fortiss.af3.exploration.smt.modeltransformation.DSMLTransformationService.allocations
is not populated -
FuncDecl getAllocateFunction(EnumSort leftSort, EnumSort rightSort)
does this on the fly - However,
FuncDecl getAllocFunctionForLeftSideType(IModelElement leftSort)
(where the bug occurs), doesn’t
(from redmine: issue id 3641, created on 2019-02-15, closed on 2019-02-25)
- Uploads: