| 118 | | |
| 119 | | == Details of the language == |
| 120 | | |
| 121 | | In this subsection, we list the names of initial selectors, selectors and properties and their possible abbreviations and synonyms. |
| 122 | | |
| 123 | | |||| '''Initial selectors''' || |
| 124 | | ||''Name'' ||''Synonyms'' || |
| 125 | | ||{{{files}}} || {{{-}}} || |
| 126 | | ||{{{@file}}} || {{{-}}} || |
| 127 | | ||{{{modules}}} || {{{mods}}} || |
| 128 | | ||{{{@module}}} || {{{@mod}}} || |
| 129 | | ||{{{@function}}} || {{{@fun}}} || |
| 130 | | ||{{{@definition}}} || {{{@def}}} || |
| 131 | | ||{{{@expression}}} || {{{@expr}}} || |
| 132 | | ||{{{@variable}}} || {{{@var}}} || |
| 133 | | ||{{{@record}}} || {{{@rec}}} || |
| 134 | | ||{{{@recfield}}} || {{{@field}}} || |
| 135 | | ||{{{@macro}}} || {{{-}}} || |
| 136 | | \\ |
| 137 | | |||||||| [wiki:SemanticQuery/FileEntity File entity] || |
| 138 | | |||| '''Selectors''' |||| '''Properties''' || |
| 139 | | ||''Name'' ||''Synonyms'' ||''Name'' ||''Synonyms'' || |
| 140 | | ||{{{function}}} || {{{functions, fun, funs}}} || {{{module}}} || {{{is_module, mod, is_mod}}} || |
| 141 | | ||{{{record}}} || {{{records, rec, recs}}} || {{{header}}} || {{{is_header}}} || |
| 142 | | ||{{{macro}}} || {{{macros}}} || {{{name}}} || {{{-}}} || |
| 143 | | ||{{{includes}}} || {{{-}}} || {{{directory}}} || {{{dir}}} || |
| 144 | | ||{{{included_by}}} || {{{-}}} || {{{path}}} || {{{-}}} || |
| 145 | | ||{{{imports}}} || {{{-}}} || || || |
| 146 | | ||{{{exports}}} || {{{-}}} || || || |
| 147 | | \\ |
| 148 | | |||||||| [wiki:SemanticQuery/FunctionEntity Function entity] || |
| 149 | | |||| '''Selectors''' |||| '''Properties''' || |
| 150 | | ||''Name'' || ''Synonyms'' || ''Name'' || ''Synonyms'' || |
| 151 | | ||{{{references}}} || {{{refs, ref, reference}}} || {{{exported}}} || {{{-}}} || |
| 152 | | ||{{{calls}}} || {{{-}}} || {{{name}}} || {{{-}}} || |
| 153 | | ||{{{called_by}}} || {{{-}}} || {{{arity}}} || {{{-}}} || |
| 154 | | ||{{{arguments}}} || {{{args}}} || {{{bif}}} || {{{-}}} || |
| 155 | | ||{{{body}}} || {{{-}}} || {{{pure}}} || {{{-}}} || |
| 156 | | ||{{{expressions}}} || {{{exprs, expr, expression}}} || {{{defined}}} || {{{-}}} || |
| 157 | | ||{{{variables}}} || {{{vars, var, variable}}} || {{{module}}} || {{{mod}}} |
| 158 | | ||{{{file}}} || {{{-}}} || {{{dirty}}} || {{{-}}} || |
| 159 | | ||{{{dynamic_calls}}} || {{{dynref, dynrefs}}} || {{{spec}}} || {{{-}}} || |
| 160 | | ||{{{dynamic_calls}}} || {{{dyncall, dyncalls}}} || || || |
| 161 | | ||{{{dynamic_called_by}}} || {{{dyncalled_by}}} || || || |
| 162 | | \\ |
| 163 | | |||||||| [wiki:SemanticQuery/ExpressionEntity Expression entity] || |
| 164 | | |||| '''Selectors''' |||| '''Properties''' || |
| 165 | | ||''Name'' ||''Synonyms'' ||''Name'' ||''Synonyms'' || |
| 166 | | ||{{{fundef}}} || {{{-}}} || {{{type}}} || {{{-}}} || |
| 167 | | ||{{{functions}}} || {{{function, fun, funs}}} || {{{value}}} || {{{val}}} || |
| 168 | | ||{{{variables}}} || {{{vars, var, variable}}} || {{{class}}} || {{{-}}} || |
| 169 | | ||{{{records}}} || {{{record, rec, recs}}} || {{{last}}} || {{{is_last}}} || |
| 170 | | ||{{{macro}}} || {{{macros}}} || {{{index}}} || {{{-}}} || |
| 171 | | ||{{{subexpression}}} || {{{sub, esub, subexpr}}} || {{{tailcall}}} || {{{is_tailcall}}} || |
| 172 | | ||{{{parameter}}} || {{{param}}} || {{{has_side_effect}}} || {{{dirty}}} || |
| 173 | | ||{{{top_expression}}} || {{{top, top_expr}}} || || || |
| 174 | | ||{{{file}}} || {{{-}}} || || || |
| 175 | | ||{{{dynamic_ functions}}} || {{{dynfun, dynfuns}}} || || || |
| 176 | | \\ |
| 177 | | |||||||| [wiki:SemanticQuery/VariableEntity Variable entity] || |
| 178 | | |||| '''Selectors''' |||| '''Properties''' || |
| 179 | | ||''Name'' || ''Synonyms'' || ''Name'' || ''Synonyms'' || |
| 180 | | ||{{{references}}} || {{{refs, ref, reference}}} || {{{name}}} || {{{-}}} || |
| 181 | | ||{{{bindings}}} || {{{-}}} || || || |
| 182 | | ||{{{fundef}}} || {{{-}}} || || || |
| 183 | | \\ |
| 184 | | |||||||| [wiki:SemanticQuery/RecordEntity Record entity] || |
| 185 | | |||| '''Selectors''' |||| '''Properties''' || |
| 186 | | ||''Name'' ||''Synonyms'' ||''Name'' ||''Synonyms'' || |
| 187 | | ||{{{references}}} || {{{refs, ref, reference}}} || {{{name}}} || {{{-}}} || |
| 188 | | ||{{{fields}}} || {{{-}}} || || || |
| 189 | | ||{{{file}}} || {{{-}}} || || || |
| 190 | | \\ |
| 191 | | |||||||| [wiki:SemanticQuery/RecordFieldEntity Record field entity] || |
| 192 | | |||| '''Selectors''' |||| '''Properties''' || |
| 193 | | ||''Name'' ||''Synonyms'' ||''Name'' ||''Synonyms'' || |
| 194 | | ||{{{references}}} || {{{refs, ref, reference}}} || {{{name}}} || {{{-}}} || |
| 195 | | ||{{{record}}} || {{{rec}}} || || || |
| 196 | | ||{{{file}}} || {{{-}}} || || || |
| 197 | | \\ |
| 198 | | |||||||| [wiki:SemanticQuery/MacroEntity Macro entity] || |
| 199 | | |||| '''Selectors''' |||| '''Properties''' || |
| 200 | | ||''Name'' ||''Synonyms'' ||''Name'' ||''Synonyms'' || |
| 201 | | ||{{{references}}} || {{{refs, ref, reference}}} || {{{name}}} || {{{-}}} || |
| 202 | | ||{{{file}}} || {{{-}}} || {{{arity}}} || {{{-}}} || |
| 203 | | || || || {{{const}}} || {{{-}}} || |
| 204 | | \\ |
| 205 | | |||||||| '''Metrics for files and functions (as properties)''' || |
| 206 | | ||''Name'' || ''Synonyms'' || ''File'' || ''Function'' || |
| 207 | | ||[wiki:MetricQuery#module_sum module_sum] || {{{mod_sum}}} || ok || - || |
| 208 | | ||[wiki:MetricQuery#function_sum function_sum] || {{{fun_sum}}} || - || ok || |
| 209 | | ||[wiki:MetricQuery#line_of_code line_of_code] || {{{loc}}} || ok || ok || |
| 210 | | ||[wiki:MetricQuery#char_of_code char_of_code] || {{{choc}}} || ok || ok || |
| 211 | | ||[wiki:MetricQuery#number_of_fun number_of_fun] || {{{num_of_fun, num_of_functions, number_of_functions}}} || ok || - || |
| 212 | | ||[wiki:MetricQuery#number_of_macros number_of_macros] || {{{num_of_macros, num_of_macr}}} || ok || - || |
| 213 | | ||[wiki:MetricQuery#number_of_records number_of_records] || {{{num_of_records, num_of_rec}}} || ok || - || |
| 214 | | ||[wiki:MetricQuery#included_files included_files] || {{{inc_files}}} || ok || - || |
| 215 | | ||[wiki:MetricQuery#imported_modules imported_modules] || {{{imp_modules, imported_mod, imp_mod}}} || ok || - || |
| 216 | | ||[wiki:MetricQuery#number_of_funpath number_of_funpath] || {{{number_of_funpaths, num_of_funpath, num_of_funpaths}}} || ok || - || |
| 217 | | ||[wiki:MetricQuery#function_calls_in function_calls_in] || {{{fun_calls_in}}} || ok || - || |
| 218 | | ||[wiki:MetricQuery#function_calls_out function_calls_out] || {{{fun_calls_out}}} || ok || - || |
| 219 | | ||[wiki:MetricQuery#calls_for_function calls_for_function] || {{{calls_for_fun, call_for_function, call_for_fun}}} || - || ok || |
| 220 | | ||[wiki:MetricQuery#calls_from_function calls_from_function] || {{{calls_from_fun, call_from_function, call_from_fun}}} || - || ok || |
| 221 | | ||[wiki:MetricQuery#cohesion cohesion] || {{{coh}}} || ok || - || |
| 222 | | ||[wiki:MetricQuery#otp_used otp_used] || {{{otp}}} || ok || - || |
| 223 | | ||{{{max_application_depth}}} || {{{max_app_depth}}} || ok || ok || |
| 224 | | ||[wiki:MetricQuery#max_depth_of_calling max_depth_of_calling] || {{{max_depth_calling, max_depth_of_call, max_depth_call}}} || ok || ok || |
| 225 | | ||{{{min_depth_of_calling}}} || {{{min_depth_calling, min_depth_of_call, min_depth_call}}} || ok || - || |
| 226 | | ||[wiki:MetricQuery#max_depth_of_cases max_depth_of_cases] || {{{max_depth_cases}}} || ok || ok || |
| 227 | | ||[wiki:MetricQuery#max_depth_of_structs max_depth_of_structs] || {{{-}}} || ok || ok || |
| 228 | | ||[wiki:MetricQuery#number_of_funclauses number_of_funclauses] || {{{num_of_funclauses, number_of_funclaus, num_of_funclaus}}} || ok || ok || |
| 229 | | ||[wiki:MetricQuery#branches_of_recursion branches_of_recursion] || {{{branches_of_rec, branch_of_recursion, branch_of_rec}}} || ok || ok || |
| 230 | | ||[wiki:MetricQuery#mcCabe mcCabe] || {{{mccabe}}} || ok || ok || |
| 231 | | ||[wiki:MetricQuery#number_of_funexpr number_of_funexpr] || {{{num_of_funexpr}}} || ok || ok || |
| 232 | | ||[wiki:MetricQuery#number_of_messpass number_of_messpass] || {{{num_of_messpass}}} || ok || ok || |
| 233 | | ||[wiki:MetricQuery#fun_return_points fun_return_points] || {{{fun_return_point, function_return_points, function_return_point}}} || ok || ok || |
| 234 | | ||[wiki:MetricQuery#max_length_of_line max_length_of_line] || {{{-}}} || ok || ok || |
| 235 | | ||[wiki:MetricQuery#average_length_of_line average_length_of_line] || {{{avg_length_of_line}}} || ok || ok || |
| 236 | | ||[wiki:MetricQuery#no_space_after_comma no_space_after_comma] || {{{-}}} || ok || ok || |
| 237 | | ||[wiki:MetricQuery#is_tail_recursive is_tail_recursive] || {{{-}}} || - || ok || |
| 238 | | \\ |
| 239 | | |||| '''Statistics''' || |
| 240 | | || ''Name'' || ''Synonyms'' || |
| 241 | | ||{{{minimum}}} || {{{min}}} || |
| 242 | | ||{{{maximum}}} || {{{max}}} || |
| 243 | | ||{{{sum}}} || {{{-}}} || |
| 244 | | ||{{{mean}}} || {{{average, avg}}} || |
| 245 | | ||{{{median}}} || {{{med}}} || |
| 246 | | ||{{{variance}}} || {{{var}}} || |
| 247 | | ||{{{standard_deviation}}} || {{{sd}}} || |
| 248 | | |
| 249 | | == Examples == |
| 250 | | Some basic and advanced query example, and queries for checking coding conventions can be found [SemanticQuery/QueryExamples here]. |
| 251 | | |
| 252 | | |