Skip to content
Snippets Groups Projects
Commit 5d7f9317 authored by Alexander Diewald's avatar Alexander Diewald
Browse files

Safety: Prepare for unused code removal.

* Remove the SFF value provider. An "equivalent Safety Level" will be introduced for hardware elements later.
* Keep the ProbabilityFailuresDemand- and ProbabilityFailuresHourValueProvider(s) for use in a more complex safety analysis.
* Keep the HwComplexityValueProvider for describing simple HW voters (useful for safety analysis).
refs 3240
parent 2e3ab4a7
No related branches found
No related tags found
No related merge requests found
Showing
with 22 additions and 51 deletions
......@@ -11,12 +11,6 @@
<!-- Value providers for the annotation classes -->
<extension
point="org.fortiss.tooling.base.annotation">
<annotation
binding="org.fortiss.af3.safety.annotation.valueprovider.SafeFailureFractionValueProvider">
<modelElementClass
modelElementClass="org.fortiss.af3.platform.model.ExecutionUnit">
</modelElementClass>
</annotation>
<annotation binding="org.fortiss.af3.exploration.alg.annotation.valueprovider.ComponentImplDiversityRefValueProvider">
<modelElementClass modelElementClass="org.fortiss.af3.component.model.Component"/>
</annotation>
......
Partition.java 3f643bea0eb26cb7528b7dbcae6b957cac081125 RED
Partition.java b870fdd306818d8195b662daee9546feebb28e18 RED
PartitionMappingEncoding.java 91d0233fc1e2301b40cc955defa82dafadc724df RED
PartitionMappingEntry.java 16130a3bd2f157c4f5f5ef6cb91d1b72137f0acd RED
......@@ -52,10 +52,4 @@ public class Partition implements IExecutionUnitAdapter<Partition>, IRequestAdap
// TODO No associated Object with a name at the moment.
return null;
}
/** {@inheritDoc} */
@Override
public double getSafeFailureFraction() {
return 0.0;
}
}
......@@ -5,4 +5,4 @@ DeadlineConstraintEvaluator.java a023d233a2ee768cef573a67e06ae1fe0b53ddbe RED
IConstraintEvaluator.java bca49bbdea5e089b0d045fc356ceedcb466df55e RED
MappingEvaluatorConstraint.java fec8cf995cbafa433235f8f6715bc5183c2f8ba3 RED
PeriodConstraintEvaluator.java 52dc75180579f154a514816223461e27cb9ca84d RED
SafetyIntegrityLevelConstraintEvaluator.java 74260b0b2b1c5a2f4a0de41d24a993a8e0dca65d RED
SafetyIntegrityLevelConstraintEvaluator.java 34018532882a83860e35aa5bb102735c5be5772b RED
......@@ -140,19 +140,21 @@ public class SafetyIntegrityLevelConstraintEvaluator<S extends InstantiatedTaskM
// an execution unit, according to the tables given in IEC 61508-2.
List<SIL> parallelSILs = new ArrayList<SIL>();
for(IExecutionUnitAdapter<?> ecu : hwReplica) {
double sff = ecu.getSafeFailureFraction();
if(sff >= 0.0 && sff < 0.6) {
parallelSILs.add(SIL.SIL0);
} else if(sff < 0.9) {
parallelSILs.add(SIL.SIL1);
} else if(sff < 0.99) {
parallelSILs.add(SIL.SIL2);
} else if(sff <= 1.0) {
parallelSILs.add(SIL.SIL3);
} else {
throw new RuntimeException(
"An invalid value for the safe failure fraction has been given to the optimization. The allowed range is 0 to 1.");
}
// TODO: Update the SafetyAnalysis Evaluator with comparable SILs.
// double sff = ecu.getSafeFailureFraction();
// if(sff >= 0.0 && sff < 0.6) {
// parallelSILs.add(SIL.SIL0);
// } else if(sff < 0.9) {
// parallelSILs.add(SIL.SIL1);
// } else if(sff < 0.99) {
// parallelSILs.add(SIL.SIL2);
// } else if(sff <= 1.0) {
// parallelSILs.add(SIL.SIL3);
// } else {
// throw new RuntimeException(
// "An invalid value for the safe failure fraction has been given to the optimization.
// The allowed range is 0 to 1.");
// }
}
// Determine the overall SIL of the safety function considering the hardware replication.
......
ICommunicationResourceAdapter.java 54dd128bfa04c5cfd16551eec8983e712636f86a RED
IDeployableComponentAdapter.java 68b34853bd6f88201f68eb369d70be41e8870266 RED
IExecutionUnitAdapter.java 580a75672bfc7cbd72b008ee6a73b6ba17eb4dec RED
IExecutionUnitAdapter.java bdef41e1f32b3e4940af175609d789d25472bc0e RED
IGatewayUnitAdapter.java 5f806d2907ee461938eea14238572311572ecf81 RED
ILogicalArchitectureAdapter.java 7570a2adab987260e74bc255fcf21862a820226e RED
IMemoryUnitAdapter.java 588840b8237bd23a048a69961ffe985caf3b425b RED
......
......@@ -22,9 +22,5 @@ package org.fortiss.af3.exploration.alg.dse.sysmodel.arch;
* @author barner
*/
public interface IExecutionUnitAdapter<T> extends IResourceAdapter<T> {
/**
* Returns the SafeFailureFraction of an execution unit. This value is required for calculating
* the safety level of a task for a given allocation.
*/
double getSafeFailureFraction();
// Marker interface.
}
AF3DeployableComponentAdapter.java 12703eb580d9c8e09e2c4660db114f38e3b12c20 RED
AF3ExecutionUnitAdapter.java dec17015851a49c65aa9518722d73f00f1e6d442 RED
AF3ExecutionUnitAdapter.java 95b1d4b3e933372e5e45e41ecd4e2730f823bcc5 RED
AF3GatewayAdapter.java f61ab5ff2fa58f561ea6720ba1add06c0d1f437e RED
AF3LogicalArchitectureAdapter.java b129b15fefcd1864df1d2584f2ca0820ef6600c4 RED
AF3MemoryUnitAdapter.java 4737c88556ab6274f19c8b31196870063e800b9d RED
......
......@@ -15,12 +15,9 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.exploration.alg.dse.sysmodel.arch.af3;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.pickFirstInstanceOf;
import org.fortiss.af3.exploration.alg.dse.sysmodel.arch.IDeployableComponentAdapter;
import org.fortiss.af3.exploration.alg.dse.sysmodel.arch.IExecutionUnitAdapter;
import org.fortiss.af3.platform.model.ExecutionUnit;
import org.fortiss.af3.safety.model.annotation.SafeFailureFraction;
/**
* Adapter between AF3 {@link ExecutionUnit} (=deployment target of
......@@ -28,11 +25,8 @@ import org.fortiss.af3.safety.model.annotation.SafeFailureFraction;
*
* @author barner
*/
public class AF3ExecutionUnitAdapter extends AF3ResourceAdapter<ExecutionUnit> implements
IExecutionUnitAdapter<ExecutionUnit> {
/** Execution unit safe failure fraction annotation. */
private SafeFailureFraction safeFailureFraction;
public class AF3ExecutionUnitAdapter extends AF3ResourceAdapter<ExecutionUnit>
implements IExecutionUnitAdapter<ExecutionUnit> {
/**
* Creates a {@link IExecutionUnitAdapter} for an {@link ExecutionUnit}.
*
......@@ -45,14 +39,5 @@ public class AF3ExecutionUnitAdapter extends AF3ResourceAdapter<ExecutionUnit> i
public AF3ExecutionUnitAdapter(ExecutionUnit executionUnit, Double failureProb)
throws Exception {
super(executionUnit, failureProb);
safeFailureFraction =
pickFirstInstanceOf(SafeFailureFraction.class, executionUnit.getSpecifications());
}
/** {@inheritDoc} */
@Override
public double getSafeFailureFraction() {
return safeFailureFraction.getValue();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment