SciTools Understand Flavor for Structure 101g



Similar documents
How to install and use the File Sharing Outlook Plugin

How To Deploy Lync 2010 Client Using SCCM 2012 R2

TIBCO Fulfillment Provisioning Session Layer for FTP Installation

Setting Up the Device and Domain Administration

Workshop for WebLogic introduces new tools in support of Java EE 5.0 standards. The support for Java EE5 includes the following technologies:

Backing Up TestTrack Native Project Databases

TIBCO Hawk SNMP Adapter Installation

Practice Fusion API Client Installation Guide for Windows

Configuration Manual

Industrial Security Facilities Database (ISFD) Troubleshooting Tips

Symantec Client Firewall Policy Migration Guide

TSM for Windows Installation Instructions: Download the latest TSM Client Using the following link:

Creating a Java application using Perfect Developer and the Java Develo...

SOS SO S O n O lin n e lin e Bac Ba kup cku ck p u USER MANUAL

8x8 Virtual Office Telephony Interface for Salesforce

How to Configure Microsoft System Operation Manager to Monitor Active Directory, Group Policy and Exchange Changes Using NetWrix Active Directory

Workflow Conductor for SharePoint 2010

Integrated Virtual Debugger for Visual Studio Developer s Guide VMware Workstation 8.0

SAS 9.3 Foundation for Microsoft Windows

Eclipse installation, configuration and operation

CafePilot has 3 components: the Client, Server and Service Request Monitor (or SRM for short).

UltraSite32 Network Installation Guidelines

Installation Instruction STATISTICA Enterprise Server

Sage ERP MAS 90 Sage ERP MAS 200 Sage ERP MAS 200 SQL. Installation and System Administrator's Guide 4MASIN450-08

How to configure the DBxtra Report Web Service on IIS (Internet Information Server)

NovaBACKUP xsp Version 15.0 Upgrade Guide

OrgPublisher 11 Client and Web Administration for Server 2003 Installation Guide

How to Install and use Windows XP Mode and Windows Virtual PC in Windows 7 for older 32 bit only Applications

GE Intelligent Platforms. Activating Licenses Online Using a Local License Server

IceWarp Server. Log Analyzer. Version 10

Out n About! for Outlook Electronic In/Out Status Board. Administrators Guide. Version 3.x

Zanibal Plug-in For Microsoft Outlook Installation & User Guide Version 1.1

vtcommander Installing and Starting vtcommander

OrgPublisher EChart Server Setup Guide

Setting up the Oracle Warehouse Builder Project. Topics. Overview. Purpose

User Document. Adobe Acrobat 7.0 for Microsoft Windows Group Policy Objects and Active Directory

Cascaded Lookup 5.0 User Guide

DS License Server. Installation and Configuration Guide. 3DEXPERIENCE R2014x

Administrator s Guide

Dream Report Version 4.5

Scheduling in SAS 9.3

5nine Hyper-V Commander

Microsoft Business Contact Manager Version 2.0 New to Product. Module 4: Importing and Exporting Data

Installing VinNOW Client Computers

IceWarp Server Windows Installation Guide

ODBC Group Policy Settings

Online Test Administrator Quick Reference Guide Updated 08/02/2012 v.2.0

Witango Application Server 6. Installation Guide for Windows

STATISTICA VERSION 9 STATISTICA ENTERPRISE INSTALLATION INSTRUCTIONS FOR USE WITH TERMINAL SERVER

Getting Started with Vision 6

OrgPublisher 11 Web Administration Installation for Windows 2008 Server

Contents CHAPTER 1 IMail Utilities

Chapter 2 Installing Sharpdesk and Network Scanner Tool

Creating Home Directories for Windows and Macintosh Computers

Note: With v3.2, the DocuSign Fetch application was renamed DocuSign Retrieve.

Installation Guidelines (MySQL database & Archivists Toolkit client)

PTC Integrity Eclipse and IBM Rational Development Platform Guide

Sharpdesk V3.5. Push Installation Guide for system administrator Version

