RecursiveMembers - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : CodeTools : RecursiveMembers

CodeTools

  

RecursiveMembers

  

List module members and their members

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

RecursiveMembers(m)

RecursiveMembers(m, s, opts)

Parameters

m

-

name of a module

s

-

(optional) list of strings; path to m

opts

-

(optional) one or more options of the form locals = value or output = value

Description

• 

The RecursiveMembers command returns the set of all members (locals and exports) of a module, and for any of those members that are themselves modules, its members, and so on recursively.

• 

For each such recursive member, it returns not just the member itself but also the "path" to that member, as in, a list of strings "a", "b", "c" such that a:b:c evaluates to the given recursive member. This works initially by directly converting m to a string; if that doesn't yield the result you need, you can use the s argument to pass a list of strings you want used to represent m. (That will be a prefix of all returned lists of strings.

• 

By default, this command returns, for each recursive member, a list of two entries: first the member itself, and then, as a list of strings, the "path" described above. If you pass the option output = members, then only the members are returned. If you pass the option output = paths, then only the paths are returned. If you pass the option output = both, you get the default return value.

• 

By default, this command returns all members (both locals and exports) of m (and its members). If you pass the option locals = false, then only exports are returned.

Examples

withCodeTools:

To find all exports of the CodeTools package and its subpackages, you can use this command.

codetools_exportsRecursiveMembersCodeTools,output=members,locals=false

codetools_exportsProfiling:−Allow,Profiling:−Build,CPUTime,GCTime,Profiling:−Ignore,Log,Profiling:−Merge,Profiling:−Coverage:−Percent,Profiling:−Coverage:−Print,Profiling:−Profile,Profiling:−Remove,Profiling:−Select,Profiling:−SortBy,Test,Usage,CodeTools,Profiling:−Coverage,ProgramAnalysis:−CreateForLoop,ProgramAnalysis:−CreateLoop,ProgramAnalysis:−CreateWhileLoop,DecodeName,ProgramAnalysis:−DependenceCone,EncodeName,Profiling:−GetProfileTable,ProgramAnalysis:−IsLoopInvariant,Profiling:−IsProfiled,ProgramAnalysis:−IterationSpace,Profiling:−LoadProfiles,ProgramAnalysis:−LoopInvariant,Profiling:−Coverage:−PercentSelect,CodeTools:−PrettyPrint,Profiling:−PrintProfiles,Profiling,ProgramAnalysis,RealTime,Profiling:−SaveProfiles,ProgramAnalysis:−StaticCallGraph,TestFailures,Profiling:−UnProfile,ProgramAnalysis:−VerifyLoop,ProgramAnalysis:−_pexports,CodeTools:−_pexports,ProgramAnalysis:−GenerateProcedure,RecursiveMembers,Profiling:−Coverage:−TestCoverageWorksheet,ThreadSafetyCheck,ProgramAnalysis:−TrajectoryPoints,ProgramAnalysis:−UnimodularTransformation

(1)

This includes both commands (procedures and appliable modules) and modules that aren't appliable, such as the subpackages. To obtain only the procedures and appliable modules, you can use the select and type commands as follows:

selecttype,codetools_exports,procedure,appliable_module

Profiling:−Allow,Profiling:−Build,CPUTime,GCTime,Profiling:−Ignore,Log,Profiling:−Merge,Profiling:−Coverage:−Percent,Profiling:−Coverage:−Print,Profiling:−Profile,Profiling:−Remove,Profiling:−Select,Profiling:−SortBy,Test,Usage,ProgramAnalysis:−CreateForLoop,ProgramAnalysis:−CreateLoop,ProgramAnalysis:−CreateWhileLoop,DecodeName,ProgramAnalysis:−DependenceCone,EncodeName,Profiling:−GetProfileTable,ProgramAnalysis:−IsLoopInvariant,Profiling:−IsProfiled,ProgramAnalysis:−IterationSpace,Profiling:−LoadProfiles,ProgramAnalysis:−LoopInvariant,Profiling:−Coverage:−PercentSelect,CodeTools:−PrettyPrint,Profiling:−PrintProfiles,RealTime,Profiling:−SaveProfiles,ProgramAnalysis:−StaticCallGraph,TestFailures,Profiling:−UnProfile,ProgramAnalysis:−VerifyLoop,ProgramAnalysis:−_pexports,CodeTools:−_pexports,ProgramAnalysis:−GenerateProcedure,RecursiveMembers,Profiling:−Coverage:−TestCoverageWorksheet,ThreadSafetyCheck,ProgramAnalysis:−TrajectoryPoints,ProgramAnalysis:−UnimodularTransformation

