Project

General

Profile

Feature #3541

AF3 Phoenix - Change Request #4013: [UI] Collection task SWT based views -> JavaFX-based views

Feature #3434: [JavaFX] Migration of the DSE Perspective to JavaFX

Feature #3446: [JavaFX] Migrate and Rework the Synthesis view

Basic integration of the new Synthesis View

Added by Alexander Diewald almost 2 years ago. Updated 17 days ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Start date:
10/02/2018
Due date:
% Done:

100%

Estimated time:
10.00 h

Description

Goals

  • The number of synthesis buttons is reduced to one.
  • The scheduling and the deployment synthesis can be started from the GUI with default setings and one selected RuleSet.

Steps

  • The synthesis fxml file and the corresponding controller class is present in the exploration.ui plugin.
  • Reduce the three synthesis buttons to one and connect it to the new synthesis view.
  • Add basic control logic to show ExplorationTargets.
  • Add basic control logic to show the RuleSets.
  • Add control logic to create RuleSets.
  • Add control logic to trigger the backend execution.
ACC_bug3.af3_23 (1.09 MB) ACC_bug3.af3_23 Simon Barner, 09/04/2020 05:05 PM
ACC-bug8.af3_23 (460 KB) ACC-bug8.af3_23 Simon Barner, 09/10/2020 11:15 AM

Related issues

Related to Feature #3338: Enhance stopping criteria for DSE backendsRejected03/20/2018

History

#1 Updated by Alexander Diewald over 1 year ago

  • Target version changed from AF3 2.15 RC1 (Feature Freeze) to AF3 2.15 RC1 (Feature Freeze)

#2 Updated by Johannes Eder over 1 year ago

  • Target version changed from AF3 2.15 RC1 (Feature Freeze) to AF3 2.16 RC1 (Feature Freeze)

#3 Updated by Alexander Diewald 12 months ago

  • Target version changed from AF3 2.16 RC1 (Feature Freeze) to AF3 2.17 (Feature Freeze)

#4 Updated by Alexander Diewald 12 months ago

  • Related to Feature #3338: Enhance stopping criteria for DSE backends added

#5 Updated by Alexander Diewald 11 months ago

  • Priority changed from Normal to High

#6 Updated by Alexander Diewald 8 months ago

  • Status changed from New to Rejected

#7 Updated by Alexander Diewald 8 months ago

Duplicate of #3446

#8 Updated by Alexander Diewald 8 months ago

  • Status changed from Rejected to New

#9 Updated by Alexander Diewald 6 months ago

  • Target version changed from AF3 2.17 (Feature Freeze) to AF3 2.18 - Feature Freeze

#10 Updated by Alexander Diewald about 1 month ago

  • Status changed from New to Resolved
  • Assignee changed from Alexander Diewald to Johannes Eder
  • % Done changed from 0 to 100

MRs:

Testing:
Take the ACC example, set the PerdiodicConstraint limit to "200" to avoid infeasible DSE scheduling setups.

Testing will use two variants of the ACC example, one where no allocations are defined, one where tasks are allocated to exec units are defined before the import into a DSE project.

  • Model without existing tast to exec unit allocation:
    • Import, run a deployment exploration, select the solution, run a schedule exploration, export the model, save the AF3 project, check the console.
    • Import, run a joint deployment & schedule exploration, export the model, save the AF3 project, check the console.
    • Import, create an objective and a constraint, define rule sets, run a deployment exploration, export the model, save the AF3 project, check the console.
  • Model with existing tast-to-exec unit allocations:
    • Import, run a schedule exploration, export the model, save the AF3 project, check the console.
    • Import, run a deployment exploration, select the solution, run a schedule exploration, export the model, save the AF3 project, check the console.
    • Import, run a joint deployment & schedule exploration, export the model, save the AF3 project, check the console.
    • Import, create an objective and a constraint, define rule sets, run a deployment exploration, export the model, save the AF3 project, check the console.

#11 Updated by Alexander Diewald 26 days ago

  • Assignee changed from Johannes Eder to Simon Barner

#12 Updated by Simon Barner 24 days ago

Bug 1: Inconvenient renaming of Rule set

  • Import model
  • Create at least one deployment constraint
  • Synthesis -> Deployment -> Create Rule Set
  • Long click on "New Rule Set" -> Assign new name
  • Problem: one has to hit ENTER to set the new name. Modern UI would use the new value when the edit field looses the focus again

#13 Updated by Simon Barner 24 days ago

Bug 2: Crash when adding constraint to constraint rule set

  • Import model
  • Create at least two deployment constraints
  • Select one contraint
  • Synthesis -> Deployment -> Create Rule Set
  • Select the other constraint and the new rule set
  • Hit Add to button and observe below Exception