Installing and Configuring Microsoft Dynamics Outlook Plugin to Use with ipipeline MS CRM

Developing, Deploying, and Debugging Applications on Windows Embedded Standard 7

IBM WebSphere Application Server V8.5 lab Basic Liberty profile administration using the job manager

Database Backup and Restore Instructions. Version 6.5. Instructions

Instructions for Configuring a SAS Metadata Server for Use with JMP Clinical

Exchange Mailbox Protection Whitepaper

Parallels Virtuozzo Containers 4.6 for Windows

To add Citrix XenApp Client Setup for home PC/Office using the 32bit Windows client.

new Business Online Technical Troubleshooting Guide

Complete uninstall of

Tracking Network Changes Using Change Audit

Capturing Network Traffic With Wireshark

Troubleshooting pcanywhere plug-in Deployment

NAS 253 Introduction to Backup Plan

InfoRouter LDAP Authentication Web Service documentation for inforouter Versions 7.5.x & 8.x

VirtualXP Users Guide

System Administration Training Guide. S100 Installation and Site Management

McAfee SMC Installation Guide 5.7. Security Management Center

EVALUATION ONLY. WA2088 WebSphere Application Server 8.5 Administration on Windows. Student Labs. Web Age Solutions Inc.

DS License Server V6R2013x

Administration guide. Host software WinCCU Installation. Complete gas volume and energy data management

Gentran Integration Suite. Archiving and Purging. Version 4.2

Installation Instructions for Version 8 (TS M1) of the SAS System for Microsoft Windows

NetIQ Advanced Authentication Framework - Password Filter. Installation Guide. Version 5.1.0

PUBLIC Password Manager for SAP Single Sign-On Implementation Guide

Introduction 1-1 Installing FAS 500 Asset Accounting the First Time 2-1 Installing FAS 500 Asset Accounting: Upgrading from a Prior Version 3-1

AUSTRALIAN CUSTOMS AND BORDER PROTECTION SERVICE TYPE 3 CERTIFICATE 2014 INSTALLATION GUIDE

EVENT LOG MANAGEMENT...

Tech Tips Helpful Tips for Pelco Products

TECHNICAL DOCUMENTATION SPECOPS DEPLOY / APP 4.7 DOCUMENTATION

Volume AGKSOFT. Ruby VeriFone Back Office Software. Ruby VeriFone Guide

Terminal Server Citrix MetaFrame Installation Guide

Synthetic Monitoring Scripting Framework. User Guide

NetIQ Advanced Authentication Framework. FIDO U2F Authentication Provider Installation Guide. Version 5.1.0

Exchange Mailbox Protection

SCUt ils SmartAssign Guide Solution for Microsoft System Center 2012 Service Manager

Moving the TRITON Reporting Databases

DisplayLink Corporate Install Guide

JAVS Scheduled Publishing. Installation/Configuration... 4 Manual Operation... 6 Automating Scheduled Publishing... 7 Windows XP... 7 Windows 7...

Online Backup and Recovery Manager Setup for Microsoft Windows.

MapInfo Professional 12.0 Licensing and Activation

Transcription:

SciTools Understand Flavor for Structure 101g By Marcio Marchini (marcio@betterdeveloper.net ) 2014/10/10 1) WHAT IS THE UNDERSTAND FLAVOR FOR STRUCTURE101G? 1 2) WHY VARIOUS FLAVORS, AND NOT JUST ONE? 1 3) USING COM.SGLEBS.UNDERSTAND.* 2 3.1) CONFIGURE UNDERSTAND (32- BIT) 2 3.2) CREATE THE UNDERSTAND PROJECT 2 PROJECT NAME: 2 LANGUAGE (C/C++): 3 ADD THE SOURCE DIRECTORIES: 3 CONFIGURE MORE SETTINGS 5 EXAMPLE OF EXTRA CONFIG: 6 LET UNDERSTAND ANALYZE 6 3.3) LOAD THE UDB INTO STRUCTURE 101G WITH THE PLUGIN 7 FLAVOR SELECTION 8 UDB SELECTION 8 MODEL LOADED INTO STRUCTURE 101G 9 4) RUNNING ANY FLAVOR FROM THE CONSOLE 10 5) TIPS AND TROUBLESHOOTING 11 5.1) MERGING CPP AND H FILE PAIRS 11 5.2) FAILURE TO CONVERT / RUN THE FLAVOR 12 1) What is the Understand Flavor for Structure101g? This is a sort of a plugin for Structure 101g (called a flavor). It allows you to analyze projects in various programming languages by analyzing the Understand UDB files using Structure 101g. 2) Why Various Flavors, and Not Just One? Understand is not uniform in the way it models different entities and relationships in languages. This means that we need to have custom parameters for each language. This can be accomplished with different metadata.xml and runner.xml files in the flavor (you don t need to know about these). This allows for optimal parsing and modeling for each programming language.

