Search in sources :

Example 6 with VariableDeclaration

use of verdict.vdm.vdm_lustre.VariableDeclaration in project VERDICT by ge-high-assurance.

the class PrettyPrinter method visit.

public void visit(NodeBody nodeBody) {
    sb.append("let");
    sb.append(NL);
    if (nodeBody.getVariableDeclaration().size() > 0) {
        sb.append("var");
        sb.append(NL);
    }
    for (VariableDeclaration var : nodeBody.getVariableDeclaration()) {
        visit(var);
        sb.append(NL);
        sb.append(";");
    }
    for (ConstantDeclaration constant : nodeBody.getConstantDeclaration()) {
        sb.append("const");
        visit(constant);
        sb.append(NL);
        sb.append(";");
    }
    for (Expression expr : nodeBody.getAssertion()) {
        visit(expr);
    }
    for (NodeEquation neq : nodeBody.getEquation()) {
        visit(neq);
    }
    for (NodeProperty property : nodeBody.getProperty()) {
        visit(property);
    }
    sb.append("tel");
}
Also used : NodeEquation(verdict.vdm.vdm_lustre.NodeEquation) Expression(verdict.vdm.vdm_lustre.Expression) NodeProperty(verdict.vdm.vdm_lustre.NodeProperty) ConstantDeclaration(verdict.vdm.vdm_lustre.ConstantDeclaration) VariableDeclaration(verdict.vdm.vdm_lustre.VariableDeclaration)

Aggregations

VariableDeclaration (verdict.vdm.vdm_lustre.VariableDeclaration)6 NodeEquation (verdict.vdm.vdm_lustre.NodeEquation)5 Expression (verdict.vdm.vdm_lustre.Expression)3 NodeEquationLHS (verdict.vdm.vdm_lustre.NodeEquationLHS)3 DataType (verdict.vdm.vdm_data.DataType)2 NodeCall (verdict.vdm.vdm_lustre.NodeCall)2 CompInstancePort (verdict.vdm.vdm_model.CompInstancePort)2 Port (verdict.vdm.vdm_model.Port)2 PortMode (verdict.vdm.vdm_model.PortMode)2 Arg (com.rockwellcollins.atc.agree.agree.Arg)1 Matcher (java.util.regex.Matcher)1 Pattern (java.util.regex.Pattern)1 ConstantDeclaration (verdict.vdm.vdm_lustre.ConstantDeclaration)1 IfThenElse (verdict.vdm.vdm_lustre.IfThenElse)1 NodeProperty (verdict.vdm.vdm_lustre.NodeProperty)1 ComponentImpl (verdict.vdm.vdm_model.ComponentImpl)1 ComponentInstance (verdict.vdm.vdm_model.ComponentInstance)1 ComponentType (verdict.vdm.vdm_model.ComponentType)1 ConnectionEnd (verdict.vdm.vdm_model.ConnectionEnd)1