Skip to content

Transition from object map to object tree and UI improvements#1626

Open
skuntz wants to merge 6 commits into
sstsimulator:develfrom
tactcomplabs:obj_tree_devel
Open

Transition from object map to object tree and UI improvements#1626
skuntz wants to merge 6 commits into
sstsimulator:develfrom
tactcomplabs:obj_tree_devel

Conversation

@skuntz
Copy link
Copy Markdown
Contributor

@skuntz skuntz commented May 27, 2026

Object Tree is an extension of the object map for use with the debug console. It provides an easily traversable structure to allow for storage and inspection of arbitrary types and improved usability, particularly for containers.

The object tree is organized as a tree, implemented as a vector of vectors with an enforced hierarchy and strong typing. It is dynamically built -- as the user traverses the simulation structure, new objects are added (same principle as ObjectMapDeferred). It uses a combination of CRTP, Visitor, Variant, and Polymorphism. It adds support for generic fundamentals and the numeric handler enables direct comparison against constants and other tree nodes.

Console command improvements with object tree include:

  • cd: Components and objects named the same are explicitly disambiguated

  • ls: Support for ls -l and -ll to control the level of detail

  • set: Indices are now supported e.g. set container[i][j][k]

  • watchpoints: Leverage the type information in the object tree to perform native comparison between generic types and constants; Watchpoints on a container size now possible with a small extension

  • print: Indices, explicit verbosity, and formatting now supported and names are slightly demangled. print -v N -f [hex | dec | oct] container[i][j][k]

General UI improvements:

  • Ensures variable names are uniquely qualified by the object hierarchy
  • Supports cd into any type, including containers, and clearer printing of types
  • Provides confirmation prompt when overwriting user-defined commands
  • Adds show command to display user-defined commands
  • ctrl-d shuts down simulation fixing a runaway prompt on some systems
  • Updates trigger output to avoid splitting text in parallel execution
  • Adds paging to print, info all, watchlist, and printtrace commands (previously only enabled for ls)
  • Resolves an issue where print -r N does not print top level components
  • Provides warnings for read-only variables

@github-actions github-actions Bot added AT: WIP Mark PR as a Work in Progress (No Autotesting Performed) AT: CLANG-FORMAT PASS and removed AT: WIP Mark PR as a Work in Progress (No Autotesting Performed) labels May 27, 2026
@github-actions
Copy link
Copy Markdown

CLANG-FORMAT TEST - PASSED

@skuntz skuntz changed the title Obj tree devel Transition from object map to object tree and UI improvements May 27, 2026
* fixes segmentation fault for malformed print command
* print help update
@github-actions github-actions Bot added AT: WIP Mark PR as a Work in Progress (No Autotesting Performed) and removed AT: WIP Mark PR as a Work in Progress (No Autotesting Performed) labels May 27, 2026
@github-actions
Copy link
Copy Markdown

CLANG-FORMAT TEST - PASSED

@sst-autotester
Copy link
Copy Markdown
Contributor

Status Flag 'Pre-Test Inspection' - - This Pull Request Requires Inspection... The code must be inspected by a member of the Team before Testing/Merging
NO INSPECTION HAS BEEN PERFORMED ON THIS PULL REQUEST! - This PR must be inspected by setting label 'AT: PRE-TEST INSPECTED'.

@skuntz skuntz marked this pull request as draft May 27, 2026 21:03
Comment thread src/sst/core/from_string.h Outdated
template <typename... Args>
struct is_tuple<std::tuple<Args...>> : std::true_type
{};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code can be removed, print formatting for debugConsole is now handled locally to that class. I neglected to remove this code.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(this goes for all changes in this file)

@github-actions github-actions Bot added AT: WIP Mark PR as a Work in Progress (No Autotesting Performed) and removed AT: WIP Mark PR as a Work in Progress (No Autotesting Performed) labels May 27, 2026
@github-actions
Copy link
Copy Markdown

CLANG-FORMAT TEST - PASSED

@skuntz skuntz marked this pull request as ready for review May 27, 2026 21:57
@kpgriesser
Copy link
Copy Markdown
Contributor

kpgriesser commented May 28, 2026

Testing update:

  • All sst-test-core and sst-ext-tests are passing on all TCL platforms.
  • Completed valgrind and address sanitizer testing with no issues

To run sst-ext-tests with these changes use:

git checkout `obj_tree_merge`
cd build
cmake .. -DENABLE_ALL_TESTS=ON -DENABLE_NEW_TESTS=ON 
ctest

Once this PR is merged into devel, we will update sst-ext-tests/devel to match.

At this point, there is no additional work planned for this branch other than writing new tests as time allows.

@kpgriesser
Copy link
Copy Markdown
Contributor

kpgriesser commented May 28, 2026

In addition to the 'planned improvements' listed in the sst-docs web page,

https://sst-simulator.org/sst-docs/docs/guides/features/debug#planned-improvements

TCL has issues and enhancements tracked in GitHub here:

https://github.com/tactcomplabs/sst-core/issues

@github-actions github-actions Bot added AT: WIP Mark PR as a Work in Progress (No Autotesting Performed) and removed AT: WIP Mark PR as a Work in Progress (No Autotesting Performed) labels May 29, 2026
@github-actions
Copy link
Copy Markdown

CLANG-FORMAT TEST - PASSED

@sst-autotester
Copy link
Copy Markdown
Contributor

Status Flag 'Pre-Test Inspection' - - This Pull Request Requires Inspection... The code must be inspected by a member of the Team before Testing/Merging
NO INSPECTION HAS BEEN PERFORMED ON THIS PULL REQUEST! - This PR must be inspected by setting label 'AT: PRE-TEST INSPECTED'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants