try
{
if (p != null)
{
Contract contract = ParserUtil.getContract(p, null);
Links vdmLinks = ParserUtil.getVdmLinks(p, null);
sb.append("--- \n");
sb.append("--- Shared Design Parameters ---\n");
sb.append("--- \n");
for (IVariable sdp : contract.getSharedDesignParameters())
{
LinkInfo info = vdmLinks.getBoundVariableInfo(sdp.getName());
String id = "?";
if (info != null)
{
id = info.getQualifiedNameString();
}
sb.append(id + " <-> " + sdp.getName() + " <-> "
+ sdp.getName() + " not checked\n");
}
sb.append("\n\n");
sb.append("--- \n");
sb.append("--- Monitored Variables ---\n");
sb.append("--- \n");
for (IVariable sdp : contract.getMonitoredVariables())
{
LinkInfo info = vdmLinks.getBoundVariableInfo(sdp.getName());
String id = "?";
if (info != null)
{
id = info.getQualifiedNameString();
}
sb.append(id + " <-> " + sdp.getName() + " <-> "
+ sdp.getName() + " not checked\n");
}
sb.append("\n\n");
sb.append("--- \n");
sb.append("--- Controlled Variables ---\n");
sb.append("--- \n");
for (IVariable sdp : contract.getControlledVariables())
{
LinkInfo info = vdmLinks.getBoundVariableInfo(sdp.getName());
String id = "?";
if (info != null)
{
id = info.getQualifiedNameString();
}
sb.append(id + " <-> " + sdp.getName() + " <-> "
+ sdp.getName() + " not checked\n");
}
sb.append("\n\n");
sb.append("--- \n");
sb.append("--- Events ---\n");
sb.append("--- \n");
for (String event : contract.getEvents())
{
LinkInfo info = vdmLinks.getBoundVariableInfo(event);
String id = "?";
if (info != null)
{
id = info.getQualifiedNameString();
}