Conversation
Added SpecCaseProtoTuple.java, SpecDeclarationProtoTuple.java, SpecMethodProtoTuple.java, SpecStatementProtoTuple.java, SpecVariableProtoTuple.java; Made changes on SymbolTable.java, BoaAstIntrinsics.java, DeclarationProtoTuple.java, MethodProtoTuple.java, StatementProtoTuple.java, VariableProtoTuple.java, and ast.proto.
Updated copyright annotations in SymbolTable.java; changed "required" field "key" to "optional" in ast.ptoto; added checking condition for keys in BoaAstIntrinsics.java; changed the identifier number for spec enums start with 1000; removed the code part for keys in DeclarationProtoTuple.java, MethodProtoTuple.java, StatementProtoTuple.java, VariableProtoTuple.java; updated Ast.java.
| BoaAstIntrinsics.context = context; | ||
| } | ||
|
|
||
|
|
||
| names.put("specs", counter++); | ||
| members.add(new BoaProtoList(new SpecStatementProtoTuple())); | ||
|
|
There was a problem hiding this comment.
remove blank line at end of block
| @SuppressWarnings("unchecked") | ||
| @FunctionSpec(name = "getSpec", returnType = "SpecDeclaration", formalParameters = { "Declaration" }) | ||
| public static SpecDeclaration getSpec(final Declaration f) { | ||
|
|
There was a problem hiding this comment.
remove the blank line at the start of this (and all getSpec methods)
| @@ -1,6 +1,7 @@ | |||
| /* | |||
| * Copyright 2014, Hridesh Rajan, Robert Dyer, | |||
There was a problem hiding this comment.
This file no longer needs changes. Please revert all changes so this file is not listed as changed.
|
|
||
| names.put("specs", counter++); | ||
| members.add(new SpecStatementProtoTuple()); | ||
|
|
There was a problem hiding this comment.
remove blank line at the end of the block
|
|
||
| names.put("specs", counter++); | ||
| members.add(new SpecStatementProtoTuple()); | ||
|
|
There was a problem hiding this comment.
remove blank line at the end of the block
| @@ -1,6 +1,7 @@ | |||
| /* | |||
There was a problem hiding this comment.
This file actually shouldnt be changed, because there was no 'specs' attribute added to it. Please revert all changes to this class.
src/proto/ast.proto
Outdated
|
|
||
| /** A single method for specification */ | ||
| message SpecMethod { | ||
| repeated SpecCase case = 1; |
There was a problem hiding this comment.
this should be named 'cases' plural as it is repeated - also update Ast.java and SpecMethodProtoTuple.java
src/proto/ast.proto
Outdated
| /** A single declaration for specification */ | ||
| message SpecDeclaration { | ||
| repeated Modifier modifiers = 1; | ||
| repeated Statement specs = 2; |
There was a problem hiding this comment.
this should be named 'statements' - also update Ast.java
|
Have done all the requested changes. |
src/proto/ast.proto
Outdated
| /** Kind of change on the label: UNCHANGED, ADDED, DELETED/REMOVED, RENAMED */ | ||
| optional ChangeKind label_change_kind = 11; | ||
| /** For Specs use */ | ||
| optional SpecStatement specs = 12; |
There was a problem hiding this comment.
should this be 'repeated'? Or is there exactly 0 or 1 specification statement per declaration?
There was a problem hiding this comment.
based on the naming of 'specs' (plural) I think we intended repeated here.
src/proto/ast.proto
Outdated
| /** Kind of change on the label: UNCHANGED, ADDED, DELETED/REMOVED, RENAMED */ | ||
| optional ChangeKind label_change_kind = 11; | ||
| /** For Specs use */ | ||
| optional SpecStatement specs = 12; |
There was a problem hiding this comment.
same thing - 'repeated' or optional?
There was a problem hiding this comment.
based on the naming of 'specs' (plural) I think we intended repeated here.
src/proto/ast.proto
Outdated
| /** Kind of change on the label: UNCHANGED, ADDED, DELETED/REMOVED, RENAMED */ | ||
| optional ChangeKind label_change_kind = 11; | ||
| /** For Specs use */ | ||
| optional SpecStatement specs = 12; |
There was a problem hiding this comment.
the field number for spec fields should start at 1000.
There was a problem hiding this comment.
Do we need to change the field number for these or only for the enums for specs?
src/proto/ast.proto
Outdated
| /** Kind of change on the label: UNCHANGED, ADDED, DELETED/REMOVED, RENAMED */ | ||
| optional ChangeKind label_change_kind = 11; | ||
| /** For Specs use */ | ||
| optional SpecStatement specs = 12; |
There was a problem hiding this comment.
the field number for spec fields should start at 1000.
…nto Specs-2017-09
Made changes in BoaAbstractVisitor.java; Changed the copyright format in SymbolTable.java.
|
Would it make sense to rebase this branch off the datagen branch and merge it in right after? |
Added files and changes to support specifications.