3) Using com.sglebs.understand.* The steps described here apply equally to all understand flavors. 3.1) Configure Understand In order to run this plugin, you will need a valid Understand license from http://www.scitools.com/. Make sure to install Understand 2.6 build 598 or above, and add Understand's bin directory to the PATH, so that its DLLs required by our flavor can be loaded at runtime. This is how to do it, when you install Understand: NOTE: Make sure the version of Understand used to create the.udb file is the exact same version/build- number as the version of the Understand udbapi.dll that is picked up from your PATH environment variable. You may need to use the Understand GUI app to upgrade an older UDB to the version in the PATH. NOTE: if you install Understand 64- bit in the PATH, make sure to run Structure 101g 64- bit (with a 64- bit Java). If you install Understand 32- bit in the PATH, make sure to run Structure 101g 32- bit (with a 32- bit Java). The two architecture modes cannot be mixed. See Failure to Convert / Run the Flavor for details. 3.2) Create the Understand Project After launching Understand, use File- >New- >Project, and fill in the fields as shown below. We will use C++ as an example (com.sglebs.understand.c++ flavor). Project Name:

Language (C/C++): Add The Source Directories:

The tool will show its progress: And eventually it will present a Dialog with the selected folders:

Configure More Settings If you need to make extra tweaks to the project, make sure to select this non- default radio button at the end of the wizard: This will allow us to configure some more options.

Example of Extra Config: Let Understand Analyze Now you can click OK and confirm when Understand asks to Analyze your files (if you changed the config options): You should get a dialog showing progress, until it finishes:

3.3) Load the UDB into Structure 101g with the Plugin Load Structure 101g and choose File- >New, then select our plugin (flavor):

Flavor Selection Click Next and make sure to point at the UDB file you created (C:\temp\FlightGear 2.4.0.udb in our case): UDB Selection Note that the GUI allows you to tweak some other values: Files to keep: leave the default value.* until you become an advanced user. This is a regex that filters which files you really want to capture from the UDB file. It may be useful to tweak this

parameter to filter out library files. For example, if all interesting files are under a folder called MyProject, you can use MyProject as the regex. Dependencies to keep: leave the default value.* until you become an advanced user. This is a regex that filters what kind of dependencies you really want to capture from the UDB file. The types of dependencies are listed in metadata.xml of this flavor. Some values are: includes, extends, hasparam, etc. So, for example, if you just want to capture the dependencies of include files in your C++ project, you want to use the value includes. If you want to capture includes and also subclass relationships, you want to use includes extends. Use any regular expression to filter the possible values that you want to filter in. Entities to keep: leave the default value.* until you become an advanced user. This is a regex that filters what kind of entities you really want to capture from the UDB file. The types of entities are listed in metadata.xml of this flavor. So, for example, if you just want to capture the dependencies of include files in your C++ project, you want to capture just the file entities, and therefore you want to use the value file. Entities like classes, structs etc will be discarded in this case (producing a more compact DSM). Use any regular expression to filter the possible values that you want to filter in. After it processes the UDB file, you should get your model loaded, like below: Model Loaded Into Structure 101g

