95f523 COOL FAQs
Download
Report
Transcript 95f523 COOL FAQs
COOL FAQs (05f522 rev.)
List of slides:
•
•
•
•
•
•
•
•
•
•
•
COOL FAQs (05f522 rev.)
ACRONYMS
What is an OOSEE?
What is MDD?
What is COOL?
COOL Interfaces
What is BDE?
BDE Features-1
BDE Features-2
BDE Status - 05s523
What is GEN?
•
•
•
•
•
•
•
•
•
•
•
•
CHGEN External View
CHGEN Internals
CHGEN Options
How to invoke chgen
Database Conversions
Current Work-arounds
What is bde2sch?
GEN/LCP Interfaces
LCP/Operator Interfaces
CVS Interfaces
What is CVS?
GENCPP External View
COOL_FAQv6.ppt - RJL 050904
1
ACRONYMS
API
ADTF
CASE
COOL
GUI
MDD
OODB
OOSE
OMG
PIM
PSM
UML
Application Programmer Interface
Analysis and Design Task Force (OMG)
Computer-aided SwEng
Collaborative O-O Laboratory
Graphic User Interface
Model-Driven Development
Object-Oriented Database
Object-oriented Software Engineering
Object Management Group
Platform-independent Model
Platform-specific Model
Unified Modeling Language
COOL_FAQv6.ppt - RJL 050904
2
What is an OOSEE?
An OO SwEng Environment is
an integrated development
environment (IDE) or framework,
whose purpose is to provide
automated support for an objectoriented approach to software
engineering.
COOL_FAQv6.ppt - RJL 050904
3
What is MDD?
Model-Driven Development (MDD)
implies [semi-]automatic code
generation from (partly graphic)
models for static structure and
dynamic behavior.
This is the focus of OMG’s
Model Driven Architecture (MDA) and
Microsoft’s Software Factory (MSSF)
COOL_FAQv6.ppt - RJL 050904
4
What is COOL?
COOL (Object-oriented CASE Lab)
is UML’s own home-grown OOSEE.
COOL currently consists of:
•BDE, block diagram editor(s)
(evolves in 91.523 SwEng classes)
•LCP, life cycle prototyper(s)
(evolves in 91.522 OOA&D classes)
•GEN, database API generator(s)
(Used by all yy{f/s}{522/523} projects).
* for version control.
COOL
uses
CVS
_____
* CVS = Concurrent Version System
COOL_FAQv6.ppt - RJL 050904
5
COOL Interfaces
BDE
Design Diagram Database
Block
Data (Conversion State
Diagram
required)
Models
Editor Models
Database
GEN C/C++ Code
GENerator
pr_util Support Library
pr_*.c, schema.h files
(WWW)
Simulation Models
LCP
BDE
Executable
Prototype
COOL_FAQv6.ppt - RJL 050904
6
What is BDE?
BDE, a generic editor for block diagrams,
is COOL’s primary design capture tool.
Current convertible diagram styles include:
•Data Structure Diagrams (DSDs)
(DSD’s define EERA data models for
the static structure of GEN databases)
•Program Structure Chart Diagrams
(SCDs are annotated program call trees)
•State Transition Diagrams (STDs)
(STD’s define event-driven State Models
for dynamic behavior of LCP classes)
COOL_FAQv6.ppt - RJL 050904
7
BDE Features-1
• Draw nodes of various shapes
• Attach text to diagrams or nodes
• Connect nodes by edges or links
• Move or resize nodes or captions
• Attach labels to inter-node links
• Recompute node-link intersections
• Use only one button of mouse
• Annotate diagrams with captions
COOL_FAQv6.ppt - RJL 050904
8
BDE Features-2
•Store multiple diagrams in a file
•Save diagrams as .PS and .GIF
•Capture semantics for COOL use
•Capture and replay mouse events*
•Capture and replay VMNetDB updates*
_____
*Capture and replay via bdelog/genlog (genv12+)
COOL_FAQv6.ppt - RJL 050904
9
BDE Status - 05su523
• Chgenv13 at $CASE/gen/ver_13 supports bde on 2
$HOSTTYPE platforms under 2 versions of generated code
pr_util_[no]log (4 bde executables from same bde/src code).
• The bde repository at CVSROOT =
$CASE/95s523/95sbde/base/Master
has the latest version tagged bde050823.
• My sandbox for bde bugfixes is
~lechner/bde2alpha_rl/sandbox/bdeNT050526/bdegen13/bde
• Conditional code for log and replay have been merged into
bde and into chgenv13.
• Further testing and bug fixing is TBD.
• TBD: Migrate bde to Fox/OpenGL (platform-independent)..
• The bde2java project is is incomplete and not up to date.
Repository: CVSROOT = $CASE/96s523/bde2jav1/base/Master
• Bde2pc was based on $CASE/wxWindows 1.65; not in CVS;
it is deprecated because it is incomplete, slow and obsolete.
COOL_FAQv6.ppt - RJL 050904
10
What is GEN?
A pair of programs (chgen, gencpp) which
generate data-compatible C or C++ code to
manage design databases for COOL and
persistent data for arbitrary applications:
chgen:
•generic database ‘C’ code generator
gencpp:
• generic database C++ code generator.
chgen and gencpp support normalized EERA* data
models in schema files and compatible persistent
database formats.
EERA = Entity/Relation/Attribute data model,
extended with multiple inheritance.
COOL_FAQv6.ppt - RJL 050904
11
CHGEN External View
•
•
•
•
•
Generic database code generator
Manages a persistent ASCII database
Based on EERA data model
Reads DB definition in schema.sch
Emits schema.h and pr_*.c files
• Used in BDE, LCP and applications
______
*EERA = Entity-Relation-Attribute Data Model,
Extended with 1:M genspec or inheritance relations,
associating each superclass instance to one instance
of one or more subclasses.
COOL_FAQv6.ppt - RJL 050904
12
GENCPP External View
• Database code generator that represents
all table rows as C++ class instances.
• Alternate API for chgen-style database
management code.
• Options provide either STL Containers or
chgen-style linked lists (but not both).
• Chgen-compatible external format.
• Chgen-equivalent database schema.
COOL_FAQv6.ppt - RJL 050904
13
CHGEN Internals
CHGEN generates API utilities which:
• Compile and link to an application
• Load/unload a persistent database
• Convert between
•external ASCII database content
•internally linked VMNetDB*
• Access and navigate resident DB.
• Optionally generates code to log
______ and/or replay DB changes (genv11+)
*VMNetDB = Virtual-Memory-resident Network DB with 1-to-many
linked lists, N-ary associations, and surrogate primary and foreign keys.
COOL_FAQv6.ppt - RJL 050904 14
CHGEN Options
Chgen’s input is a schema.sch file that
declares an ExtendedER Data model
(a subset of UML Class Diagrams)
• With a schema.sch file argument, chgen
generates source files pr_*.c and schema.h.
• Without this argument, chgen gives a list of
optional arguments.*
• Options are defined in chgen’s User Manual.**
_________
* See next slide – how to invoke chgen
** -nobp, -ansi were the non-default options before genv13.
COOL_FAQv6.ppt - RJL 050904
15
How to invoke chgen
•
•
•
•
•
saturn.cs.uml.edu(11)> setenv CASE /usr/proj3/case
saturn.cs.uml.edu(12)> $CASE/gen/ver_13/chgen/executables/chgen
gendir = /usr/proj3/case/gen/ver_13/chgen
exec = /usr/proj3/case/gen/ver_13/chgen/executables/alpha/chgen13
Running chgen on saturn.cs.uml.edu [alpha]. Compiled: (1374528B Jul
27:14:30) DATE_OF_CHGEN_RELEASE = A@
• Chgen V 13 by 05s523, report errors to Dr. Lechner:
• CHGEN_RELEASE_DATE = 050727:1430
• CHGEN-F-INVARGS, Usage: [-keysize=n] [-bp] [-noansi] [quiet] [-validate] [-noforward] [-maxviews=n] [-noorder] [gendbschema] [-metafile] [-nosource] [-datinput] [-log] [viewname <viewname>]
COOL_FAQv6.ppt - RJL 050904
16
Database Conversions
Design Diagram Database
BDE
bde2sch
[schema.msdat]
Schema.sch
GEN
bde2SM
bde2ht
Simulation Database
*.HTM
(s2t)
LCP
JP2BDE
WWW
schema.h, pr_*.c files
COOL_FAQv6.ppt - RJL 050904
17
Current Work-arounds
Display-only use of bde:
schema.sch
(State Models
declared as
const strings)
GENmeta
(s2t)
(meta-data)
State Model View
(SM,ST,TR,ET,EI,EN,FT,GC)
(State
Model
LCPinit tables)
pr_load
Data Model View
(SV, TT, TA, VD)
SM2bde
t2b
(EERDs)
(STD’s)
LCPrun
BDE View
BDE
bde2ht
FlowControl (VMNetDB) *.HTM
GENcode
(genv14)
browsers
application
(compile and link)
pr_*.c, schema.h
Application
Data View
COOL_FAQv6.ppt - RJL 050904
18
What is bde2sch?
• A database schema defines record types or classes
together with implied tables or container classes
which hold instances of these records or objects.
• If an EERA diagram is saved from bde, bde2sch will
convert it into schema.sch format for chgen/gencpp.
• Bde2sch is a tandem combination of b2t and t2s.
Its intermediate result t is a pair of tables TT and TA.
TT and TA are generated by chgen –metafile.
• Bde Work-around: The schema.sch file may also be
prepared manually using a text editor.
COOL_FAQv6.ppt - RJL 050904
19
GEN/LCP Interfaces
Design Diagram Database
(Database conversion)
Schema.sch
Simulation Models
GEN
WWW
LCP
Database Utilities
(#-include schema.h;
compile&link pr_util.a;
pr_load TT,TA)
*.HTM
Operator
Interface
Simulation Actions
COOL_FAQv6.ppt - RJL 050904
20
LCP/Operator Interfaces
Database Utilities
Simulation Database
WWWeb
(#-include schema.h;
compile&link pr_util.a;
pr_load TT,TA)
Application
Software
LCP
DBDE
*.HTML
BDE
Alternate
Operator
Interfaces:
COOL_FAQv6.ppt - RJL 050904
21
CVS Interfaces
(CVS = Concurrent Version Control System)
BDE
Design Diagram Database
Simulation Database
CVS
LCP
GEN
CVS repository
DB-Support Library (includes Source code)
(CVS manages
a repository of
source code and
documentation.)
COOL_FAQv6.ppt - RJL 050904
22
What is CVS?
CVS = Concurrent Version System
is a wrapper around RCS.*
CVS supports:
• Multiple versions of ASCII files
• Optimistic concurrency control
• Multiple checkouts of the same file
• File version compression via diff
• Merging of non-overlapping changes
CVS update detects, and concurrent users
resolve, conflicting changes.
_______
* RCS = Revision Control System
COOL_FAQv6.ppt - RJL 050904
23