Please also be sure to fix this for objective rule sets (untested)

Caused by: java.lang.IllegalStateException: Cannot modify resource set without a write transaction
    at org.eclipse.emf.transaction.impl.TransactionChangeRecorder.assertWriting(TransactionChangeRecorder.java:349)
    at org.eclipse.emf.transaction.impl.TransactionChangeRecorder.appendNotification(TransactionChangeRecorder.java:303)
    at org.eclipse.emf.transaction.impl.TransactionChangeRecorder.processObjectNotification(TransactionChangeRecorder.java:285)
    at org.eclipse.emf.transaction.impl.TransactionChangeRecorder.notifyChanged(TransactionChangeRecorder.java:241)
    at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:424)
    at org.eclipse.emf.ecore.util.EcoreEList.dispatchNotification(EcoreEList.java:249)
    at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUnique(NotifyingListImpl.java:304)
    at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:304)
    at org.fortiss.af3.exploration.ui.perspective.synthesis.SynthesisFXContentController.onAddConstraintRuleSet(SynthesisFXContentController.java:355)

#14 Updated by Simon Barner 24 days ago

Bug 3: NPE in SMT transformation

  • Import model (resulting model is attached)
  • Create a function coupling constraint (I tested with 4 tasks, 3 of which are known)
    • Task_SpeedPlausibilization
    • Task_<
    • Task_Const,
    • T...; ...
  • Create a function decoupling constraint
    • Task_ThreshLow
    • Task_&&
  • Select both constraints
  • Add them to a new rule set
  • Select rule set
  • Check feasibility
  • Observe below crash

-> Please move this to a separate ticket if this problem is not related to the UI

Error executing DSE:
null.
java.lang.NullPointerException
com.microsoft.z3.Context.checkContextMatch(Context.java:3974)
com.microsoft.z3.Context.mkFuncDecl(Context.java:480)
com.microsoft.z3.Z3javaAPIWrapper.createFunction(Z3javaAPIWrapper.java:98)
org.fortiss.af3.exploration.smt.modeltransformation.DSMLTransformationService.getAllocateFunction(DSMLTransformationService.java:466)
org.fortiss.af3.exploration.smt.modeltransformation.DefaultExpressionTransformator.createAllocationExpression(DefaultExpressionTransformator.java:324)
org.fortiss.af3.exploration.smt.modeltransformation.DefaultExpressionTransformator.createLocationExpression(DefaultExpressionTransformator.java:234)
org.fortiss.af3.exploration.smt.modeltransformation.DefaultExpressionTransformator.toSMTBoolean(DefaultExpressionTransformator.java:184)
org.fortiss.af3.exploration.smt.modeltransformation.DefaultExpressionTransformator.transform(DefaultExpressionTransformator.java:109)
org.fortiss.af3.exploration.smt.modeltransformation.ConstraintTransformationAdapter.transform(ConstraintTransformationAdapter.java:97)
org.fortiss.af3.exploration.smt.modeltransformation.NonQuantifiedExpressionTransformator.toQuantifier(NonQuantifiedExpressionTransformator.java:80)
org.fortiss.af3.exploration.smt.modeltransformation.NonQuantifiedExpressionTransformator.transform(NonQuantifiedExpressionTransformator.java:62)
org.fortiss.af3.exploration.smt.modeltransformation.ConstraintTransformationAdapter.transform(ConstraintTransformationAdapter.java:97)
org.fortiss.af3.exploration.smt.modeltransformation.NonQuantifiedExpressionTransformator.toQuantifier(NonQuantifiedExpressionTransformator.java:80)
org.fortiss.af3.exploration.smt.modeltransformation.NonQuantifiedExpressionTransformator.transform(NonQuantifiedExpressionTransformator.java:62)
org.fortiss.af3.exploration.smt.modeltransformation.ConstraintTransformationAdapter.transform(ConstraintTransformationAdapter.java:97)
org.fortiss.af3.exploration.smt.modeltransformation.DSMLtoSMTTransformator.extractSMTExpr(DSMLtoSMTTransformator.java:242)
org.fortiss.af3.exploration.smt.modeltransformation.DSMLtoSMTTransformator.transform(DSMLtoSMTTransformator.java:169)
org.fortiss.af3.exploration.smt.solver.SolverRun.<init>(SolverRun.java:124)
org.fortiss.af3.exploration.smt.solver.DeploymentRun.<init>(DeploymentRun.java:55)
org.fortiss.af3.exploration.smt.backend.Z3Backend.executeDSE(Z3Backend.java:97)
org.fortiss.af3.exploration.service.internal.DSEBackendService$1.run(DSEBackendService.java:176)
org.eclips