(2)

Note that for the subpackage commands, you cannot easily see which subpackage they are in. That's what the "paths" are for.

codetools_exports_2RecursiveMembersCodeTools,locals=false

codetools_exports_2Profiling:−Allow,CodeTools,Profiling,Allow,Profiling:−Build,CodeTools,Profiling,Build,CPUTime,CodeTools,CPUTime,GCTime,CodeTools,GCTime,Profiling:−Ignore,CodeTools,Profiling,Ignore,Log,CodeTools,Log,Profiling:−Merge,CodeTools,Profiling,Merge,Profiling:−Coverage:−Percent,CodeTools,Profiling,Coverage,Percent,Profiling:−Coverage:−Print,CodeTools,Profiling,Coverage,Print,Profiling:−Profile,CodeTools,Profiling,Profile,Profiling:−Remove,CodeTools,Profiling,Remove,Profiling:−Select,CodeTools,Profiling,Select,Profiling:−SortBy,CodeTools,Profiling,SortBy,Test,CodeTools,Test,Usage,CodeTools,Usage,CodeTools,CodeTools,Profiling:−Coverage,CodeTools,Profiling,Coverage,ProgramAnalysis:−CreateForLoop,CodeTools,ProgramAnalysis,CreateForLoop,ProgramAnalysis:−CreateLoop,CodeTools,ProgramAnalysis,CreateLoop,ProgramAnalysis:−CreateWhileLoop,CodeTools,ProgramAnalysis,CreateWhileLoop,DecodeName,CodeTools,DecodeName,ProgramAnalysis:−DependenceCone,CodeTools,ProgramAnalysis,DependenceCone,EncodeName,CodeTools,EncodeName,Profiling:−GetProfileTable,CodeTools,Profiling,GetProfileTable,ProgramAnalysis:−IsLoopInvariant,CodeTools,ProgramAnalysis,IsLoopInvariant,Profiling:−IsProfiled,CodeTools,Profiling,IsProfiled,ProgramAnalysis:−IterationSpace,CodeTools,ProgramAnalysis,IterationSpace,Profiling:−LoadProfiles,CodeTools,Profiling,LoadProfiles,ProgramAnalysis:−LoopInvariant,CodeTools,ProgramAnalysis,LoopInvariant,Profiling:−Coverage:−PercentSelect,CodeTools,Profiling,Coverage,PercentSelect,CodeTools:−PrettyPrint,CodeTools,PrettyPrint,Profiling:−PrintProfiles,CodeTools,Profiling,PrintProfiles,Profiling,CodeTools,Profiling,ProgramAnalysis,CodeTools,ProgramAnalysis,RealTime,CodeTools,RealTime,Profiling:−SaveProfiles,CodeTools,Profiling,SaveProfiles,ProgramAnalysis:−StaticCallGraph,CodeTools,ProgramAnalysis,StaticCallGraph,TestFailures,CodeTools,TestFailures,Profiling:−UnProfile,CodeTools,Profiling,UnProfile,ProgramAnalysis:−VerifyLoop,CodeTools,ProgramAnalysis,VerifyLoop,ProgramAnalysis:−_pexports,CodeTools,ProgramAnalysis,_pexports,CodeTools:−_pexports,CodeTools,_pexports,ProgramAnalysis:−GenerateProcedure,CodeTools,ProgramAnalysis,GenerateProcedure,RecursiveMembers,CodeTools,RecursiveMembers,Profiling:−Coverage:−TestCoverageWorksheet,CodeTools,Profiling,Coverage,TestCoverageWorksheet,ThreadSafetyCheck,CodeTools,ThreadSafetyCheck,ProgramAnalysis:−TrajectoryPoints,CodeTools,ProgramAnalysis,TrajectoryPoints,ProgramAnalysis:−UnimodularTransformation,CodeTools,ProgramAnalysis,UnimodularTransformation

