@@ -197,38 +197,6 @@ module Raw {
197197 private string getReceiverName ( raw:: DataFlow:: CallNode call ) {
198198 result = call .getReceiver ( ) .asExpr ( ) .( raw:: VarAccess ) .getName ( )
199199 }
200-
201- /** Consistency checks: these predicates should each have no results */
202- module Consistency {
203- /** `getEntityName` should assign each entity a single name. */
204- query predicate entityWithManyNames ( Entity entity , string name ) {
205- name = getEntityName ( entity ) and
206- count ( getEntityName ( entity ) ) > 1
207- }
208-
209- query predicate nodeWithNoType ( AstNode node ) { not exists ( node .astNodeType ( ) ) }
210-
211- query predicate nodeWithManyTypes ( AstNode node , string type ) {
212- type = node .astNodeType ( ) and
213- count ( node .astNodeType ( ) ) > 1
214- }
215-
216- query predicate nodeWithNoParent ( AstNode node , string type ) {
217- not node = any ( AstNode parent ) .astNodeChild ( _) and
218- type = node .astNodeType ( ) and
219- not exists ( RawAstNode rawNode | node = TAstNode ( rawNode ) and rawNode instanceof raw:: Module )
220- }
221-
222- query predicate duplicateChildIndex ( AstNode parent , int index , AstNode child ) {
223- child = parent .astNodeChild ( index ) and
224- count ( parent .astNodeChild ( index ) ) > 1
225- }
226-
227- query predicate duplicateAttributeIndex ( AstNode node , int index ) {
228- exists ( node .astNodeAttribute ( index ) ) and
229- count ( node .astNodeAttribute ( index ) ) > 1
230- }
231- }
232200}
233201
234202module Wrapped {
@@ -401,14 +369,6 @@ module DatabaseFeatures {
401369 override Location getLocation ( ) { result = rawNode .getLocation ( ) }
402370 }
403371
404- /** Consistency checks: these predicates should each have no results */
405- module Consistency {
406- query predicate nonLeafAttribute ( AstNode node , int index , string attribute ) {
407- attribute = node .getAttribute ( index ) and
408- exists ( node .getChild ( _) )
409- }
410- }
411-
412372 query predicate entities (
413373 Entity entity , string entity_name , string entity_type , string path , int startLine ,
414374 int startColumn , int endLine , int endColumn , string absolutePath
0 commit comments