Skip to content

Commit

Permalink
Merge branch 'master' into highprecision
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbattle committed Nov 1, 2024
2 parents 65014d8 + 2b093ad commit 229a6ac
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public POBlockStatement(LexLocation location, PODefinitionList assignmentDefs, P
@Override
public ProofObligationList getProofObligations(POContextStack ctxt, POGState pogState, Environment env)
{
ProofObligationList obligations = assignmentDefs.getProofObligations(ctxt, pogState, env);
ProofObligationList obligations = assignmentDefs.getDefProofObligations(ctxt, pogState, env);

POGState dclState = pogState.getLink();

Expand Down
17 changes: 16 additions & 1 deletion vdmj/src/main/java/com/fujitsu/vdmj/pog/POLetDefContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

package com.fujitsu.vdmj.pog;

import com.fujitsu.vdmj.po.definitions.POAssignmentDefinition;
import com.fujitsu.vdmj.po.definitions.PODefinition;
import com.fujitsu.vdmj.po.definitions.PODefinitionList;

Expand Down Expand Up @@ -61,7 +62,21 @@ public String getSource()
for (PODefinition def: localDefs)
{
sb.append(sep);
sb.append(def.toExplicitString(def.location));

if (def instanceof POAssignmentDefinition)
{
POAssignmentDefinition ass = (POAssignmentDefinition)def;
sb.append(ass.name);
sb.append(":");
sb.append(ass.expType);
sb.append(" = ");
sb.append(ass.expression);
}
else // POValueDefinition
{
sb.append(def.toExplicitString(def.location));
}

sep = ", ";
}

Expand Down

0 comments on commit 229a6ac

Please sign in to comment.