/** * Builds a scopeless structure definition. * * @param declaration Definition's declaration */ public StructDefinition(StructDeclaration declaration) { super((ScopeNode) null); this.declaration = declaration; for (String fName : declaration.getFieldsList()) { IDeclaration fieldDecl = declaration.getFields().get(fName); assert (fieldDecl != null); Definition def = fieldDecl.createDefinition(); this.definitions.put(fName, def); } }
@Override public String visit(IExists e) throws IVisitor.VisitorException { if (!isFormula) { throw new VisitorException( "Use of exists in a term position is not yet implemented in the Simplify adapter", e.pos()); // FIXME - booleans as terms } StringBuilder sb = new StringBuilder(); sb.append("(EXISTS ("); for (IDeclaration d : e.parameters()) { if (d.sort().isBool()) { throw new VisitorException( "Boolean quantifiers are not implemented in the Simplify adapter", e.pos()); // FIXME - booleans as terms } sb.append(d.accept(this)); sb.append(" "); } sb.append(") "); sb.append(e.expr().accept(this)); sb.append(")"); return sb.toString(); }
@Override public String visit(IDeclaration e) throws IVisitor.VisitorException { StringBuilder sb = new StringBuilder(); sb.append(e.parameter().accept(this)); return sb.toString(); }