Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design considerations for initial package release #1

Open
capsulecorplab opened this issue Jan 23, 2018 · 0 comments
Open

Design considerations for initial package release #1

capsulecorplab opened this issue Jan 23, 2018 · 0 comments
Labels
Epic a.k.a. sprint help wanted Extra attention is needed needs design feedback Design implementation needs feedback SysML Domain-knowledge of SysML is recommended for working on this issue

Comments

@capsulecorplab
Copy link
Contributor

capsulecorplab commented Jan 23, 2018

This issue is used for outlining the design and scope of the initial package release onto PyPI.

Design pattern

System model creation is done using a composite design pattern, whereby model elements are instantiated then subsumed by a Model object or model elements within a Model object. See "class diagram" tab of SysML.py UML for a structural breakdown of the working design pattern implementation.

Use cases

The long term vision is to provide automation support for two primary use cases:

See "use case diagram" tab of SysML.py UML

Package contents & features:

Usage

The following illustrates an example workflow, using the traditional pillars of SysML (i.e., structure, behavior, and requirements) in conjuction with two new pillars: analysis and verification & validation...

(See test_model.py for most up-to-date profile of unittests)

>>> import sysml

# Create a model object that will also serve as the root directory for all other model elements
>>> model = sysml.Model()

Structure

# Create a package, labeled 'Structure' within model which will serve as namespace for the system structure
>>> struct_pkg = sysml.Package('Structure')
>>> model.add(struct_pkg)

# Model and Package objects can be thought of as a dict-like container for returning model elements
>>> model['Structure'] # should return a package object with str, «package» Structure

# model elements use python-ic dict-like setters for adding other model elements
>>> starship = sysml.Block('Constitution-class starship')
>>> model['Structure'].add(starship)
>>> model['Structure']['Constitution-class starship'] # should return a block object with str, «block» Constitution-class starship

# Block elements have attributs, such as parts, for storing subcomponents
>>> saucer_sec = sysml.Block('Primary Hull')
>>> engineering_sec = sysml.Block('Secondary Hull')
>>> model['structure']['constitution-class starship'].parts['saucer section'] = saucer_sec
>>> model['structure']['constitution-class starship'].parts['engineering'] = engineering_sec

# Parts added to a block element are dictionary-callable via the 'parts' attribute
>>> model['structure']['Constitution-class starship'].parts['Primary Hull'] # should return a block object with str, «block» Primary Hull
>>> model['structure']['Constitution-class starship'].parts['Engineering Hull'] # should return a block object with str, «block» Engineering Hull

Requirements

# Create a package, labeled 'Requirements', within model which will serve as namespace for the system requirements
>>> req_package = sysml.Package('Requirements')
>>> model.add(req_package)

# Define two requirement elements, passing in a string name and text field as its constructor arguments
>>> top_req = sysml.Requirement('Top-level', 'A constitution-class starship shall provide a 5-year mission capability to explore strange new worlds, to seek out new life and new civilizations, and to boldly go where no one has gone before.')
>>> func_req = sysml.Requirement('Functional', 'A constitution-class starship shall be able to travel at warp 8 or higher')
>>> model['Requirements'].add(top_req)
>>> model['Requirements'].add(func_req)

# Define a dependency relationship, of stereotype «derive», between two requirements
>>> deriveReq1 = sysml.DeriveReqt(top_req, func_req)
>>> model['Requirements'].add(deriveReq1)

Behavior (WIP)

# Create a package, labeled 'Behavior', within model which will serve as namespace for the system behavior
>>> behavior_pkg = sysml.Package('Behavior')
>>> model.add(behavior_pkg)
>>> warpdrive_testcase = sysml.TestCase('Warp drive operation')
>>> model['Behavior'].add(warpdrive_testcase)

Analysis (WIP)

# Create a package, labeled 'Analysis', within model which will serve as namespace for the system analysis
>>> analysis_pkg = sysml.Package('Analysis')
>>> warpfieldsim_interaction = sysml.TestCase('Warp field simulation') # Create a test case for verifying one or more system requirements allocated to it.
>>> model.add(analysis_pkg)
>>> model['Analysis'].add(warpfieldsim_interaction)

# A dependency relationship, of stereotype «trace», can be defined to relate the analysis test case to the behavioral test case
>>> warpdrive_operation = sysml.Activity('Warp drive operation')
>>> dependency2 = sysml.Dependency(warpfieldsim, warpdrive_operation, 'trace')

Verification & Validation (WIP)

>>> warpdrive = sysml.Block('class-7 warp drive')
>>> model['Structure']['Constitution-class starship'].part['warpdrive'] = warpdrive

# Define a dependency relationship, of stereotype «satisfy», to relate a structural element to one or more of its corresponding requirements that it satisfies
>>> satisfy1 = sysml.Satisfy(func_req, warpdrive)
>>> model['Requirements'].add(satisfy1)

# Define a dependency relationship, of stereotype «verify», to relate a test case to one or more of its corresponding requirements that it verifies
>>> verify1 = sysml.Verify(functional_req, warpfieldsim_interaction)
>>> model['Requirements'].add(verify1)

# Perform validation on system model, using built-in validation method, or generate a requirements traceability matrix (RTM)
>>> model.isValid() # returns True if all requirements are satisfied by a block and verified by a test case
>>> model.rtm() # generates an RTM

Additional features being considered in the development pipeline include, but not limited to:

@capsulecorplab capsulecorplab added the help wanted Extra attention is needed label Jan 23, 2018
@capsulecorplab capsulecorplab changed the title Development and structuring of core package review design paradigm of core package Apr 15, 2018
@capsulecorplab capsulecorplab changed the title review design paradigm of core package Review design paradigm of core package Apr 15, 2018
@capsulecorplab capsulecorplab added the Epic a.k.a. sprint label May 6, 2018
@capsulecorplab capsulecorplab changed the title Review design paradigm of core package Iteratively review, revise, & test core package design paradigm May 6, 2018
@capsulecorplab capsulecorplab changed the title Iteratively review, revise, & test core package design paradigm Iteratively review, revise, & test current design paradigm (for v0.0.1 release) May 6, 2018
@capsulecorplab capsulecorplab added the needs design feedback Design implementation needs feedback label May 6, 2018
@capsulecorplab capsulecorplab changed the title Iteratively review, revise, & test current design paradigm (for v0.0.1 release) Review, revise, & test package design (for v0.0.1 release) Jun 5, 2018
@capsulecorplab capsulecorplab changed the title Review, revise, & test package design (for v0.0.1 release) Design overview for initial package release Jun 7, 2018
@capsulecorplab capsulecorplab added the SysML Domain-knowledge of SysML is recommended for working on this issue label Sep 10, 2018
@capsulecorplab capsulecorplab changed the title Design overview for initial package release Design considerations for initial package release Oct 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic a.k.a. sprint help wanted Extra attention is needed needs design feedback Design implementation needs feedback SysML Domain-knowledge of SysML is recommended for working on this issue
Projects
None yet
Development

No branches or pull requests

1 participant