+1Base supports five programming models: Project, Tools, Objects,
Interrupts, and Additional, and two documentation models:
Reports and Miscellaneous.
When developing our products, we would start with
very simple programs to implement a new feature.
In this tutorial, which highlights many of the features described above,
we continue this "tradition."
While using simple programs for a tutorial may not Wow! you,
such an approach will make it easier to quickly understand
what features our products support.
A note on the conventions used in this tutorial.
There are three mouse buttons on a Sun Workstation commonly known as Select,
Adjust, and Menu, or B1, B2, and B3. In this tutorial, a statement such as
"Click on the Add Module Button." asks that you move the "hot point"
of the mouse on top of the Add Module Button
and press the Select or B1 button on the mouse.
This is the left most mouse button.
A statement such as "Select Edit->Source Code."
asks that you move the hot point of the mouse over the Edit Button,
press and hold down the Menu or B3 button on the mouse,
move the hot point down the list of menu entries,
and select the Source Code entry from the menu.
Our products do not currently use the Adjust or B2 mouse button.
Before starting this tutorial, we recommend printing the tutorial out.
Using a printed copy of the tutorial will make it easier to follow the steps
below.
And now, without further delay, let the tutorial begin!
1. Type: mkdir tutorial; cd tutorial
Make a temporary directory named tutorial and change to this directory.
2. Type: plusone
To start +1Base, type plusone at the Unix prompt.
+1Base will display the +1Environment 3.2 Current Projects Frame.
If this is a demonstration copy of the software, you will first be greeted with
a welcome message.
Click on the Continue Demo Button.
If this is the first time you have run +1Environment or are running
a demonstration license, the
+1 Software Engineering Software License Agreement will be displayed.
After reading the software license, if you accept all
terms and conditions of the license, click on the Accept Button.
Otherwise, click on the Do Not Accept Button, which will exit you from
the +1Environment.
3. Select Help->+1Environment Projects Menu ...
Displays helpful information on
the +1Environment 3.2 Current Projects Frame.
You can now print the contents of this help message by pressing on the
Print Button or save it to a file by
specifying a file name in the Filename: Field and then
clicking on the Save To File Button.
4. Click on the Done Button in the Help Projects Menu Frame.
5. Click on the Add Project Button in the +1Environment
3.2 Current Projects Frame.
The Add Project Entry Frame appears.
6. Click on the Help Button in the Add Project Entry Frame.
Displays the Help Add Project Entry Frame.
All +1Environment frames have a Help Button which describes
all fields and buttons used by the frame.
7. Click on the Done Button in the Help Add Project Entry Frame.
The Add Project Entry Frame is now displayed again.
8. For Project Name:, type: Main Program.
The Project Name is the only required field of the three.
9. Click on the Add Project Entry Button in the Add Project Entry Frame.
The +1Environment 3.2 Project Frame is displayed.
This frame is the primary interface to several of our products.
Along the top of the frame, you are informed of the project being worked
on ("Main Program"), the module identifier of the current root module
("Module: 0" indicates that the project's root module is displayed),
and the current +1Environment model being displayed ("Project Model").
Next are 20 buttons, each with a pull down menu.
A graphical tree diagram representing a parent module and its children
is below the status line. The current root module contains the module's
formatted description name within the module's box and its file name to the
right of the module.
At the bottom of the frame, "+1 Software Engineering" and
"+1Environment 3.2" are displayed.
10. Select Change Model->Help ...
The Help Change Model Menu Frame is displayed.
All +1Environment menus, except for Exit, have a help entry describing
the functionality performed by the menu entries.
11. Click on the Done Button in the Help Change Model Menu Frame.
12. Select Change Model->Add Module ...
The Add New Module Frame is displayed.
13. For Module Name:, type one.
The Module Name is the only required field of the three.
14. Click on the Add Module Button in the Add New Module Frame.
Module one is added under the Main Program Module.
15. Click on the Change Model Button.
The status line now says: Select location of new module.
If this does not work, select Change Model->Add Module ...
Each menu is associated with a default action, which is a circled
entry when the menu is displayed.
For the Change Model Menu,
the Add Module ... selection is the default.
Whether clicking on the Change Model Button will select
Add Module ... as its default really depends on how your
workstation is set up.
You may need to select the Add Module Entry from the
Change Model Menu or select Properties from Sun's
Workspace Menu, select Properties ...,
set Menus for Category,
and set Left Mouse Press (Solaris 2.x)
or SELECT Mouse Press (SunOS or Solaris 1.x)
to Selects Default (versus
Displays Menu).
16. Click mouse's hot point to the right of module 1.
This action selects the location for the new module to be located to
the right of module 1 and displays the Add New Module Frame.
17. For Module Name:, type: This Is Module Two
18. For Module File Name:, type: two
You can tab down or press RETURN
to type in values for this field from the Module Name Field or select
this field with the mouse.
19. Click on Add Module Button in the Add New Module Frame.
This adds module "This Is Module Two" to the right of Module One. It's
file name is two.c.
20. Select Edit->Source Code.
The status line says: Select module to edit.
21. Click on module 0 to select file Main_Program.c.
This will edit file Main_Program.c using the vi editor.
If you don't know how to use vi, type "ZZ" in the editor window and
select Set->Editors ....
You can use any editor of your choice, such as textedit.
22. Edit Main_Program.c
Edit function Main_Program.c to look as follows, then exit editor.
main()
{
printf("main program\n");
one();
two();
}
23. Move the mouse's hot point over the "one" module box,
press the right-most button (B3)
and select Edit->Source Code.
This will edit the file one.c.
Editing files using the Canvas Menu selects which file and the
operation to perform on the file in one step.
This is faster than selecting a file to edit from the Edit Menu
found along the top of the Project Frame.
24. Edit function one.c.
Edit function one.c to look as follows, then exit editor.
one()
{
printf("one\n");
}
25. Edit function two.c.
Edit function two.c using either method described above
(from the Canvas Menu or from Edit->Source Code).
The function should look as follows, then exit editor.
two()
{
printf("two\n");
}
26. Select Compile->Compile.
This creates the project's Makefile (with dependency lists) and
compiles each module in alphabetical order.
You can view the generated Makefile by selecting
View->Makefile->Makefile.
27. Press RETURN in the Compile Programs Window.
28. Select Run->Run Program.
Main_Program is the executable generated by running the Compile
command. Running this program displays the following output:
Running: ./Main_Program
main program
one
two
Press RETURN to continue with +1Environment.
29. Press RETURN in the Run Program Window.
30. Edit function one.c.
Edit function one.c to look as follows, then exit the editor.
one()
{
printf("one - This one changed.\n");
}
31. Select Compile->Make Project.
File one.c is recompiled.
Since no files were added or deleted, you can run the existing Makefile.
Selecting Make Project is faster than selecting Compile, because
Compile first creates
and then runs the Makefile, while Make Project
just runs the existing Makefile.
Make Project is the default menu item.
32. Press RETURN in the Make Project Window.
33. Select Run->Run Program or click on the Run Menu Button.
The following output is displayed:
Running: ./Main_Program
main program
one - This one changed.
two
Press RETURN to continue with +1Environment.
34. Press RETURN in the Run Program Window.
35. Travel down module 1.
Move the mouse's hot point below module 1 and click the B1 button.
Module one now becomes the parent module on the screen.
You can click above the current root module to travel up one level
or click below a child module to travel down one level.
36. Select Change Model->Add Module ...
The Add New Module Frame is displayed.
37. For Module Name:, type: one one
38. Click on the Add Module Button in the Add New Module Frame.
Module one one, whose file name is one_one.c, is added.
39. Select Change Model->Add Module ...
The status line says: Select location of new module.
40. Move mouse's hot point to the right of module 11 (file one_one.c) and click B1 button.
The Add New Module Frame is displayed.
You can click on the Help Button in the Add New Module Frame
to describe all possible locations for where a new module can be placed.
41. For Module Name:, type: one two
42. Click on the Add Module Button in the Add New Module Frame.
43. Edit one.c.
Edit function one.c to look as follows, then exit the editor:
one()
{
printf("one - This one changed.\n");
one_one();
one_two();
}
44. Edit one_one.c.
Edit function one_one.c to look as follows, then exit the editor:
one_one()
{
printf("one one\n");
}
45. Edit one_two.c.
Edit function one_two.c to look as follows, then exit the editor:
one_two()
{
printf("one two\n");
}
An even faster way of editing files one_one.c and one_two.c, as done in
the two steps above, would
be to use vi's ":e one_one.c" command which, while editing file one.c,
selects the next file to edit next without having to exit the vi editor.
46. Select Compile->Compile.
Since we added new modules, we must first select Compile to generate a
new Makefile. If we didn't add or delete modules, we could select
Make Project from the Compile Menu,
which is faster since it simply runs the previous Makefile.
47. Press RETURN in the Compile Programs Window.
48. Select Run->Run Program.
The following output is displayed:
Running: ./Main_Program
main program
one - This one changed.
one one
one two
two
Press RETURN to continue with +1Environment.
49. Press RETURN in the Run Program Window.
50. Select Print->Cross Reference ...
The Cross Reference Frame is displayed.
51. Click on Root Module for the Start cross reference with:
option.
Selecting Root Module for the Start cross reference with:
option will generate a cross reference table starting with the root module.
52. Click on the Cross Reference Button in the Cross Reference Frame.
The following cross reference table ordered by file name, module name, and
module id is displayed.
Cross Reference Table
By Filename, Name, and Module Id
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Main_Program Main Program 0
one one 1
one_one one one 11
one_two one two 12
two This Is Module Two 2
53. Click on the Done Button in the Cross Reference Table Frame.
You can also print the cross reference table by clicking on the Print
Button or save it in a file. The default file name is ../doc/xReference.
54. Select Print->Tree Charts ...
The Tree Charts Frame is displayed.
55. Click on Root Module for the Start tree charts at: option.
56. Click on the Generate Tree Chart(s) Button in the Tree
Charts Frame.
The following tree chart is displayed:
Tree Chart For Project Model
0 Main Program Main_Program
1 one one
11 one one one_one
12 one two one_two
2 This Is Module Two two
57. Click on the Done Button in the Tree Charts Frame.
58. Select Local Cmds->Add Command ...
The Add Local Command Frame is displayed.
59. For Short Command:, type: long listing
60. For Actual Command:, type: ls -l \F.\L
When this command is run, the "\F" and "\L" are replaced by the current
root module's file name and programming language.
61. Click on the Add Command Button in the Add Local Command
Frame.
62. Select Local Cmds->LONG LISTING.
The following output is displayed in the Run Local Command Window.
Running: ls -l one.c
-rw-r--r-- 1 john 73 Jun 3 14:01 one.c
Press RETURN to continue with +1Environment.
This rather simple example illustrates one way that +1Base can integrate
other tools and commands.
63. Press RETURN in the Run Local Command Window.
64. Select Switch->Tools Model.
Displays the Tools Model.
The Tools Model provides a means to define frequently used modules in order
to prevent cluttering up the overall logic of the Project Model.
+1Base supports five programming models: Project, Tools, Interrupts,
Objects, and Additional. Modules defined in any of these five models are
incorporated in the project's Makefile.
+1Base also supports two documentation models,
Reports and Miscellaneous Models,
which can be used to store project reports, work breakdown structures, and
other project related documentation in one central location.
65. Select Switch->Project Model.
66. Select Set->Editors ....
+1Base allows you to use any editor and options you desire.
The Locate Filename First? helps to locate the first occurrence of a
function when selected.
67. Click on the Cancel Button in the Set Editors Frame.
68. Select Set->Execute Command ...
+1Base allows you to specify the executable file name to
run with options, inputs, and outputs.
69. Click on the Cancel Button in the Set Execute Command Frame.
70. Select Set->Languages ...
+1Base can generate Makefiles for programs written in one or more
programming languages.
For each language, you need to specify the program suffix (e.g., "c"),
the compiler to use (e.g., "/bin/cc"), and programming options (e.g., "-g").
The Default language is: specifies the default program language
when a new module is added to the project.
Generate makefile dependency lists? allows you to specify whether
+1Base should generate Makefile dependency lists or not.
(Click on the Help Button for a description of what a
Makefile dependency list is.)
71. Click on the Cancel Button in the Set Languages Frame.
72. Select Set->Library Search Path ...
The library search path lists the libraries which your program needs to
compile. For example to compile an XView application, the
libraries needed are: -lxview, -lolgx, and -lX11. These three
libraries would be listed here and in this order for incorporation into the
project's Makefile.
73. Click on the Cancel Button in the Set Library Search Path
Frame.
74. Select Set->Measurements ...
+1Base allows you to profile your C code, time runs, time individual compiles,
and time links.
75. Click on the Cancel Button in the Set Measurements Frame.
76. Select Set->Unix Path Names ...
+1Base allows you to customize many of the Unix command options it uses from
this frame.
77. Click on the Cancel Button in the Set Unix Path Names
Frame.
78. Select Quick Travel->ROOT.
Displays the root module for the currently displayed model.
79. Select Quick Travel->Specify Module Id ...
Displays the Quick Travel Frame.
80. For Travel To Id:, type: 11
81. Click on the Quick Travel Button in the Quick Travel Frame.
Module 11 is displayed as the current root module.
82. Select Quick Travel->Add Entry ...
83. Click on the Add Quick Travel Entry Button in the
Add Quick Travel Entry Frame.
This adds destination ONE_ONE.C to the Quick Travel Menu.
The "P11" in the Travel To Id: field specifies module 11 in the
Project Model (versus say, T11, which would specify module 11 in the
Tools Model).
84. Select Quick Travel->ROOT.
The root module is displayed.
85. Select Quick Travel->ONE_ONE.C.
Module id 11 is displayed as the current root module on the screen.
This allows you one way to quickly travel to any location.
86. Select Model Mgt->Display Hash Table Statistics.
Displays information on the current project.
You can check, compress, and expand hash tables, as well as,
remove hash table entries from the Model Management Menu.
87. Click on the Done Button in the Hash Table Statistics Frame.
88. Select Options->Unix Interface->Command Tool.
A Unix command tool window is displayed.
Options->Unix Interface->Command Tool is the default selection, so
you could have simply clicked on the Options Button to perform the
same operation.
The current directory in this window is the project's src directory.
Type pwd to display the current working directory and
ls -l to display its contents.
89. In the Unix command tool, type exit to quit the
+1Environment Command Tool.
90. Select Exit->Exit Project.
The +1Environment 3.2 Current Projects Frame is now displayed.
91. Select Help->Submit Problem To +1 ...
The Submit Change Request Frame is displayed.
If you experience any problems or have any comments on our products,
you can use this frame to submit a change request to us using the Internet.
We'll discuss the Submit Change Request Frame later
in the +1CR Tutorial.
If you want to actually submit a change request, please fill
out the form and click on the Submit Change Request Button.
92. Click on the Cancel Button in the Submit Change Request
Frame.
The +1Environment 3.2 Current Projects Frame is now displayed again.
This ends the +1Base tutorial.
By selecting the Exit +1Environment Button,
you can exit the +1Environment and start the +1CM Tutorial at a latter time
or continue with the +1CM Tutorial.
+1CM Tutorial
+1CM is an advanced configuration management system supporting
identification, variations, baselines, accounting, auditing, and
access control.
+1CM enhances the Source Code Control System (SCCS), an automated
configuration management tool.
All basic CM commands, such as check in and check out of a file and
displaying differences between two versions of a file, are supported.
+1CM supports several predefined CM reports and allows you to define
your own customized reports.
Two very unique and fundamental features of +1CM are graphical viewpaths
and default editing.
A viewpath is an ordered list of directory names searched by +1CM to locate
a desired file.
Viewpaths support private user workspaces, faster compiles, faster links,
and allow multiple users to work on the same project in a
controlled manner.
A user can add, delete, or modify modules from the project model in the
user's own workspace.
Graphical viewpaths graphically display these changes to the user even
though these changes are not incorporated into the project's baseline
until a viewpath check in is performed.
Default editing is the combination of configuration management,
graphical viewpaths, and the use of any editor.
When a user selects a module to edit or view, +1CM will perform
the following steps:
- Does file exist in your current workspace? If so, edit file.
- Is file checked in under CM in your workspace?
If so, check out latest version and edit file.
- Is file checked in under CM in viewpath?
If so, check out latest version and edit file.
- If project version is not "Current", does a version of file exist?
If so, check out version and edit file.
- File still not found? Edit file as a new module.
+1CM can check out previous versions of a file, baseline a project,
build version libraries, delete the latest update, undo
previous check outs, support promotion, and maintain access control lists.
+1CM also support variations, e.g., +1CM can support both a Sun version and
an IBM version of the code.
All CM functions are located under the CM Menu.
+1CM is required to support multi-user mode.
1. Click on the 1. Main Program project in the
+1Environment 3.2 Current Projects Frame.
The Main Program Project is displayed.
If you exited from +1Environment in the +1Base Tutorial, you can
change to the tutorial directory where the PROJECTS file is located
and type plusone
to display the +1Environment 3.2 Current Projects Frame
and then click on the
1. Main Program project.
2. Select CM->Check In->Check In One Module.
The status line says: Select module to check in.
Select CM->Check In->Check In One Module
represents how to select a pull-right
menu item. First you select Check In from the CM Menu,
and while still holding down the menu button (B3 button), move the mouse
right to select the Check In One Module entry.
3. Click on module 2 to select file two.c.
The Check In One Module Window is displayed and
checks in the source code, documentation, and test case for the two.c module.
(If you see the error message "admin: Command not found.", you need to
add the /usr/sccs (SunOS) or /usr/ccs/bin (Solaris) SCCS directory to your path.
See our Installation Guide for details.)
4. Press RETURN in the Check In One Module Window.
5. Select CM->Check In->Check In All Modules.
This checks in all modules (except for two.c, which we just checked in).
6. Press RETURN in the Check In All Modules Window.
7. Edit file two.c.
+1CM first checks out file two.c from SCCS and opens a new window.
Edit function two.c to look as follows, then exit the editor.
two()
{
printf("two - This one changed too.\n");
}
8. Select Compile->Make Project.
The Make Project Window is displayed.
First read-only copies of files
Main_Program.c, one.c, one_one.c, and one_two.c are checked out.
File two.c was already checked out.
Next, all of the above files are compiled and linked.
9. Press RETURN in the Make Project Window.
10. Select Run->Run Program.
The following output is displayed:
Running: ./Main_Program
Main program
one - This one changed.
one_one
one_two
two - This one changed too.
Press RETURN to continue with +1Environment.
11. Press RETURN in the Run Program Window.
12. Select CM->Check In->Check In One Module.
The status line says: Select module to check in.
13. Click on module 2 to select file two.c.
The Check In One Module Window is displayed and prompts you
for comments.
14. For comments?, type: This is a comment for version 1.2 of two.c. and then press RETURN.
File two.c is checked into SCCS with the above comment.
To type in a single line comment, you only need to type in a
string of characters followed by a RETURN.
To type in a comment with multiple lines, type in a string of
characters and the '\' character at the end, then press RETURN.
For the last comment string, you would simply press RETURN without
using the '\' character.
15. Press RETURN in the Check In One Module Window.
16. Select CM->Check Out->Version Check Out ...
The status line says: Select module to check out version of.
17. Click on module 2 to select file two.c.
The Version Check Out Frame is displayed.
The Versions Of File In Viewpath displays:
1. ../../Main_Program/src/SCCS/s.two.c (Max. Ver.: 1.2)
This tells us that the maximum version (Max. Ver.) for file s.two.c is
1.2, i.e., there are currently only two versions, 1.1 and 1.2,
defined for this file and
there is only one directory in the viewpath.
18. For Version To Check Out (rel[.lev[.branch[.seq]]]): Field,
type: 1.1
This will check out version 1.1 of file two.c.
The "(rel[.lev[.branch[.seq]]])" string represents the syntax of valid entries
for this field, where rel stands for release number, lev for level
number, branch for branch number, and seq for sequence number.
In our example, 1.1 stands for release 1, level 1.
19. For File(s) To Check Out, click on Source Code.
Source code, documentation, header files, test case, test documentation, test
shell script, or all of these files can have a specific version checked out.
20. For Check Out File(s) For Editing:, click on Yes.
By selecting Yes, a read/writeable file is checked out of SCCS.
By selecting No, a read-only file is checked out.
21. Click on Version Check Out Button in the Version Check Out
Frame.
The Version Check Out Window is displayed
and version 1.1 of file two.c is checked out.
22. Press RETURN in the Version Check Out Window.
23. Select View->Source Code.
The status line says: Select module to view.
24. Click on module 2 to view file two.c.
File two.c is displayed using a read-only editor to prevent
accidental modification of the file.
Note the printf statement will only print the string "two".
25. Exit editor.
26. Select Compile->Make Project.
File two.c is recompiled.
27. Press RETURN in the Make Project Window.
28. Select Run->Run Program.
The following output is displayed:
Running: ./Main_Program
Main program
one - This one changed.
one_one
one_two
two
Press RETURN to continue with +1Environment.
29. Press RETURN in the Run Program Window.
30. Select CM->Check Out->Check Out Latest ...
The status line says: Select module to check latest version of.
31. Click on module 2 to select file two.c.
The Check Out Latest Frame is displayed.
32. For Type of File To Check Out, click on Source Code.
33. Click on the Check Out Latest Button in the Check Out
Latest Frame.
Since a read/writeable two.c file already exists, +1CM displays a pop up
window which says:
File two.c exists.
Do you want to overwrite this file?
The options are: "Yes, Overwrite File" or
No, do not overwrite file.
34. Click on Yes, Overwrite File.
The latest release for file two.c is checked out.
Checking out the latest file is useful when
returning to the original source code may be faster than
trying to debug a previously checked out function.
35. Press RETURN in the Check Out Latest Window.
36. Select Compile->Make Project.
File two.c is recompiled.
37. Press RETURN in the Make Project Window.
38. Select CM->Reports->Status Report.
The Status Report displays five fields for all functions:
User, Date/Time, S, Rel, and File.
User indicates who has the file checked out or who was the last
person to check in a file.
Date/Time indicates the date and time the file was checked out
or the date and time the file was checked in.
S represents the current status of the file, which can be 'I' for checked in
or 'O' for checked out.
Rel indicates current release of file.
File lists the file name of the checked in module.
You can print the report or save it into a specified file name.
39. Click on the Done Button in the CM Report Frame.
40. Select CM->Reports->VDD Report.
For each file checked in, the latest release and file name are displayed.
This output, along with problem report information for a software
release, make up the bulk of a Version Description Document (VDD).
In a Department of Defense (DoD) environment,
the VDD is required for each release of the software
before formal testing can begin.
41. Click on the Done Button in the CM Report Frame.
42. Select CM->Reports->Display Differences ...
The status line says: Select module to display differences.
43. Click on module 2 to select file two.c.
The Display Differences Frame is displayed.
44. For From Delta Id:, type 1.1
45. Click on the Display Differences Button in the Display
Differences Frame.
The following output is displayed:
Display Differences Report
--------------------------
Filename : two.c
From Delta Id : 1.1
To Delta Id : Latest
-------------------------------------------------------------------------------
Change #1: Delete 1 line starting with line 4 and add 1 line.
1. Del: printf("two\n");
1. Add: printf("two - This one changed too.\n");
-------------------------------------------------------------------------------
This report explains step-by-step, how to change version 1.1 of
file two.c into version 1.2 of file two.c, the lastest version.
46. Click on the Done Button in the CM Differences Report Frame.
47. Select CM->Reports->Line Version Report.
The status line says: Select module to display line versions.
48. Click on module 2 to select file two.c
The following Line Versions Report for file two.c is displayed.
Line Versions For SCCS/s.two.c Report
-------------------------------------------------------------------------------
Project: Main Program
Version: Current
Report Date: Friday June 20, 2003 17:24:50
-------------------------------------------------------------------------------
1.2
1.1
1.1 two()
1.1 {
1.2 printf("two - This one changed too.\n");
1.1 }
5 lines
-------------------------------------------------------------------------------
This report show the delta as to when the change was made to each line.
49. Click on the Done Button in the CM Report Frame.
50. Select CM->Variations->Add Variation ...
The Add New Variation Frame is displayed.
51. For Variation Name:, type: IBM Variation.
52. For #defines Defined:, type: IBM.
You can list one or more define variables to specify a variation,
such as "SUN IBM DEBUG".
53. For Variation Suffix:, type: ibm.
54. For Variation Id:, type: I.
The variation id is currently not used by +1CM.
55. Click on the Add Variation Button.
This defines the IBM Variation. Another common variation is DEBUG,
for debugging an application using #ifdef DEBUG statements in the source code.
56. Select CM->Variations->IBM VARIATION.
The bottom, left corner of the Project Frame
displays: Variation: IBM VARIATION.
57. Edit file one.c.
Edit function one.c to look as follows, then exit the editor:
one()
{
printf("one - This one changed.\n");
#ifdef IBM
printf("IBM version of code.\n");
#endif
one_one();
one_two();
}
58. Select Compile->Compile.
59. Press RETURN in the Compile Programs Window.
60. Select Run->Run Program or click on the Run Button.
The following output is displayed:
Running: ./Main_Program_ibm
main program
one - This one changed.
IBM version of code.
one one
one two
two - This one changed too.
Press RETURN to continue with +1Environment.
61. Press RETURN in the Run Program Window.
62. Select CM->Variations->NO VARIATION.
63. Select Run->Run Program or click on the Run Button.
The following output is displayed:
Running: ./Main_Program
main program
one - This one changed.
one one
one two
two - This one changed too.
Press RETURN to continue with +1Environment.
64. Press RETURN in the Run Program Window.
65. Select
CM->Administration->Access Control Lists->Add Users To ACL ...
The status line says: Select module to add users to Access
Control List (ACL).
66. Click on module 1 to select file one.c.
The Add Users To ACL Frame is displayed.
67. For Users/Group Ids to add to "one" ACL:, type: your_user_id
Type in your own user id for the ACL.
68. Click on the Add Users To ACL Button in the Add Users To
ACL Frame.
You are now the only user who can edit file one.c.
69. Press RETURN in the Add Users To ACL Window.
70. Select CM->Reports->ACL Report.
This displays the Access Control List (ACL) Report and shows your user
id as the only user who can modify file one.c.
71. Click on the Done Button in the CM Report Frame.
72. Select CM->Administration->Undo Previous Check Out ...
The status line says: Select module to undo previous check out.
73. Click on module 2 to select file two.c.
The Undo Previous Check Out Frame is displayed.
While we checked out file two.c, we never made any changes to it.
This operation undoes the previous check out which allows others to
check it out.
This command is useful if a person is out sick or goes on vacation but has
the file checked out in their own private workspace when someone else needs
to make changes to the same file.
74. Click on the Undo Check Out in the Undo Previous Check Out
Frame.
75. Press RETURN in the Undo Previous Check Out Window.
76. Select CM->Check In->Check In All Modules.
We are preparing to perform a baseline.
All files need to be checked into the baseline directory beforehand.
77. For comments? for file one.c, type: Added IBM specific code.
78. Press RETURN in the Check In All Modules Window.
79. Select Compile->Compile.
Before creating a new baseline, it is always a very good idea to compile the
code again to ensure that there are no errors.
If you skip this step and create the baseline with an error in the code,
the error will be propagated.
80. Press RETURN in the Compile Programs Window.
No errors today. Now let's baseline the code.
81. Select CM->Administration->Baseline Project ...
The Baseline Project Frame, located in the top left-hand corner,
is displayed and prompts for a version name.
82. For Version Name, type: Release 1.
83. Click on the Baseline Project Button in the Baseline Project
Frame.
The Baseline Project Window is displayed.
Baselining a project involves four basic steps:
- First make sure all modules have been checked in.
- Check in all project and documentation models in the ../plusone directory.
- Check out all project and documentation models.
- Baseline all project files.
At the end of the Baseline Project Window, +1CM says:
Version "Release_1" added to PROJECTS file.
84. Press RETURN in the Baseline Project Window.
85. Click on the Done Button in the warning message.
86. Select Exit->Exit Project.
The +1Environment 3.2 Current Projects Frame is now displayed.
Note that Release 1 of the Main Program Project is now defined.
87. Click on 1. Main Program - Current in
the +1Environment 3.2 Current Projects Frame.
88. Select Change Model->Add Module ...
The status line says: Select location of new module.
89. Click to the right of module 2.
The Add New Module Frame is now displayed.
90. For Module Name, type: three.
91. Click on Add Module Button.
92. Edit three.c.
Edit function three.c to look as follows, then exit the editor:
three()
{
printf("three\n");
}
93. Edit Main_Program.c.
Edit function Main_Program.c to look as follows, then exit the editor.
main()
{
printf("main program\n");
one();
two();
three();
}
94. Select Compile->Compile.
Since we added a new module, we need to run Compile from the
Compile Menu to create a new Makefile.
95. Press RETURN in the Compile Programs Window.
96. Select Run->Run Program.
The following output is displayed:
Running: ./Main_Program
main program
one - This one changed.
one one
one two
two - This one changed too.
three
Press RETURN to continue with +1Environment.
97. Press RETURN in the Run Program Window.
98. Select CM->Check In All Modules.
99. For comments? for Main_Program.c, type: Added call to function
three.
100. Press RETURN in the Check In All Modules Window.
101. Select Exit->Exit Project.
The +1Environment 3.2 Current Projects Frame is now displayed.
102. Click on 2. Main Program - Release_1 in the
+1Environment 3.2 Current Projects Frame.
The +1Environment Project Frame is displayed with a title of
"Main Program - Version: Release_1" along the top of the frame
and with the graphical calling structure for this release of source code.
103. Select Compile->Build Version Library.
Before you can compile a baselined version, you must first build a version
library.
This creates a file
Main_Program/baselines/Release_1/REV_2.1.1/src/Main_Program.a which is
used by the Makefile.
You only have to perform this operation once.
You can ignore the "Warning: Infinite loop" messages, if any.
If you forget to run the Build Version Library Command, you will see
a message such as:
"make: Fatal error: Don't know how to make target ../../../Main_Program/baselines/Release_1/REV_2.1.1/src/Main_Program.a."
This simply means that the Main_Program.a file does not exist and needs to
be created using the Build Version Library Command.
104. Press RETURN in the Build Version Library Window.
105. Select Compile->Compile.
106. Press RETURN in the Compile Programs Window.
107. Select Run->Run Program.
This runs Release 1 of the executable code.
108. Press RETURN in the Run Program Window.
109. Select CM->Variations->IBM VARIATION.
IBM VARIATION is displayed at the bottom left corner of the +1Environment
Project Frame.
110. Select Compile->Build Version Library.
File one.c, which contains IBM specific source code, is recompiled and
the Main_Program_ibm.a library is created.
111. Press RETURN in the Build Version Library Window.
112. Select Compile->Compile.
113. Press RETURN in the Compile Programs Window.
114. Select Run->Run Program.
The following output is displayed. This output is for
Release 1 of the IBM Variation for the Main Program Project.
Running: ./Main_Program_ibm
main program
one - This one changed.
IBM version of code.
one one
one two
two - This one changed too.
Press RETURN to continue with +1Environment.
115. Press RETURN in the Run Program Window.
116. Select CM->Variations->NO VARIATION.
117. Edit file two.c.
Edit function two.c to look as follows, then exit the editor.
two()
{
printf("two - This one changed too.\n");
printf("This change represents a correction which needed\n");
printf("to be added to Release 1.\n");
}
118. Select Compile->Compile.
119. Press RETURN in the Compile Programs Window.
120. Select Run->Run Program.
The following output is displayed:
Running: ./Main_Program
main program
one - This one changed.
one one
one two
two - This one changed too.
This change represents a correction which needed
to be added to Release 1.
Press RETURN to continue with +1Environment.
121. Press RETURN in the Run Program Window.
122. Select CM->Check In->Check In All Modules.
File two.c is checked into SCCS.
123. Press RETURN in the Check In All Modules Window.
124. Select CM->Reports->Status Report.
File two.c is the only file which was updated in Release 1.
125. Click on the Done Button in the CM Report Frame.
126. Select Exit->Exit Project.
127. Click on the Add Project Button.
128. For Project Name:, type: Main Program Workspace.
129. For Project File Name:, type: Main Program.
To define a viewpath to an existing project, the project file name
must match the project file name defined for the baseline directory,
i.e., the last directory in the viewpath.
130. For ViewPath:, type: my_workspace Main_Program
The viewpath defines two directories: a private user workspace directory and
the baseline directory.
131. Click on the Add Project Entry Button in the
Add Project Entry Frame.
132. Travel down module 3.
Click left most mouse button below module 3.
Module 3 is now the current root module displayed on screen.
133. Select Change Model->Add Module ...
The Add New Module Frame is displayed.
134. For Module Name:, type: three one.
135. Click on the Add Module Button in the Add New Module Frame.
The following warning is displayed:
WARNING: To add module, the parent module will first be checked out.
136. Click on the Done Button.
Module three_one.c is added.
137. Press RETURN in the Check Out Parent Window.
File three.c is checked out for you.
138. Edit function three_one.c.
Edit function three_one.c to look as follows, then exit the editor.
three_one()
{
printf("three one\n");
}
139. Edit function three.c.
Edit function three.c to look as follows, then exit the editor.
three()
{
printf("three\n");
three_one();
}
140. Select Compile->Compile.
The following output is displayed:
Creating Makefile dependencies ... Done.
cc -c -O three.c 2>&1|tee -a errors
cc -c -O three_one.c 2>&1|tee -a errors
make: Fatal error: Don't know how to make target
`../../Main_Program/src/Main_Program.a'
Press Return to continue with +1Environment.
This error indicates that file Main_Program.a does not exist.
Let's create this missing library.
141. Press RETURN in the Compile Programs Window.
142. Select Exit->Exit Project.
143. Click on 1. Main Program - Current in the
+1Environment 3.2 Current Projects Frame.
Note that module three one does not exist in the baseline directory.
144. Select Compile->Archive.
This creates a project library named Main_Program.a.
145. Press RETURN in the Archive Program Window.
146. Select Run->Run Program.
The following output is displayed.
Running: ./Main_Program
main program
one - This one changed.
one one
one two
two - This one changed too.
three
Press RETURN to continue with +1Environment.
Once again note that module three one does not exist in the
baseline directory.
147. Press RETURN in the Run Program Window.
148. Select Exit->Exit Project.
149. Click on 3. Main Program Workspace - Current in the
+1Environment 3.2 Current Projects Frame.
150. Select Compile->Compile.
151. Press RETURN in the Compile Programs Window.
152. Select Run->Run Program.
The following output is displayed.
Running: ./Main_Program
main program
one - This one changed.
one one
one two
two - This one changed too.
three
three one
Press RETURN to continue with +1Environment.
153. Press RETURN in the Run Program Window.
154. Select CM->Viewpath Check In->Check In All Modules.
The Viewpath Check In Frame is now displayed.
We are now ready to perform a viewpath check in.
A viewpath check in checks in all modules in the current directory into
the next directory specified by the viewpath.
In this operation, we will incorporate our changes
made in the my_workspace directory into the baseline directory.
155. For Global Comment, type: Added three one functionality to program.
If you enter a global comment,
this comment is used for all files being checked in.
If you leave the global comment field blank, you will be prompted for
a comment for each file being checked in.
The actual length of the comment can be longer
than what is displayed in this frame.
156. Click on the Check In All Files Button in the
Viewpath Check In Frame.
The Viewpath Check In Window is displayed.
A new delta is created for file three.c and the three_one files are initially
checked in.
157. Press RETURN in the Viewpath Check In Window.
158. Select Exit->Exit Project.
159. Select 1. Main Program Current from
the +1Environment 3.2 Current Projects Frame.
The baseline directory now has the three_one changes
which the user initially created and tested in their own workspace.
160. Select Compile->Compile.
We need to select Compile because module three one was added to the baseline
directory.
161. Press RETURN in the Compile Programs Window.
162. Select Run->Run Program.
The following output is displayed:
Running: ./Main_Program
main program
one - This one changed.
one one
one two
two - This one changed too.
three
three one
Press RETURN to continue with +1Environment.
163. Press RETURN in the Run Program Window.
164. Select Compile->Archive.
This updates the existing project library named Main_Program.a
to contain three.o and three_one.o.
165. Press RETURN in the Archive Program Window.
166. Select Exit->Exit Project.
The following steps show how +1CM will inform you if another
programmer has a function already checked out for edit.
This part of the demonstration requires a second user or
access to a second user id.
If desired, you may skip this part of the +1CM Tutorial
and begin the +1CR Tutorial now.
167. Select 3. Main Program Workspace - Current in the
+1Environment 3.2 Current Projects Frame.
168. Edit file two.c and then exit editor.
We just want to have file two.c checked out in our user workspace.
169. Logon using a second user id or have another user login.
In another window or from a second Sun workstation, login using a
second user id.
170. As the second user, type: mkdir tutorial2; cd tutorial2.
171. Type: plusone.
Type plusone at the Unix prompt.
If you see Xlib error messages, type xhost + in a window
logged on with your user id (versus the user id of the second user)
and try again.
+1Base will display the +1Environment 3.2 Current Projects Frame.
If this is a demonstration copy of the software, you will first be greeted with
a welcome message.
Click on the Continue Demo Button.
If this is the first time the new user has run +1Environment or are running
a demonstration license, the
+1 Software Engineering Software License Agreement will be displayed.
After reading the software license, if the new user accepts all
terms and conditions of the license, click on the Accept Button.
Otherwise, click on the Do Not Accept Button, which will exit you from
the +1Environment.
172. Click on the Add Project Button in the
+1Environment 3.2 Current Projects Frame.
The Add Project Entry Frame is displayed.
173. For Project Name:, type: Workspace For User 2.
174. For Project File Name:, type: Main Program.
The project file name must match the project file name defined in
the baseline directory.
175. For Viewpath:, type:
workspace_2 /path_name/Main_Program
The path name to the Main_Program directory needs to be specified
(e.g., /export/home/john/tutorial/Main_Program).
The path, /path_name/Main_Program, points to the baseline directory and
Main_Program must be at the end of the directory name.
You can also type in a relative path name for the baseline directory
if you know it.
For example, if you typed: su new_user, which logs you in
as a new user without changing your current directory,
the Viewpath can be workspace_2 Main_Program.
176. Click on the Add Project Entry Button in the
Add Project Frame.
177. Edit function two.c
+1CM informs you that file two.c is currently being edited.
The person's full name and user id is part of the message.
For example, if Joe Blow (user id "joe") has file two.c checked out
and you try to edit file two.c, +1CM displays:
File two.c is currently being edited by Joe Blow (joe).
178. Click on the Done Button.
179. Travel down module 3.
Click the B1 mouse button below module 3 which is file three.c.
180. Edit function three_one.c.
The following error message is displayed:
Need write access to /export/home/john/tutorial/Main_Program/src/SCCS.
This message states that the second user does not have write access
to the SCCS directory and needs such access in order to check out the
file three_one.c.
The actual directory name will match the path to your baseline directory.
181. Click on the Done Button.
182. Switching to the first user's +1Environment 3.2 Project Frame,
select Exit->Exit Project.
183. Select 1. Main Program - Current in the
+1Environment 3.2 Current Projects Frame.
184. Select Options->Unix->Command Tool.
This opens a command tool window.
185. Type in the command tool window: ls -ld SCCS; chmod 775 SCCS; ls -ld SCCS
This will grant read/write access to all users in the same group and will
display the permissions bits before and after running the chmod command.
If the second user is not in the same group as the first user, then
type: chmod 777 SCCS.
However, it is highly recommended that all programmers be a member of the
same group id or project group id instead of granting
read/write access to all users on the system.
186. Type exit in the +1Environment Command Tool Window.
This quits the command tool window.
187. As the second user again, edit function three_one.c.
Edit function three_one.c to look as follows, then exit editor.
(If you see "Error: Can't Open display" message, you will need to exit
the +1Environment, set your DISPLAY environment variable to ":0.0" (e.g.,
if using csh, type: setenv DISPLAY :0.0), and then start plusone again.)
three_one()
{
printf("three one\n");
printf("Change made by second user.\n");
}
188. Select Compile->Compile.
189. Press RETURN in the Compile Programs Window.
190. Select Run->Run Program.
The following output is displayed.
Running: ./Main_Program
main program
one - This one changed.
one one
one two
two - This one changed too.
three
three one
Change made by second user.
Press RETURN to continue with +1Environment.
191. Press RETURN in the Run Program Window.
192. Select Exit->Exit Project.
To check in the changes made by the second user into the baseline
directory, this user would need to perform a viewpath check in.
193. Click on the Exit +1Environment Button.
Exits +1Environment. We are done using the second user id for now.
194. As the first user, select Exit->Exit Project.
This concludes the +1CM Tutorial.
+1CR Tutorial
+1CR supports problem report management which allows you to submit,
list, view, query, print, and administer problem reports.
When combined with +1CM, +1CR can support process management.
This ensures that when a file is checked in using +1CM, the problem
report number exists and its current status allows for check ins.
Using Metrics4Project, +1CR calculates problem report metrics including
the number of open, closed, and total number of problem reports
organized by status, priority, category, class, and longevity.
Project metrics can be run in the background at any time on a
daily, weekly, or monthly basis.
Metrics4Project's options are described in our Metrics User Manual located
on our web site at http://www.plus-one.com.
Metrics2GIF can be used to graphically represent metrics generated from
Metrics4Project as a GIF graphic.
The GIF file can then be viewed on your web site and can be
updated regularly as a cron job.
All problem reporting functions are located under the CR Menu.
Change requests for a project can be viewed in any project, but modified
only in the baseline directory of the "Current" version of the project.
The term change request is used rather than problem reports because
an enhancement is a request for a change even though it may not be a
problem.
1. Click on the 1. Main Program - Current project in the
+1Environment 3.2 Current Projects Frame.
The Main Program Project is displayed.
If you exited from +1Environment in the +1CM Tutorial, you can
change to the tutorial directory where the PROJECTS file is located
and type plusone
to display the +1Environment 3.2 Current Projects Frame
and then click on the 1. Main Program - Current project.
2. Select CR->Submit Change Request ...
The Submit Change Request Frame is displayed.
This frame is used by programmers and others
who are not allowed to enter change requests directly
into the +1CR database.
3. For Short Description, type:
Topology Map Is Not Updated After Device Reboots.
4. For Version Found In:, type: Release 1.
5. For Detailed Description:, type
the following text (or, alternatively, type "Silly sam at the sea shore."
which is shorter).
When a device is rebooted on the network, the topology map should
recognize this event and change it's status from red, which indicates
the device is down, to green, which indicates the device is up.
Since the change from red to green does not occur automatically,
operators must manually ping the device using the status monitoring tool
after any reboots.
6. For Mail Change Request To:, type: your_user_id.
Usually this field is filled in for you.
You can edit file ../cr/cr_manager and add one or more user id's on the
first line of this file.
The listed ids will be used as the default user ids when sending change
requests.
Before we submit this change request, we went with some defaults.
Since the problem has not yet been fixed, the version fixed in field is
left blank.
Priority can range from 1 (urgent) to 5 (low). We went with the default
value of 3 which represents a high priority.
Category was left as software.
Valid categories are requirement, design,
documentation, software, and enhancement.
Class can be 1. Customer Approval Required or
2. Customer Approval Not Required.
Priorities and classes match what is required by DoD 2167A.
The submitted user and date defaults to your user id with today's date.
7. Click on the Submit Change Request Button in the
Submit Change Request Frame.
+1CR sends an e-mail message containing the values for the above entries.
8. Select CR->Administration->Add Change Request ...
The Add Change Request Frame is displayed.
While anyone can submit a change request, only those who have access
can actually add a change request to the +1CR database using the
Add Change Request Frame.
9. Click on Sun's mailtool icon and select the mail entry titled
New Change Request.
Using Sun's mailtool,
view the change request which you just submitted to yourself.
10. For Short Description, type:
Topology Map Is Not Updated After Device Reboots.
A faster method would be to cut and paste values from the mail message
into the corresponding fields in the Add Change Request Frame.
In the future, we hope to allow mail messages to be entered into the
+1CR database without having to reenter the data as is currently done.
11. For Found In:, type: 1
A value of 1 represents Release 1 of the software.
You can type in Release 1, if desired, but using 1
makes it simpler to query change requests.
12. For Submitted By:, type:
your_user_id<TAB>today's_date
The Submitted By: Field displays one or more user id's, a date, and whether the
the date is a due date or an actual date.
The first field contains the person who submitted the change request.
The second field, reached by pressing the TAB key, contains the
date when the change request was submitted.
Dates can be entered in two formats: YYMMDD or MM/DD/YY, where MM represents
the month; DD, the day; and YY, the year.
13. At the end of the Submitted By: field,
set the menu item to Actual Date.
Setting this menu item is optional for all eight fields.
The menu selections are: blank, Actual Date, and Due Date.
For Submitted By:, you might have a value of Due Date if
a problem was detected but a submitted change request describing the
problem has yet to be written.
For Closed By:, the menu selection provides a reason why the
change request was closed. Values for this field are:
blank, Actual Date, Due Date, Tested, Visual Inspection, Duplicate CR,
Not Repeatable, and See Description.
14. For Description of Problem, type (or cut and paste from the
mail message text):
When a device is rebooted on the network, the topology map should
recognize this event and change it's status from red to green.
This is not occurring.
Operators must manually update the topology map after a device reboots.
The fastest way to "type" in the above description would be to cut and
paste it from the change request mail message.
15. Click on the Add Entry Button in the Add Change
Request Frame.
Change request number 1 is added to the +1CR database.
16. Click on the Clear CR Fields Button in the Add Change
Request Frame.
This clears all fields in the Add Change Request Frame and
increments the CR Number Field.
+1CR's default numbering scheme is to number change requests
starting with 1 and increment by 1 (i.e., 1, 2, 3, ...).
+1CR can, however, assign a default change request number
which consists of the first eight (8) characters of the project name,
a hyphen, and a number.
The number can be incremented by any desired amount (e.g., by 10).
You can click on the Help Button in the Add Change Request Frame
for additional information.
17. For Short Description:, type: Problem Number 2.
Let's enter two change requests quickly.
You can press the TAB key to select the next field in this frame.
You can also press SHIFT-TAB to go back to the previous field.
18. For Found In:, type: 1.
19. For Fixed In:, type: 2.
20. For Status, select Fixed.
21. For Priority, select 1.
22. For Submitted By:, type: sam <TAB> today's date.
23. For Approved By:, type: CCB <TAB> today's date.
We skipped the Reviewed By entry.
24. For Assigned To:, type: john <TAB> today's date.
25. For Fixed By:, type: john <TAB> today's date.
26. For Description of Problem, type: This is the second problem.
27. For Corrective Action, type: Added
code to the status.c function.
28. Click on the Add Entry Button in the Add Change Request
Frame.
29. Click on the Clear CR Fields Button in the Add Change
Request Frame.
30. For Short Description:, type: Problem Number 3.
31. For Found In:, type: 2.
32. For Submitted By:, type: mary <TAB> today's date.
33. For Description of Problem, type: This is the third problem.
34. Click on the Add Entry Button in the Add Change Request
Frame.
35. Click on the Cancel Button in the Add Change Request Frame.
36. Select CR->View All Change Requests ...
The View Change Request Frame is displayed and contains
the first change request in the +1CR database.
37. Click on the Next Entry Button in the View Change Request
Frame.
Change request 2 is displayed.
38. Click on the Next Entry Button again in the View Change Request
Frame.
Change request 3 is displayed.
39. Click on the Previous Entry Button in the View Change Request
Frame.
Change request 2 is displayed.
40. Click on the Go To Entry ... Button in the View Change Request
Frame.
The Go To Change Request Entry Frame is displayed.
41. For Enter change request number to display:, type: 1
42. Click on the Go To Entry Button in the Go To Change
Request Entry Frame.
Change request 1 is displayed.
43. Select List Entries->Table ...
The List Change Request Entries Frame is displayed.
All change requests are listed in tabular format.
You can print this list or save the list as a file.
44. Select List Entries->Summary Report ...
An abbreviated listing of all change requests is listed
in the List Change Request Entries Frame.
45. Select List Entries->Detailed Report ...
All contents of the change request are fully listed in
the List Change Request Entries Frame.
46. Click on Done Button in the
List Change Request Entries Frame.
47. Click on Display Metrics Button in the View
Change Request Frame.
The CR Metrics Frame is displayed.
The generated Metrics4Project report shows the
status, priority, category, class, and longevity for each change request.
You can print this report or save the report in a file.
48. Click on Done Button in the CR Metrics Frame.
49. Click on Cancel Button in the View Change Request Frame.
50. Select CR->Query Change Requests ...
The Query Change Requests Frame is displayed.
51. For Priority:, select: <=2 from the pull down menu.
This will select priorities of 1 (Urgent) and 2 (Very High).
52. For Assigned To:, type: john
This limits the query to select only open change requests
which are assigned to user john and have a priority of 1 or 2.
53. Click on the Query Change Requests Button in the
Query Change Requests Frame.
The View Change Request Frame is displayed.
54. Select List Entries->Summary Report ...
The List Change Request Entries Frame is displayed containing
only those change requests which are assigned to user john and
have a priority of 1 or 2.
55. Click on the Done Button in the List Change
Request Entries Frame.
56. Click on Display Metrics Button in the
List Change Request Entries Frame.
The CR Metrics Frame is displayed.
This report only shows the status, priority, category, class, and longevity
for all change requests which are assigned to user john and have a
priority of 1 or 2.
57. Click on Done Button in the CR Metrics Frame.
58. Click on Cancel Button in the View Change Request Frame.
59. Select CR->CR Administration->Modify Change Requests ...
The Query Change Requests Frame is displayed.
To modify all change requests, click on the Query
Change Requests Button.
Alternatively, you can select values for one or more fields to
specify which change requests to modify.
60. For Status:, select Submitted.
61. Click on the Query Change Requests Button in the
Query Change Requests Frame.
The Modify Change Request Frame is displayed.
Only those change requests whose status is Submitted are displayed.
62. For Approved By:, type: CCB.
63. For Approved By:'s date field, type today's date.
The date can be entered in two formats: YYMMDD or MM/DD/YY.
64. For Approved By:'s date type field, select Actual Date.
65. Select Status->Assigned.
66. For Assigned To:, type: john.
67. For Assigned To:'s date field, type today's date.
The date can be entered in two formats: YYMMDD or MM/DD/YY.
68. For Assigned To:'s date type field, select Actual Date.
69. Click on the Modify Entry Button in the Modify Change
Request Frame.
The change request is updated with the new values in the +1CR database.
You can also click on the Next Entry Button to display and
update other entries.
70. Click on Cancel Button in the Modify Change Request Frame.
71. Select CR->Display Project Metrics ...
The CR Metrics Frame is displayed.
Note we have one change request which as been assigned.
72. Click on the Done Button in the CR Metrics Frame.
73. Select Exit->Exit Project.
74. Close Sun's Mailtool window.
This concludes the +1CR Tutorial.
+1DataTree Tutorial
+1DataTree predefines the following modules:
- Data Elements,
- Data Structures,
- Files,
- External Entities,
- Glossary, and
- Personnel.
You can add, delete, edit, view, and print +1DataTree entries.
Information stored in +1DataTree is located in one central location and
can used by +1Reports.
+1Base allows you to specify the inputs and outputs for a procedure or
function.
+1DataTree allows you to define each input and output in more detail.
When generating the Module Description using +1Reports,
+1Reports extracts the short description and +1DataTree entry type
for each input, output, and return value.
1. Click on the 1. Main Program - Current project in the
+1Environment 3.2 Current Projects Frame.
The Main Program Project is displayed.
If you exited from +1Environment in the +1CR Tutorial, you can
change to the tutorial directory where the PROJECTS file is located
and type plusone
to display the +1Environment 3.2 Current Projects Frame
and then click on the 1. Main Program - Current project.
2. Travel down module 1.
To travel down module 1,
move the mouse's hot point below module 1 and click the B1 button.
Module one now becomes the parent module on the screen.
3. Select Change Model->I/O For Module ...
The I/O For Module one Frame is displayed.
4. Click on the Add Input Button in the I/O For Module one Frame.
The Add Input Frame is displayed.
5. For Input Name:, type: print_flag.
6. Click on Variable passed in call in the Add Input Frame.
7. Click on the Add Input Button in the Add Input Frame.
The print_flag is now defined as an input parameter to module one.
8. Click on the Add Input Button in the Add Input Frame.
9. For Input Name:, type: state_abbr.
10. Click on the Add Input Button in the Add Input Frame.
The state_abbr is now defined as a global variable to module one.
11. Click on the Add Output Button in the I/O For Module one Frame.
The Add Output Frame is displayed.
12. For Output Name:, type: state_report.
13. Click on the Add Output Button in the Add Output Frame.
The state_report is now defined as a global output variable to module one.
14. Click on the Cancel Button in the I/O For Module one Frame.
15. Select Switch->DataTree.
The +1DataTree Model is now displayed.
16. Travel down module 1.
Data Elements becomes the root module on the screen.
17. Select DataTree->Add Entry ...
The Add Data Element Frame is displayed.
18. For Data Element:, type: print_flag.
19. For Description:, type: If set to true, print State's name in
report.
20. For Detailed Description, type:
A boolean flag that specifies whether or not to print the state's name
in the report.
21. Click on the Add Data Element Button in the Add Data Element
Frame.
The print_flag data element is added.
22. Travel up one level.
Move the mouse's hot point above the Data Elements Module and click the B1
button. The DataTree Module is the root module on the screen.
23. Travel down module 2.
The Data Structures Module is the root module on the screen.
24. Select DataTree->Add Entry ...
The Add Data Structure or Data Element Frame is displayed.
25. Click on Add Data Structure Button in the
Add Data Structure or Data Element Frame.
The Add Data Structure Frame is displayed.
26. For Data Structure:, type: state_struct.
27. For Description:, type: State structure..
28. For Detailed Description:, type:
Can hold state information for up to MAX_STATES number of states.
29. Click on Add Data Structure Button in the Add Data Structure
Frame.
30. Travel down module 1.
Module state_struct is the root module on the screen.
31. Select DataTree->Add Entry ...
The Add Data Structure or Data Element Frame is displayed.
32. Click on Add Data Element Button in the
Add Data Structure or Data Element Frame.
The Add Data Element Frame is displayed.
33. For Data Element:, type: state_abbr.
34. For Description:, type:
Two character abbreviation for the state's name..
35. For Detailed Description Window, type:
Below are the valid two character state codes for state_abbr
which this program uses:
<p>
<pre>
AK Alaska
CA California
FL Florida
NY New York
TX Texas
</pre>
36. Click on the Add Data Element Button in the
Add Data Element Frame.
37. Select DataTree->Add Entry ...
The status line says: Select location of new module.
38. Click mouse button to the right of module 1.
The Add Data Structure or Data Element Frame is displayed.
39. Click on Add Data Element Button in the
Add Data Structure or Data Element Frame.
The Add Data Element Frame is displayed.
40. For Data Element:, type: state_name.
41. For Description:, type: Name of State.
42. For Detailed Description Window, type:
43. Click on the Add Data Element Button in the
Add Data Element Frame.
44. Travel up one module.
Data Structures Module is the current root module.
45. Travel up one module again.
DataTree Module is the current root module.
46. Travel down module 3.
Files is now the current root module.
47. Select DataTree->Add Entry ...
The Add File, Data Structure, or Data Element Frame? is displayed.
48. Click on Add File Button in the
Add File, Data Structure, or Data Element Frame?
The Add File Frame is displayed.
49. For File:, type: state_report.
50. For Description, type: File contains report output.
51. For Detailed Description, type:
52. Click on the Add File Button in the Add File Frame.
If the file is a structured file, you can define the file's
structure by defining a data structure below the file's module.
53. Select DataTree->View Entry ...
The Status line says: Select module to view.
54. Click on module 1 to select module state_report.
The View File Frame for file states is displayed.
55. Click on the Done Button in the View File Frame.
56. Select DataTree->Edit Entry ...
The Status line says: Select module to edit.
57. Click on module 1 to select module state_report.
The Edit File Frame for file state_report is displayed.
58. Modify the detailed description for file state_report.
In the Detailed Description Window, change "previous year."
in the description to "current year."
59. Click on the Modify Entry Button in the Edit File Frame.
60. Select DataTree->View Entry ...
The Status line says: Select module to view.
61. Click on module 1 to select module state_report.
The View File Frame for file state_report is displayed.
Note how the detailed description says "for current year."
62. Click on the Done Button in the View File Frame.
63. Select DataTree->Print Entries ...
The Print DataTree Frame is displayed.
From here, you can print the
data elements, data structures, files, external
entities, glossary terms, and personnel information for the project.
You can print all modules, a subtree of modules, or a single module
in condensed or one entry per page format.
64. Click on Data Elements, Data Structures, and Files.
65. Click on Generate Report Button.
The DataTree Report is displayed.
66. Click on the Done Button in the DataTree Report Frame.
67. Select Exit->Exit Project.
This concludes the +1DataTree Tutorial.
+1Test Tutorial
+1Test supports unit, integration, and regression testing.
A unit test tests an individual source code module.
Integration testing tests a "build" (i.e., a submodel) of the project.
And regression testing runs all currently defined test cases.
For each module being tested,
a test case, test shell script, and the expected and actual results are
used to generate the following test reports:
- Pass/Fail Report - Shows whether all tests passed or one or more tests
failed.
- Test Summary Report - Shows for each test case whether it passed or failed.
- Detailed Report - Shows for each test case whether it passed or failed,
and, if it did fail, shows the differences between the expected and
actual results.
You can run a single test or all currently defined test cases at any time
to detect if a known change has generated an error somewhere else in the
program.
+1Test is used with our metric tools to calculate the Integration Test
Percentage (ITP) value, which represents how much of the source code
has been tested based on lines of code (versus what a "unit" is).
Since +1Reports can incorporate testing information, the +1Test tutorial
is presented first.
1. Click on the 1. Main Program - Current project in the
+1Environment 3.2 Current Projects Frame.
The Main Program Project is displayed.
If you exited from +1Environment in the +1DataTree Tutorial, you can
change to the tutorial directory where the PROJECTS file is located
and type plusone
to display the +1Environment 3.2 Current Projects Frame
and then click on the 1. Main Program - Current project.
2. Travel down module 1.
Move the mouse's hot point below module 1 and click the B1 button.
Module one now becomes the parent on the screen.
3. Travel down module 1 again.
Module one_one now becomes the parent on the screen.
4. Select Test->Add Test Case.
A test case is displayed to the right of module one_one.
5. Select Test->Edit->Test Case.
File ../test/one_one.c is displayed in the editor.
6. Edit ../test/one_one.c.
Edit function ../test/one_one.c to look as follows, then exit editor.
/*
Test driver for module one_one.
*/
main()
{
one_one();
}
7. Select Test->Compile Test Cases.
The Compile Test Cases Window is displayed.
When compiling, +1Test links with the archived object
library for the project.
If you see an error in the link step, you would need to create
the archive object library by running Compile->Archive and
then run Test->Compile Test Cases again.
8. Press RETURN in the Compile Test Cases Window.
9. Select Test->Edit->Expected Test Results.
If desired, only a selected set of users can edit the expected test results.
10. Edit ../test/one_one.E.
Edit file ../test/one_one.E to look as follows, then exit editor.
one one
11. Select Test->Run One Test Case.
The Run One Test Case Window is displayed and contains:
Run One Test Case
-----------------
TESTING MODULE one_one.c
No differences detected.
Press RETURN to continue with +1Environment.
The test shell script, which you may edit, can run the test case program one
or more times with different inputs.
The actual and expected results are compared to determine if the
test case passed or failed.
12. Press RETURN in the Run One Test Case Window.
13. Travel up one module.
Module 1 is current root module on the screen.
14. Select Test->Add Test Case.
15. Select Test->Edit->Test Case.
16. Edit ../test/one.c.
Edit function ../test/one.c to look as follows, then exit editor.
/*
Test case driver for module one.
*/
main()
{
one();
}
17. Select Test->Compile Test Cases.
The Compile Test Cases Window is displayed with the following output:
Creating Makefile dependencies ... Done.
cc -c -O one.c 2>&1|tee -a errors
Linking Object Files For Test Case one ... Done.
Press RETURN to continue with +1Environment.
Since we added a new test case, Compile Test Cases
needs to be run in order to generate a new test case Makefile.
Selecting Make Test Cases from the Test Menu
simply runs the existing test case Makefile.
18. Press RETURN in the Compile Test Cases Window.
19. Select Test->Run All Test Cases.
The Run Regression Tests Window is displayed with the following
output:
Run Regression Tests
--------------------
TESTING MODULE one.c
------------------------------------------------------------------------
*** Differences detected. ***
------------------------------------------------------------------------
TESTING MODULE one_one.c
No differences detected.
Press RETURN to continue with +1Environment.
20. Press RETURN in the Run Regression Tests Window.
21. Select Test->View->Pass/Fail Report.
The following Pass/Fail Report, found in file ../test/pass.fail, is displayed.
Pass/Fail Report
================
Tests run on <today's date>.
FAIL! One or more test cases FAILED.
22. Exit editor.
23. Select Test->View->Test Results Report.
The following Test Results Report,
found in file ../test/test.results, is displayed.
This report shows for each test case which test case passed and failed,
and if it did fail, explains what changes are needed to go from the
actual test results to the expected test results.
Detailed Test Report
====================
Tests run on <today's date>.
------------------------------------------------------------------------
TESTING MODULE one.c
------------------------------------------------------------------------
*** Differences detected. ***
------------------------------------------------------------------------
To change the actual results in one.A to the expected results
in one.E, apply the following changes to ../test/one.A:
Change #1: Add 3 lines before line 1.
1. Add: one - This one changed.
2. Add: one one
3. Add: one two
------------------------------------------------------------------------
TESTING MODULE one_one.c
No differences detected.
24. Exit editor.
25. Select Test->Edit->Expected Test Results.
26. Edit file ../test/one.E.
Edit file ../test/one.E to look as follows, then exit the editor.
one - This one changed.
one one
one two
27. Select Test->Run All Test Cases.
The following output is displayed in the Run Regression Tests Window.
Run Regression Tests
--------------------
TESTING MODULE one.c
No differences detected.
TESTING MODULE one_one.c
No differences detected.
Press RETURN to continue with +1Environment.
28. Press RETURN in the Run Regression Tests Window.
29. Select Test->View->Pass/Fail Report.
The following Pass/Fail Report, found in file ../test/pass.fail, is displayed.
Pass/Fail Report
================
Tests run on <today's date>.
All test cases PASSED!
30. Exit editor.
31. Select Test->View->Test Summary Report
The following Test Summary Report, found in file ../test/test.summary,
is displayed.
This report shows for each test case which test case passed and failed.
Test Summary Report
===================
Tests run on <today's date>.
TESTING MODULE one.c
No differences detected.
TESTING MODULE one_one.c
No differences detected.
32. Exit editor.
33. Select Test->View->Test Results Report
The Test Results Report, found in file ../test/test.results, is displayed.
Detailed Test Report
====================
Tests run on <today's date>.
------------------------------------------------------------------------
TESTING MODULE one.c
No differences detected.
TESTING MODULE one_one.c
No differences detected.
34. Exit editor.
35. Select CM->Check In->Check In All Modules.
Check in all test files used into the configuration management system.
36. Press RETURN in the Check In All Modules Window.
37. Select Exit->Exit Project.
This concludes the +1Test Tutorial.
+1Reports Tutorial
+1Reports generates a number of customized, always up-to-date project
reports. You can create new reports and load in existing reports.
+1Reports lets you write an introduction and a conclusion
to each report; and by selecting which options to incorporate,
generates your reports in either text or HTML format.
+1Reports allows you to select from the following options:
- Title
- Heading
- Table of Contents
- Introduction
- Outstanding Issues
- Current Outstanding Issues
- Previous Outstanding Issues
- Tree Charts
- Cross Reference Tables
- CM Version Description Report
- CM Status Report
- Module Documentation
- Module Description
- Header Files
- Source Code
- Test Documentation
- Test Case
- Test Shell Script
- Expected Test Results
- Actual Test Results
- Makefile
- Profile Data
- Test Coverage
- Integration Test Percentage (ITP) Graph
- Test Coverage Bar Graph
- Source Code Test Coverage
- Software Metrics
- Lines of Code (LOC) Graph
- Cyclomatic Complexity (vg) Graph
- Metrics4C Output
- Metrics4FORTRAN Output
- Metrics4Pascal Output
- Change Requests
- Number of Open Change Requests Graph
- Number of Closed Change Requests Graph
- Metrics4Project Output
- Closed In Change Requests Table
- Closed In Change Requests Details
- Fixed In Change Requests Table
- Fixed In Change Requests Details
- Open Change Requests Table By Number
- Open Change Requests Table By Priority
- Open Change Requests Table By Status
- Open Change Requests Table By Longevity
- Open Change Requests Table By Assignment By Priority
- Open Change Requests Details
- Closed Change Requests Table
- Closed Change Requests Details
- Data Repository
- Data Elements
- Data Structures
- Files
- External Entities
- Glossary
- Personnel
- Frequently Asked Questions (FAQ)
- Conclusion
- Appendices
- Appendix A
- Appendix B
- Appendix C
- Appendix D
- Appendix E
- Appendix F
- Appendix G
- Appendix H
In Release 3.2, the following options have not yet been implemented:
Test Coverage Bar Graph, Source Code Test Coverage, Open CR Table
By Longevity, and Open CR Table By Assignment.
Graphs generated above are in GIF format and can only be displayed with
the HTML output.
+1Reports extracts comments and/or program design language (PDL) code directly
from the source code by looking for delimiters which you can define, such
as "#ifdef COMMENT" and "#endif" or "/*+" and "-*/". The extracted
documentation is placed in the Module Description section of the
report for each module.
As such, the module description can be written and maintained in
the source code.
Reports in HTML format contain lots of links which this tutorial
will not cover, so we encourage you to experiment.
For example, function calls in the calling source code are linked with the
source code of the function being called. (We really like this feature!)
1. Click on the 1. Main Program - Current project in the
+1Environment 3.2 Current Projects Frame.
The Main Program Project is displayed.
If you exited from +1Environment in the +1Test Tutorial, you can
change to the tutorial directory where the PROJECTS file is located
and type plusone
to display the +1Environment 3.2 Current Projects Frame
and then click on the 1. Main Program - Current project.
2. Select Edit->Documentation.
The status line says: Select module to edit documentation.
3. Click on module 0 to select file Main_Program.doc.
This will edit file ../doc/Main_Program.doc.
4. Edit file ../doc/Main_Program.doc to look as follows, then exit the editor.
This is documentation describing module Main_Program located in the file
../doc/Main_Program.doc.
5. Select Set->Extract Doc/PDL ...
The Set Documentation/PDL Frame is displayed. PDL stands for Program
Design Language.
6. For Extract Documentation From Source Code?, select Yes.
This instructs +1Report to extract documentation from the source code.
The Start Documentation String and End Documentation String,
which you can change, default to #ifdef COMMENT and #endif.
In this example, all documentation found between one or more occurrences
of #ifdef COMMENT and #endif will be inserted into the
module's DESCRIPTION section (as will be seen later).
7. Click on the Set Documentation/PDL Button in the
Set Documentation/PDL Frame.
8. Edit Main_Program.c.
Edit function Main_Program.c to look as follows, then exit the editor.
#ifdef COMMENT
This comment is located in Main_Program.c.
#endif
main()
{
printf("main program\n");
one();
two();
#ifdef COMMENT
This comment is also located in Main_Program.c.
#endif
three();
}
9. Select Reports->Generate Reports ...
The Software Reports Frame is displayed.
The default report is currently selected.
10. Click on the Set Report ... Button in
the Software Reports Frame.
The Set Report Frame is displayed.
11. For Enter report name:, type: All_Options.
12. Click on the Set/Load Report Button in the Set Report Frame.
The current report is now set to All_Options.
13. For Print Options:, select all options.
To select a single option, move the mouse's hot point over the option
and click on the B1 mouse button.
You can select more than one option by holding down the B1 button
and moving the mouse's hot point over the other options.
To select all options, you will need to scroll down the window.
Also, if you select, say, Module Description, this would select all
selections indented below Module Description, such as
Header Files, Source Code, and Test Documentation.
14. For Models Selected:, select all models.
The Project Model, Tools Model, Interrupts Model, Objects Model,
and Additional Model should all be selected.
Modules To Print defaults to All Modules.
Output Format: defaults to One HTML File.
15. For Output Format:, click on One HTML File.
16. Click on the Set Report ... Button in the Software Reports
Frame.
The Set Report Frame is displayed.
17. Click on the Set Current Report Options Button in the
Set Report Frame.
The Set Current Report Options Button saves the selected
options for the current report.
18. Select Edit->Title.
Edit file ../reports/All_Options/All_Options.title to look as follows,
then exit editor.
All Options Selected Report
19. Select Edit->Heading.
20. Select Edit->Current Issues.
Edit file ../reports/All_Options/All_Options.curr to look as follows,
then exit editor.
The following issues need to be looked into:
<pre>
<li> Should we make +1 products our corporate standard?
<li> Are there any other vendors that even come close to +1's
capabilities?
</pre>
21. Select Edit->Previous Issues.
22. Select Edit->Closed In CR Number.
Edit file ../reports/All_Options/All_Options.close to look as follows,
then exit editor.
1
23. Select Edit->Fixed In CR Number.
Edit file ../reports/All_Options/All_Options.fixed to look as follows,
then exit editor.
2
24. Select Edit->FAQ.
25. Select Edit->Conclusion.
Edit file ../reports/All_Options/All_Options.conc to look as follows,
then exit editor.
In conclusion, +1Reports looks like a great product!
26. Select Edit->Keywords.
Edit file ../reports/All_Options/All_Options.keys to look as follows,
then exit editor.
+1Reports, report generation, HTML
When HTML output is selected, the keywords are inserted into the
HTML report for use by search engines.
27. Select Edit->Appendices->Appendix A.
28. Click on the Cancel Button in the Software Reports Frame.
We need to generate some metrics data for the report we are about to
generate.
29. Select Local Cmds->Add Command ...
The Add Local Command Frame is displayed.
30. For Short Command:, type: Metrics4C Report
31. For Actual Command:, type: listfiles -t ../../Main_Program; metrics4c -dt
32. Click on the Add Command Button in the Add Local
Command Frame.
33. Select Local Cmds->METRICS4C REPORT.
The command metrics4c generates a metrics report stored in
../metrics/metrics.<date>.
34. Press RETURN in the Run Local Command Window.
35. Select Local Cmds->Add Command ...
The Add Local Command Frame is displayed.
36. For Short Command:, type: 10X Metrics4C Summary
37. For Actual Command:,
type: listfiles -t ../../Main_Program; repeat 10 metrics4c -dst
The command listfiles creates a current list of all source code
files located in ../../Main_Program/src directory.
The command repeat 10 metrics4c runs the metrics4c command ten times and
appends ten entries to file ../metrics/metrics.total.
File metrics.total is needed by +1Reports to generate
the Lines of Code and Cyclomatic Complexity GIF graphs.
38. Click on the Add Command Button in the Add Local
Command Frame.
39. Select Local Cmds->10X METRICS4C SUMMARY.
Let's generate some metrics data for our graphs.
Usually you would run the metrics4c command as a cron job
running automatically on a daily, weekly, or some other time
interval.
40. Press RETURN in the Run Local Command Window.
41. Select Local Cmds->Add Command ...
The Add Local Command Frame is displayed.
42. For Short Command:, type: 10X Metrics4Project
43. For Actual Command:, type: repeat 10 metrics4project -ds
The command repeat 10 metrics4project appends ten entries entries
to file ../cr/cr.totals.
All entries are identical.
44. Click on the Add Command Button in the Add Local
Command Frame.
45. Select Local Cmds->10X METRICS4PROJECT.
Let's generate some metrics data for our change requests graphs.
Usually you would run the Metrics4Project command as a cron job
to generate entries on a regular basis.
46. Press RETURN in the Run Local Command Window.
47. Select Reports->Generate Reports ...
48. Click on the Generate Report Button in the Software
Reports Frame.
When you see "Report ../reports/All_Options/All_Options.html generated.",
the report has been generated and
can be viewed using a web browser, such as NetScape or Explorer.
49. Click on the Done Button in the pop up window.
50. Click on the Cancel Button in the Software Reports Frame.
51. Select Options->Unix Interface->Command Window.
52. Type: cd ../reports/All_Options in the command window.
53. Start your favorite web browser.
We'll use NetScape in our tutorial. To start NetScape, type: netscape.
54. Select NetScape's File->Open File ...
55. Select All_Options.html in NetScape's File Open ... Window.
56. Click on the OK Button in NetScape's File Open ... Window.
57. View generated report.
Take your time and review the generated report.
Notice the level of detail in the report and the fact that this report
is up-to-date and can easily be regenerated at any time.
Try out the defined links to get a feel for how they work.
In the source code, select a function call and see what gets displayed.
58. Select File->Exit to exit NetScape.
59. Type exit in the +1Environment Command Tool Window.
60. Select Exit->Exit Project.
This concludes the +1Reports Tutorial.
+1Reuse Tutorial
+1Reuse supports reuse repositories created and maintained by the user,
project wide "filtered" repositories which can be under strict quality controls,
and selective reuse.
+1Reuse supports reuse of:
- Design
- Documentation
- Source Code
- Header Files
- Test Cases
- Test Shell Scripts
- Expected Test Results
- Modeling Information
All source code reversed engineered (e.g., by using +1ReverseC)
or developed using the +1Environment can be reused.
In a sense, every +1Environment project is the reuse library.
+1Reuse addresses key reuse issues such as reuse of source code under
configuration management and processing duplicate file names.
Selective reuse allows you to select a subtree from any existing
project and append it to the project you are working on.
Selective reuse significantly improves your ability to reuse all
source code and documentation from all previous projects and at
any granularity.
1. Click on the Add Project Button in the
+1Environment 3.2 Current Projects Frame.
The Add Project Entry Frame is displayed.
If you exited from +1Environment in the +1Reports Tutorial, you can
change to the tutorial directory where the PROJECTS file is located
and type plusone
to display the +1Environment 3.2 Current Projects Frame
and then click on the Add Project Button.
2. For Project Name:, type: XYZ Project
3. Click on the Add Project Entry Button in
the Add Project Entry Frame.
4. Select Change Model->Add Module ...
The Add New Module Frame is displayed.
5. For Module Name:, type: This Is Module One.
6. For Module File Name:, type: one.
7. Click on Add Module Button in the Add New Module Frame.
8. Edit function XYZ_Project.c.
Edit function XYZ_Project.c to look as follows, then exit editor.
main()
{
printf("Project XYZ\n");
one();
}
9. Edit function one.c.
Edit function one.c to look as follows, then exit editor.
one()
{
printf("one\n");
}
10. Select Compile->Compile.
11. Press RETURN in the Compile Programs Window.
12. Select Run->Run Program.
The following output should be displayed:
Project XYZ
one
13. Press RETURN in the Run Program Window.
14. Select Reuse->Display A Submodel ...
The Display A Submodel Frame is displayed.
15. For Enter directory with PROJECTS file:, type: ../..
16. Click on the Display Submodel Button in
the Display A Submodel Frame.
The Select A Project For Reuse Frame is displayed.
17. Click on 1. Main Program - Current in the
Select A Project For Reuse Frame.
The Submodel Main Program Frame is displayed.
Since this project is being reused, not all options can be selected.
18. Travel down module 1.
Click the left most mouse button below module 1's box.
Module 1 is now the parent module on the screen.
19. Select Reuse->Add Submodel To Model.
The File one Already Exists Frame is displayed.
This frame appears whenever a file name in the subtree to be reused
matches a file name in the project being worked on.
In this example, module one with all of its children is the subtree to reuse.
There is one duplicate name which needs to be renamed.
As the status line indicates, file one already exists since it is
found in both the reuse subtree and the current model.
You can:
- Enter a new file name for module one and press the
Rename File Button,
- Press the Continue Button without providing
a new file name, which will not copy over any files
but will copy over the modeling information, or
- Click on the Cancel Button to terminate adding
the reuse subtree to the current model.
20. For Enter new filename for module:, type: one_main_program.
This renames module one in the Main Program Project to one_main_program
in the XYZ Project.
If the new file name, one_main_program, already existed too,
+1Reuse would prompt you for another file name until the name entered
is unique, left blank, or you press the Cancel Button.
21. Click on the Rename File Button in the File one Already
Exists Frame.
The XYZ Project is displayed.
The Status Line says: Select location for submodel.
22. Click the left mouse button to the right of module 1.
The Add Submodel? Frame is displayed.
23. Click on the Yes, Add Submodel Button in
the Add Submodel? Frame.
The Add Submodel To Model Window is displayed and
the one_main_program subtree is added as module 2 to the XYZ Project.
Note how +1Reuse checks out
souce code and test files from the configuration management system.
24. Press RETURN in the Add Submodel To Model Window.
25. Edit function one_main_program.c.
Edit function one_main_program.c to look as follows, then exit editor.
Change "one" to "one_main_program" on lines 1 and 3 in the function.
one_main_program()
{
printf("one_main_program - This one changed.\n");
#ifdef IBM
printf("IBM version of code.\n");
#endif
one_one();
one_two();
}
You should also edit function one_main_program's test case and
test shell script to change one to one_main_program in these files too.
We'll skip this step.
26. Edit function XYZ_Project.c.
Edit function XYZ_Project.c to look as follows, then exit editor.
main()
{
printf("Project XYZ\n");
one();
one_main_program();
}
27. Select Compile->Compile.
28. Press RETURN in the Compile Programs Window.
29. Select Run->Run Program.
The following output should be displayed:
Project XYZ
one
one_main_program - This one changed.
one one
one_two
30. Press RETURN in the Run Program Window.
31. Select Reuse->Return To Model/Submodel.
The Submodel Main Program Frame is displayed. You could now reuse
another subtree from this project if desired.
32. Select Reuse->Return To Model/Submodel.
33. Select Set->Reuse Paths ...
The Set Reuse Paths Frame is displayed.
You can set the local (user defined) and global (filtered repository)
reuse paths in this frame.
The local reuse path is selected from Reuse->Display Local Reuse Library
and the global reuse path from Reuse->Display Global Reuse Library.
34. Click on the Cancel Button in the Set Reuse Paths Frame.
35. Select Exit->Exit +1Environment.
This concludes the +1Reuse and +1Environment tutorial.
Conclusion
+1 Software Engineering would first like to thank you for spending
your valuable time in running the +1Environment Tutorial!
What can you do now to learn more about our products? We recommend:
- Reverse engineering some software which you may be working with
using one
of our reverse engineering products, such as +1ReverseC, to see first hand
how our products can support you. Our user guide on our reverse engineering
products is located at our web site.
- Run our software metric products, such as Metrics4C. Our user guide
on our metrics products is also located at our web site.
- Visit our web site at www.plus-one.com. Our web site contains a
product summary paper, product fact sheets, product presentations, white
papers, user manuals, and more.
- For additional information on the +1Environment, you can display the
help text from each menu and each frame, or contact us for a copy of
our user guide.
- Ask questions!
Thanks again!
This tutorial was last updated on April 20, 2005.
+1 Software Engineering is a registered trademark of +1 Software Engineering.
+1Environment, +1Base, +1CM, +1CR, +1DataTree,
+1Reports, +1Reuse, +1Test, +1ReverseC, +1ReverseFORTRAN, +1ReversePascal,
Metrics4C, Metrics4FORTRAN, Metrics4Pascal, Metrics4Project, Metrics2GIF,
TreeSoft, and the TreeSoft logo are trademarks of +1 Software Engineering.
All other product names are trademarks of their respective holders.
© 1997-2005 +1 Software Engineering. All Rights Reserved.