Exemplo n.º 1
0
  @Override
  public void enterTypeRepresentationDecl(ResolveParser.TypeRepresentationDeclContext ctx) {
    Scope s = symtab.getScope(ctx);
    currentTypeReprSym = null;
    try {
      currentTypeReprSym =
          moduleScope
              .queryForOne(new UnqualifiedNameQuery(ctx.name.getText()))
              .toProgReprTypeSymbol();
    } catch (SymbolTableException e) {
    }
    List<PExp> opParamAntecedents =
        getAssertionsFromModuleFormalParameters(
            getAllModuleParameterSyms(), this::extractAssumptionsFromParameter);

    VCAssertiveBlockBuilder block =
        new VCAssertiveBlockBuilder(g, s, "Well_Def_Corr_Hyp=" + ctx.name.getText(), ctx)
            .assume(opParamAntecedents)
            .assume(getModuleLevelAssertionsOfType(ClauseType.REQUIRES))
            .assume(currentTypeReprSym.getConvention());
    assertiveBlocks.push(block);
  }