#15 Updated by Simon Barner 24 days ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Simon Barner to Alexander Diewald

Intermediate fixing of the 3 bugs suggested.

#16 Updated by Alexander Diewald 20 days ago

  • Assignee changed from Alexander Diewald to Simon Barner

Bug 1 & 2 are resolved. Bug 1 was way simpler to solve than initially thought.

Bug 3 could not be reproduced if the model is copied to the runtime workspace manually. It could be reproduced by using the import wizard, but the provided model is corrupted in that case. A separate ticket has been already created: #4059. Please retry after updating to the tip of the branch.

IMPORTANT: There are also changes in the plugin org.fortiss.af3.exploration that were not reviewed yet. The review comments in exploration.ui are addressed.

#17 Updated by Simon Barner 19 days ago

Bug 4: Changes to a RuleSet are not reflected in the DSE Navigator. They are only visible after saving and reloading the DSE configuration into the perspective.

In particular
  • Renaming a Rule Set
  • Adding a constraint to a rule set. This is particularly important since the DSE Navigator is the only way to view a previously created rule set. If you agree with the idea, please add another (feature) ticket to highlight the respective constraints/objectives when selecting a rule set in the table on the right-hand side

#18 Updated by Simon Barner 19 days ago

Bug 5: "Create Rule Set >> " and "Add to..." are not disabled (greyed out) when the respective constraint/objective lists are empty

In particular, this is the case when the synthesis type is not selected yet.

#19 Updated by Simon Barner 19 days ago

Bug 6: Data dictionary is named "null - Schedule" in first test case

Perform first test case, i.e.:
  • Model without existing tast to exec unit allocation:
    • Import, run a deployment exploration, select the solution, run a schedule exploration, export the model, save the AF3 project, check the console.

#20 Updated by Simon Barner 19 days ago

Bug 7: Erroneous schedule in second test case: all tasks are assigned to the same ECU, and all but one tasks have phase 0

  • Model without existing tast to exec unit allocation:
    • Import, run a joint deployment & schedule exploration, export the model, save the AF3 project, check the console.

#21 Updated by Simon Barner 19 days ago

Bug 8: Crash in 6th test case:

  • Model with existing tast-to-exec unit allocations:
    • Import, run a joint deployment & schedule exploration, export the model, save the AF3 project, check the console
(See ACC-bug8.af3_23 for reference). The only changes to the model were
  • Set timing constraint to 200
  • Define Task -> ECU allocations (in existing allocation table)

Stack trace

Error executing DSE:
class com.microsoft.z3.IntNum cannot be cast to class com.microsoft.z3.RatNum (com.microsoft.z3.IntNum and com.microsoft.z3.RatNum are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @299376de).
class com.microsoft.z3.IntNum cannot be cast to class com.microsoft.z3.RatNum (com.microsoft.z3.IntNum and com.microsoft.z3.RatNum are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @299376de)
org.fortiss.af3.exploration.smt.modeltransformation.DSMLtoSMTTransformator.computeSchedule(DSMLtoSMTTransformator.java:291)
org.fortiss.af3.exploration.smt.solver.DeploScheduleRun.transformSolution(DeploScheduleRun.java:111)
org.fortiss.af3.exploration.smt.solver.SolverRun.convertSolutionModels(SolverRun.java:249)
org.fortiss.af3.exploration.smt.solver.SolverRun.solveNonOptimized(SolverRun.java:458)
org.fortiss.af3.exploration.smt.solver.SolverRun.solve(SolverRun.java:167)
org.fortiss.af3.exploration.smt.backend.Z3Backend.executeDSE(Z3Backend.java:116)
org.fortiss.af3.exploration.service.internal.DSEBackendService$1.run(DSEBackendService.java:176)
org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Note that the joint deplo+sched synthesis does not crash if no predefined task -> HW allocation exists (i.e. in test case 2)

#22 Updated by Alexander Diewald 18 days ago

  • Status changed from Feedback to Resolved
  • Assignee changed from Alexander Diewald to Simon Barner

All bugs are resolved.

Bug 8 could not be reproduced. The stack trace indicates that it is related to bug 7.

#23 Updated by Simon Barner 17 days ago

  • Assignee changed from Simon Barner to Johannes Eder
  • Priority changed from High to Normal

I confirm that bugs 1, 2, 4, 5, 6, 7 have been fixed. 8 seemed indeed to be related to 7, and for 3 a dedicated ticket has been created.

Merged, thanks for your efforts!

Please close.

#24 Updated by Alexander Diewald 17 days ago

  • Status changed from Resolved to Closed
  • Assignee deleted (Johannes Eder)

Also available in: Atom PDF