public static String getImplicitOperationString( AImplicitOperationDefinition d) { return d.getName() + Utils.listToString("(", d.getParameterPatterns(), ", ", ")") + (d.getResult() == null ? "" : " " + d.getResult()) + (d.getExternals().isEmpty() ? "" : "\n\text " + d.getExternals()) + (d.getPrecondition() == null ? "" : "\n\tpre " + d.getPrecondition()) + (d.getPostcondition() == null ? "" : "\n\tpost " + d.getPostcondition()) + (d.getErrors().isEmpty() ? "" : "\n\terrs " + d.getErrors()); }
private AForAllExp getChangedVarsExp(AExplicitFunctionDefinition postDef, SOperationDefinitionBase calledOp) { AForAllExp r = new AForAllExp(); List<PMultipleBind> binds = new LinkedList<PMultipleBind>(); if (calledOp instanceof AExplicitOperationDefinition) { refreshAllState(calledOp, binds); } if (calledOp instanceof AImplicitOperationDefinition) { AImplicitOperationDefinition implicitOp = (AImplicitOperationDefinition) calledOp; if (implicitOp.getExternals().size() > 0) { for (AExternalClause external : implicitOp.getExternals()) { if (external.getMode().getType().equals(VDMToken.WRITE)) { binds.addAll(introduceFreshVars(external.getIdentifiers(), getStateVars(calledOp))); } } } else { refreshAllState(calledOp, binds); } } r.setBindList(binds); return r; }
List<AExternalClause> copy = new ArrayList<AExternalClause>(node.getExternals()); for( AExternalClause e : copy)
List<AExternalClause> copy = new ArrayList<AExternalClause>(node.getExternals()); for( AExternalClause e : copy)
List<AExternalClause> copy = new ArrayList<AExternalClause>(node.getExternals()); for( AExternalClause e : copy)
List<AExternalClause> copy = new ArrayList<AExternalClause>(node.getExternals()); for( AExternalClause e : copy)
List<AExternalClause> copy = new ArrayList<AExternalClause>(node.getExternals()); for( AExternalClause e : copy)
if (node.getExternals().size() != 0) for (AExternalClause clause : node.getExternals())