(3)

selecttype,codetools_exports_2,procedure,appliable_module,liststring

Profiling:−Allow,CodeTools,Profiling,Allow,Profiling:−Build,CodeTools,Profiling,Build,CPUTime,CodeTools,CPUTime,GCTime,CodeTools,GCTime,Profiling:−Ignore,CodeTools,Profiling,Ignore,Log,CodeTools,Log,Profiling:−Merge,CodeTools,Profiling,Merge,Profiling:−Coverage:−Percent,CodeTools,Profiling,Coverage,Percent,Profiling:−Coverage:−Print,CodeTools,Profiling,Coverage,Print,Profiling:−Profile,CodeTools,Profiling,Profile,Profiling:−Remove,CodeTools,Profiling,Remove,Profiling:−Select,CodeTools,Profiling,Select,Profiling:−SortBy,CodeTools,Profiling,SortBy,Test,CodeTools,Test,Usage,CodeTools,Usage,ProgramAnalysis:−CreateForLoop,CodeTools,ProgramAnalysis,CreateForLoop,ProgramAnalysis:−CreateLoop,CodeTools,ProgramAnalysis,CreateLoop,ProgramAnalysis:−CreateWhileLoop,CodeTools,ProgramAnalysis,CreateWhileLoop,DecodeName,CodeTools,DecodeName,ProgramAnalysis:−DependenceCone,CodeTools,ProgramAnalysis,DependenceCone,EncodeName,CodeTools,EncodeName,Profiling:−GetProfileTable,CodeTools,Profiling,GetProfileTable,ProgramAnalysis:−IsLoopInvariant,CodeTools,ProgramAnalysis,IsLoopInvariant,Profiling:−IsProfiled,CodeTools,Profiling,IsProfiled,ProgramAnalysis:−IterationSpace,CodeTools,ProgramAnalysis,IterationSpace,Profiling:−LoadProfiles,CodeTools,Profiling,LoadProfiles,ProgramAnalysis:−LoopInvariant,CodeTools,ProgramAnalysis,LoopInvariant,Profiling:−Coverage:−PercentSelect,CodeTools,Profiling,Coverage,PercentSelect,CodeTools:−PrettyPrint,CodeTools,PrettyPrint,Profiling:−PrintProfiles,CodeTools,Profiling,PrintProfiles,RealTime,CodeTools,RealTime,Profiling:−SaveProfiles,CodeTools,Profiling,SaveProfiles,ProgramAnalysis:−StaticCallGraph,CodeTools,ProgramAnalysis,StaticCallGraph,TestFailures,CodeTools,TestFailures,Profiling:−UnProfile,CodeTools,Profiling,UnProfile,ProgramAnalysis:−VerifyLoop,CodeTools,ProgramAnalysis,VerifyLoop,ProgramAnalysis:−_pexports,CodeTools,ProgramAnalysis,_pexports,CodeTools:−_pexports,CodeTools,_pexports,ProgramAnalysis:−GenerateProcedure,CodeTools,ProgramAnalysis,GenerateProcedure,RecursiveMembers,CodeTools,RecursiveMembers,Profiling:−Coverage:−TestCoverageWorksheet,CodeTools,Profiling,Coverage,TestCoverageWorksheet,ThreadSafetyCheck,CodeTools,ThreadSafetyCheck,ProgramAnalysis:−TrajectoryPoints,CodeTools,ProgramAnalysis,TrajectoryPoints,ProgramAnalysis:−UnimodularTransformation,CodeTools,ProgramAnalysis,UnimodularTransformation

(4)

To obtain all the members of the CodeTools[Profiling] subpackage, we can use the following command.

