Commit f4282122 authored by tempiaa's avatar tempiaa

Solved repainting bug of safety properties due to trimmed spaces

parent ecfbd1a0
......@@ -283,12 +283,16 @@ public class AvatarModelChecker implements Runnable, myutil.Graph {
return reachabilities.size() - nbOfRemainingReachabilities;
}
public int getNbOfDeadlocks() {
return nbOfDeadlocks;
}
public int setSafetyAnalysis() {
safeties = new ArrayList<SafetyProperty>();
if (safeties == null) {
safeties = new ArrayList<SafetyProperty>();
}
for (String property : spec.getSafetyPragmas()) {
SafetyProperty sp = new SafetyProperty(property, spec);
if (!sp.hasError()) {
......@@ -298,6 +302,20 @@ public class AvatarModelChecker implements Runnable, myutil.Graph {
studySafety = safeties.size() > 0;
return safeties.size();
}
public boolean addSafety(String pragma) {
if (safeties == null) {
safeties = new ArrayList<SafetyProperty>();
}
SafetyProperty sp = new SafetyProperty(pragma, spec);
if (!sp.hasError()) {
safeties.add(sp);
studySafety = true;
return true;
}
return false;
}
public ArrayList<SafetyProperty> getSafeties() {
return safeties;
......
......@@ -80,7 +80,7 @@ public class SafetyProperty {
public SafetyProperty(String property, AvatarSpecification _spec) {
rawProperty = property.trim();
rawProperty = property;
analyzeProperty(_spec);
phase = SpecificationPropertyPhase.NOTCOMPUTED;
}
......@@ -99,7 +99,7 @@ public class SafetyProperty {
}
public boolean analyzeProperty(AvatarSpecification _spec) {
String tmpP = rawProperty;
String tmpP = rawProperty.trim();
String p;
errorOnProperty = NO_ERROR;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment