SDA SE Wiki

Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering

User Tools

Site Tools


Factbase Statistics

This storybook is about quickly creating statistics of factbase contents. Stories:

Statistics Configuration

Description: Add configuration option. It opens

  • an option list for selecting whether the statistics should be for source / bytecode / both.
  • a button that opens a dialog that displays a table of PEF types, where the user can select (via checkboxes) for which PEF types the view should display statistics. The dialog should give users the choice of viewing PEF types in their literal form (as used in JTransformer, e.g. 'classDefT') or in a natural language (e.g. 'classes).

The options should influence all ways of displaying the statistics (that is, the graph chart and the table view).

Aim: Nice looking, quick statistics about the current factbase, without any need for asking Prolog queries.

Priority: Nice to have.

Statistics Export to Clipboard

Description: It should be possible to copy the information from the table to the clipboard in a tab separated form that can be used in spreadsheets. The clipboard output should have the PEF types in the first column and the related numbers in the second.

Aim: Quick and easy export of statistics.

Priority: Nice to have.

Fix Statistics Export to Clipboard

Description: Statistics export should only export integer values, no values with commas or periods:

not this but this
statisticsexporttoclipboard.jpg statisticsexporttoclipboard-todo.jpg
Numbers with . treated as text Numbers recognized as such

Aim: Avoid useless decimal notation that only leads to internationalization problems (, versus .).

Priority: Essential, export makes no sense otherwise.

Language-Parametric Fact Type Selector

Description: Let the fact type selector use multiple tabs, one for each language known to JTransformer.

Aim: Language independence.

Priority: Essential.

Language-Parametric Statistics

See screenshot in statistics view cleanup story.

Description: Make it possible to select the language for which the Graph and Table displays statistics. Essential behaviour:

  • Add a “Language” drop down list into the “Show statistics for” group.
  • Display in it all the languages know currently to JT (no matter whether there are facts for them in the selected Factbase! ← for ease of implementation)
    • In order to learn how to find out about the “known languages” look at the code that displays one tab per language when clicking the “Configure…” button.
  • Contents of graph and table depends on the chosen language (and on the Node Type Selection → see “Configure…” button).
  • Persist the selection in the preferences (in the same way as for the Node Type Selection → see behaviour of “Configure…” button).
  • Set “Java” as the default choice if there is no persisted preference.

Additional behaviour when integrating this story with the statistics view cleanup story:

  • The PEType selection element (previously displayed when clicking the “Configure…” button) is inlined below the language selection drop down.
  • Instead of multiple tabs (one per language) it only shows the pef types for the chosen language.

Nice to have additional behaviour (deferred:

  • “Source code” drop down list contents only shows what makes sense for the selected language
    • Tip from the expert → you need to extend each languages metamodel with additional facts, e.g. codeKind(sourcecode). codeKind(bytecode). and write a query that gives you all the values to display in the drop down box.

Aim: Make the Factbase Statistics View language-parametric.

Priority: Medium

Cleanup Context Menu of Statistics Table

Description: Eliminate “Refactoring” item from context menu and give the two remaining items meaningful names and icons (e.g. a table for the “copy as table” ← see what icons are used in other programs for similar actions):

not this but this
statistics_view_table_context_menu.jpg Context Menu items: “Copy Cell”, “Copy Statistics as Table”

Statistics View Cleanup

Description: Group all statistics and improve the Graph and Table display.

Behaviour

  • Grouping: Put the total numbers, the Graph and the Table into a “Statistics” group.
  • Improved Graph:
    • Don't display node types with 0% value!
    • Let the Graph display percentages AND numbers for each node type with non-zero percentage.
  • Table:
  • Inlining of the Node Type Selection element (previously displayed when clicking “Configure…”) into the “Show statistics for” group. See also language-parametric statistics story.

Aim: Make the Factbase Statistics View more intuitive, more compact and usable with less clicking (no separate Node Type Selection).

Priority: Medium

not this but this
cluttered legend /*factbase_statistics_pet_selector.jpg *:start statistics_view_-_todo.jpg
Hardcoded statistics for Java. No visual indication if no PETs selected. Explicit language selection, inlined PET selection, grouped statistics, no legend, changed text
The screenshot includes a new language selector element. The related language-parametric behaviour is explained in the language-parametric statistics story.

Statistics Tabs

Description:

  • Display the Graph and Table view of the statistics in different tabs within the “Statistics” Group.
  • Have another table view for all the “General statistics” (such as threads, storage, …).

Aim: Separate alternative views of the same information and information of different categories. Give each view the full screen area instead of letting them compete for the scarce space available. Let the user focus on the relevant information at the cost of just one mouse click (without much scrolling).

Priority: Nice to have.

Non-intrusive Summary Information

Description (Highly speculative):

  • Add the summary information as the two top rows of the table view (???)
  • Integrate the summary information somehow in the graph view view (???)

Aim: Give more screen space to the tabs by moving the summary information (total elements in factbase, total of selected elements) into the tabs in some screen space saving layout.

Dependencies: —

Priority: Nice to have.

teaching/labs/xp/2008a/factbase_statistics.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2021