RecursiveMembersProfiling

%-20s %9s %9s %9s %14s %9s ,Profiling,titleFormat,%-20s %9d %9.3f %9.2f %14d %9.2f ,Profiling,dataFormat,Profiling:−Allow,Profiling,Allow,Profiling:−Build,Profiling,Build,Profiling:−Ignore,Profiling,Ignore,Profiling:−Merge,Profiling,Merge,Profiling:−Coverage:−Percent,Profiling,Coverage,Percent,Profiling:−Coverage:−Print,Profiling,Coverage,Print,Profiling:−Profile,Profiling,Profile,Profiling:−Remove,Profiling,Remove,Profiling:−Select,Profiling,Select,Profiling:−SortBy,Profiling,SortBy,Profiling:−Coverage,Profiling,Coverage,EscapePath,Profiling,Coverage,TestCoverageWorksheet,EscapePath,Profiling:−GetProfileTable,Profiling,GetProfileTable,Profiling:−IsProfiled,Profiling,IsProfiled,Profiling:−LoadProfiles,Profiling,LoadProfiles,ModuleApply,Profiling,Coverage,TestCoverageWorksheet,ModuleApply,Profiling:−Coverage:−PercentSelect,Profiling,Coverage,PercentSelect,Profiling:−PrintProfiles,Profiling,PrintProfiles,Profiling,Profiling,Profiling:−SaveProfiles,Profiling,SaveProfiles,Profiling:−UnProfile,Profiling,UnProfile,addProfile,Profiling,addProfile,adjustProcLine,Profiling,Coverage,adjustProcLine,functionPercent,Profiling,Coverage,functionPercent,getMemberFuncs,Profiling,getMemberFuncs,getStatement,Profiling,getStatement,ignoreProcTable,Profiling,ignoreProcTable,inertCompare,Profiling,inertCompare,isBadName,Profiling,isBadName,isBadProc,Profiling,isBadProc,isEnvVar,Profiling,isEnvVar,mapThroughEnv,Profiling,mapThroughEnv,mergeTable,Profiling,mergeTable,parseArgs,Profiling,parseArgs,percentDefaults,Profiling,Coverage,percentDefaults,printDefaults,Profiling,Coverage,printDefaults,printProcLong,Profiling,Coverage,printProcLong,printProcNorm,Profiling,Coverage,printProcNorm,printTable,Profiling,printTable,procMerger,Profiling,procMerger,profileAll,Profiling,profileAll,readTable,Profiling,readTable,removeProfile,Profiling,removeProfile,sortByDefaults,Profiling,sortByDefaults,takeDump,Profiling,takeDump,unProfileAll,Profiling,unProfileAll,GroupInputTextfield,Profiling,Coverage,TestCoverageWorksheet,GroupInputTextfield,Profiling:−Coverage:−TestCoverageWorksheet,Profiling,Coverage,TestCoverageWorksheet,getAllNamedProcs,Profiling,getAllNamedProcs,ignoreModuleTable,Profiling,ignoreModuleTable,isInIgnoredModule,Profiling,isInIgnoredModule,loadProfilesDefaults,Profiling,loadProfilesDefaults,parseProcTableArgs,Profiling,parseProcTableArgs,percentSelectDefaults,Profiling,Coverage,percentSelectDefaults,printProcCompact,Profiling,Coverage,printProcCompact,printProfilesDefaults,Profiling,printProfilesDefaults

(5)

The fact that the "paths" start with the string Profiling is a bit misleading; it would potentially be more helpful for it to start with CodeTools,Profiling. We can make that happen as follows.

RecursiveMembersProfiling,CodeTools,Profiling

%-20s %9s %9s %9s %14s %9s ,CodeTools,Profiling,titleFormat,%-20s %9d %9.3f %9.2f %14d %9.2f ,CodeTools,Profiling,dataFormat,Profiling:−Allow,CodeTools,Profiling,Allow,Profiling:−Build,CodeTools,Profiling,Build,Profiling:−Ignore,CodeTools,Profiling,Ignore,Profiling:−Merge,CodeTools,Profiling,Merge,Profiling:−Coverage:−Percent,CodeTools,Profiling,Coverage,Percent,Profiling:−Coverage:−Print,CodeTools,Profiling,Coverage,Print,Profiling:−Profile,CodeTools,Profiling,Profile,Profiling:−Remove,CodeTools,Profiling,Remove,Profiling:−Select,CodeTools,Profiling,Select,Profiling:−SortBy,CodeTools,Profiling,SortBy,Profiling:−Coverage,CodeTools,Profiling,Coverage,EscapePath,CodeTools,Profiling,Coverage,TestCoverageWorksheet,EscapePath,Profiling:−GetProfileTable,CodeTools,Profiling,GetProfileTable,Profiling:−IsProfiled,CodeTools,Profiling,IsProfiled,Profiling:−LoadProfiles,CodeTools,Profiling,LoadProfiles,ModuleApply,CodeTools,Profiling,Coverage,TestCoverageWorksheet,ModuleApply,Profiling:−Coverage:−PercentSelect,CodeTools,Profiling,Coverage,PercentSelect,Profiling:−PrintProfiles,CodeTools,Profiling,PrintProfiles,Profiling,CodeTools,Profiling,Profiling:−SaveProfiles,CodeTools,Profiling,SaveProfiles,Profiling:−UnProfile,CodeTools,Profiling,UnProfile,addProfile,CodeTools,Profiling,addProfile,adjustProcLine,CodeTools,Profiling,Coverage,adjustProcLine,functionPercent,CodeTools,Profiling,Coverage,functionPercent,getMemberFuncs,CodeTools,Profiling,getMemberFuncs,getStatement,CodeTools,Profiling,getStatement,ignoreProcTable,CodeTools,Profiling,ignoreProcTable,inertCompare,CodeTools,Profiling,inertCompare,isBadName,CodeTools,Profiling,isBadName,isBadProc,CodeTools,Profiling,isBadProc,isEnvVar,CodeTools,Profiling,isEnvVar,mapThroughEnv,CodeTools,Profiling,mapThroughEnv,mergeTable,CodeTools,Profiling,mergeTable,parseArgs,CodeTools,Profiling,parseArgs,percentDefaults,CodeTools,Profiling,Coverage,percentDefaults,printDefaults,CodeTools,Profiling,Coverage,printDefaults,printProcLong,CodeTools,Profiling,Coverage,printProcLong,printProcNorm,CodeTools,Profiling,Coverage,printProcNorm,printTable,CodeTools,Profiling,printTable,procMerger,CodeTools,Profiling,procMerger,profileAll,CodeTools,Profiling,profileAll,readTable,CodeTools,Profiling,readTable,removeProfile,CodeTools,Profiling,removeProfile,sortByDefaults,CodeTools,Profiling,sortByDefaults,takeDump,CodeTools,Profiling,takeDump,unProfileAll,CodeTools,Profiling,unProfileAll,GroupInputTextfield,CodeTools,Profiling,Coverage,TestCoverageWorksheet,GroupInputTextfield,Profiling:−Coverage:−TestCoverageWorksheet,CodeTools,Profiling,Coverage,TestCoverageWorksheet,getAllNamedProcs,CodeTools,Profiling,getAllNamedProcs,ignoreModuleTable,CodeTools,Profiling,ignoreModuleTable,isInIgnoredModule,CodeTools,Profiling,isInIgnoredModule,loadProfilesDefaults,CodeTools,Profiling,loadProfilesDefaults,parseProcTableArgs,CodeTools,Profiling,parseProcTableArgs,percentSelectDefaults,CodeTools,Profiling,Coverage,percentSelectDefaults,printProcCompact,CodeTools,Profiling,Coverage,printProcCompact,printProfilesDefaults,CodeTools,Profiling,printProfilesDefaults

(6)

Compatibility

• 

The CodeTools[RecursiveMembers] command was introduced in Maple 2021.

• 

For more information on Maple 2021 changes, see Updates in Maple 2021.