You can now analyze your system using Structure 101g s great features. 4) Running any flavor from the console Each flavor directory comes with a copy of the Udb2Structure101g.exe file. If you run it without parameters, you will get something like this: We highly recommend that you use the GUI wizard and use the little Copy command line link at the bottom/right of the Dialog. It will copy to the clipboard the full command-line used by the wizard behind the scenes. For instance, here's an example of what we used to run it on the FlightGear 2.4.0 C++ source files: C:\Users\marcio\structure101g\flavors\com.sglebs.understand.c++_1.0.8 /Udb2Structure101g.exe -in ""C:\temp\FlightGear 2.4.0.udb"" - namespacemode none -namespacesacrossfiles true -out "C:\Users\marcio\AppData\Local\Temp\s101g_5729397466787453511.tmp" - serial "C:\Users\marcio\structure101g\flavors\com.sglebs.understand.c++_1.0. 8/udb2101g.lic" -keepfiles.* -keepdep.* -keepent ".*" - livetypesquery "type ~Unknown ~Local ~Unresolved" -subclassrelation base -importrelation import -flavor com.sglebs.understand.c++ - moduletypes file -order file Try this approach different ways until you become familiar with the command-line options. Then you can invoke the executable on your own customizing the parameters as you want. Note that the serial value can be either the serial/license itself or a valid text file path containing the actual serial/license value 1. This is a key (serial) that you must obtain from us so you can run our converter on your PC. It is tied to your specific machine, unless we provided you with a TRIAL. Therefore, if the converter fails to run we ask that you send us your Machine ID. To obtain your 1 You can have multiple lines in the file, with license values to use. This is useful in cases you have the Machine ID change depending on your configuration. In this case, use multiple serial values in the file.

Machine ID, run this from the console: Udb2Structure101g print This should print your machine. You should get an output similar to this: Machne ID: 48996 Invalid '-in' parameter - no index.xml found in inout dir passed (.) 5) Tips and Troubleshooting 5.1) Merging CPP and H file pairs Most of the time, H files and CPP files are used in pairs, and the dependencies can become a bit awkward because you have two separate entities in the Structure 101 GUI. In these cases, you may want to use Structure 101 s Model- >Transformations, and group pairs of H and CPP files together as a single entity. The example below creates a virtual folder with both files: Note that files such as foo.h and foo.cpp will be put together under a (new logic) folder called foo: foo/foo.h and foo/foo.cpp. This comes in handy when analyzing some C++ systems.

5.2) Failure to Convert / Run the Flavor In some cases the flavor may fail to run. In these cases you will get an error dialog like this: If you open the log file shown, you should find the reason. Example: [Err] Error during conversion: 3 The possible errors and their causes are: 5: The flavor could not open the UDB file. Please make sure your local copy of Understand, in the PATH, can load this file without problems (details below). In most cases this error happens when a UDB file created with an older Understand version is being loaded, without upgrading the file first using Understand itself (our flavor cannot do this automatic conversion). Another case is when you don t have enough floating licenses for Understand (running the conversion consumes 1 Understand license). In order to make sure you can run this flavor, do this: o Open a command prompt ( DOS ) o Execute: und db yourdbfile.db o Make sure it can load the file without errors and without asking to re- analyze sources. If it needs to reanalyze/rebuild/reparse, our flavor will fail. o The complete set of possible errors is: DBAlreadyOpen DBCorrupt DBOldVersion DBUnknownVersion DBUnableOpen - only one database may be open at once - bad database file - database needs to be rebuilt - database needs to be rebuilt - database is unreadable or does not exist

o NoApiLicense - Understand license required 4: The flavor could not find the Understand DLLs. Are you sure Understand is in the PATH for the user running the process that is performing the conversion? 3: Corrupt input. There is something wrong with the input UDB file. Check its file size. If it is too small (just a few KB), there is a chance that the UDB was not populated by Understand. Load it in Understand and Project - > Analyze All Files 2: Licensing error. You need an updated udb2101g.lic file in the flavors dir, customized for your Machine ID. 1: An Unknown error has happened. Please report the issue to us.