Commit e72f835b authored by Jonathan Shahen's avatar Jonathan Shahen

HOTFIX: error with the 0 count rules; added extra comments to the SMV file

parent dc60d398
......@@ -98,6 +98,11 @@ public class ConvertToNuSMV extends ConvertTo {
st.add("goalRoles", RoleTimeSlot.grabAll(m.query._roles, m.query._timeslot, m.timeIntervalHelper,
m.roleHelper));
st.add("numCARules", caRuleCount);
st.add("numCRRules", crRuleCount);
st.add("numCERules", ceRuleCount);
st.add("numCDRules", cdRuleCount);
st.add("caruleslist", stringList("CA", caRuleCount)
+ ((caRuleCount > 0 & (crRuleCount > 0 | ceRuleCount > 0 | cdRuleCount > 0)) ? "," : ""));
st.add("crruleslist", stringList("CR", crRuleCount)
......@@ -346,7 +351,9 @@ public class ConvertToNuSMV extends ConvertTo {
sb.append(prefix).append(i).append(suffix);
}
/*Add the last one*/
sb.append(prefix).append(count);
if (count > 0) {
sb.append(prefix).append(count);
}
return sb.toString();
}
......
MODULE main
-- Number of CA Rules: <numCARules>
-- Number of CR Rules: <numCRRules>
-- Number of CE Rules: <numCERules>
-- Number of CD Rules: <numCDRules>
DEFINE
numroles := <numRoles>;
numadminroles := <numAdminRoles>; -- Might be used later as a optimization
......
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