Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering
→ Notation used in the following
ast_node_def(?Language, ?AstNodeLabel : atom, ?AstNodeArguments : list) is nondet
nodes with label arg2 and arguments conforming to the
[[argument descriptors]] in arg3. The label (arg2) represents the AST node type. The arguments represent the AST node's id, its references to other nodes and its attributes (that is, primitive values that are not references). See [[argument descriptors]]. * Example (excerpt from Java AST definition):
ast_node_def( 'Java', % The AST of the language 'Java' ... callT, % ... contains nodes of type 'callT' ... [ % ... that have 7 arguments: ast_arg(id, mult(1,1,no ), id, [callT]), ast_arg(parent, mult(1,1,no ), id, [id]), ast_arg(encl, mult(1,1,no ), id, [methodT, constructorT, classInitializerT,fieldT]), ast_arg(expr, mult(0,1,no), id, [expressionType, nullType, typeRefT]), ast_arg(name, mult(1,1,no ), attr, [atom]), ast_arg(args, mult(0,*,ord ), id, [expressionType]), ast_arg(ref, mult(1,1,no ), id, [methodT, constructorT]) ] ).