etc./소프트웨어공학

[소프트웨어공학]System modeling

okbear3 2022. 6. 23. 20:36

ch 5_System modeling

System modeling

  • 시스템의 추상 모델을 개발하는 프로세스로, 각 모델은 해당 시스템에 대한 다른 관점을 제시한다.
  • 시스템 모델링은 일종의 그래픽 표기법을 사용하여 시스템을 나타냄
  • ⇒ UML(Unified Modeling Language)의 표기법 기반
  • 시스템 모델링은 분석가가 시스템의 기능을 이해하는데 도움이 되며 모델은 고객과 소통하는데 사용된다.

system perspective

  • external perspective : 시스템의 context 또는 환경을 모델링
  • interaction perspective : 시스템과 환경 또는 시스템 구성 요소 간의 상호작용
  • structure perspective : 시스템의 조직 또는 처리하는 데이터의 구조
  • behabioral perspective : 시스템의 동적 동작과 이벤트에 반응하는 방식을 모델링하는 동작 관점

UML diagram types

  • Activity diagrams : 프로세스 혹은 데이터 처리
  • Use case diagrams : 시스템과 환경 간의 상호작용을 보여주는 사용사례
  • Sequence diagrams : actor 와 system 사이의 상호작용을 보여줌
  • Class diagrams : 시스템의 객체 클래스와 이러한 클래스 간의 연관을 보여줌
  • State diagrams : 시스템이 내부 및 외부 이벤트에 어떻게 반응하는지 보여줌

Use of graphical models

  • facilitating discussion about an existing or proposed system
  • 기존 시스템을 문서화
  • 시스템을 구현하는 자세한 설명

Context models

시스템의 운영 context를 설명하는데 사용되며 시스템 경계 밖에 있는 것을 보여준다.

System boundaries

  • 시스템 내부와 외부를 정의하기 위해 설정
  • 시스템 boundary 는 시스템 요구사항에 큰 영향을 미친다.
  • 시스템 경계를 정의하는것은 political judgment

Process perspective

  • Context model은 단순히 다른 환경의 시스템을 보여준다.
  • process model은 시스템이 어떻게 개발되고 있는지 보여준다.
  • UML activity diagram을 이용하여 비즈니스 프로세스 모델을 정의할 수 있다.

Untitled


context model

Untitled 1


process model

Interation models

  • Modeling user : 사용자 요구사항을 식별
  • Modeling system-to-system : 시스템간 발생할 수 있는 통신문제 강조
  • Modeling component : 시스템 구조가 성능과 신뢰성을 제공할 가능성을 이해
  • Use case diagram / Sequence diagram : 상호작용 모델링에 사용됨

Use case modeling

Sequence diagram

  • UML중 하나로 시스템 내의 actor와 object 간의 상호작용 모델링
  • 특정 사례 인스턴스 동안 발생하는 상호작용의 시퀀스를 보여준다.
  • 관련 객체와 행위자는 상단에 나열되고 이들로부터 수직으로 점선이 그려진다.
  • 객체간의 상호작용은 annotated arrow로 표시된다.

Untitled 2

Structure models

  • 시스템을 구성하는 component와 그 관계의 관점에서 시스템의 조직 표시
  • 정적모델 : 시스템 설계의 구조
  • 동적 모델 : 시스템이 실행 중일 때 시스템의 구성을 보여줌
  • 시스템의 아키텍처를 논의하고 설계할 때 구조적 모델 생성

Class diagram

  • 시스템의 클래스 간의 연관을 보여주는 object-oriented system model(object를 개발할 때 사용)
  • object class는 시스템 객체의 한 종류로 생각할 수 있다.
  • association 은 클래스 사이의 관계를 나타내는 클래스 간의 링크
  • software engineering 의 초기 단계에서 모델을 개발 할 때 객체는 환자, 의사 등과 같이 대상을 나타냄

Untitled 3

Generalization

  • manage complexity 를 위해 일상적으로 사용
  • 클래스 내부 구성요소 및 클래스 간의 관계를 도식화하여 시스템의 특정 모듈이나 일부 및 전체를 구조화
  • 객체지향언어(자바)에서 일반화는 언어에 내장된 class ingeritance machanism(클래스 상속 매커니즘)을 사용하여 구현
  • 상위 수준 클래스에서 구현된 메서드는 하위 수준 클래스에서도 사용할 수 있다.

Untitled 4


generalization hierarchy

Untitled 5


generalization hierarchy added detail

Object class aggregation models

  • 컬렉션 클래스가 다른 클래스로 구성되는 방식을 보여준다.
  • semantic data model의 부분 관계와 유사

Untitled 6


aggregation association

Untitled 7


object aggrigation

Behavioral models

input에 의해 일어나는 일을 보여줌 ⇒ 시스템의 대응

  • data : 시스템에서 처리해야하는 input data
  • event : 시스템 처리를 유발하는 event

Data-driven modeling

  • 비즈니스 시스템 → 데이터 처리시스템 : 데이터에 의해 구동된다.
  • 데이터 기반 모델은 입력 데이터를 처리하고 출력을 생성하는 일련의 작업을 보여준다.
  • 시스템에서 end-to-end 간 처리를 표시하는데 사용된다.

Untitled 8


activity model

Untitled 9


order processing

Event-driven modeling

  • 실시간 처리는 최소한의 데이터 처리인 이벤트 기반이다.
  • 외부 및 내부 이벤트가 어떻게 응답하는지 보여준다.
  • 시스템에는 finite state가 있고, event(stimuli) 상태에서 다른 상태로 전환할 수 있다는 가정에 기반

State machine model

  • 외부 및 내부 이벤트의 behaviour을 모델링
  • stimuli에 의한 시스템의 반응을 보여주기 떄문에 실시간 시스템 모델링에 자주 사용됨
  • 시스템의 상태를 노드로 표시, 이벤트를 노드 사이의 호로 표시
  • 이벤트가 발생하면 시스템이 state to another state로 이동한다.
  • statecharts 는 UML의 필수요소이며, 상태머신모델을 나타내는데 사용됨

Untitled 10


state diagram

Untitled 11


operation

Model-driven engineering

  • MDE(Model Driven Engineering)은 모델이 개발 프로세스의 주요 출력
  • 하드웨어/소프트웨어 플랫폼에서 실행되는 프로그램은 model에서 자동으로 생성
  • abstraction of soft engineering : 엔지니어가 더이상 프로그래밍 언어 또는 실행 플랫폼의 세부사항에 대해 신경쓰지 않도록 함

장점

  • higher levels of abstraction에서 시스템 고려
  • 코드를 자동으로 생성 → 새로운 플랫폼에 시스템 적용이 용이

단점

  • abstraction을 위한 모델이기 때문에 구현에 반드시 적합한 것은 아님
  • 코드 생성으로 인한 절감액보다 새로운 플랫폼용 translator의 개발 비용이 더 클 수 있습니다.

Model-driven architecture

소프트웨어 설계에 대한 모델 중심 접근 방식

다양한 추상화 수준의 모델이 생성

types of model

  • CIM(Comutation Independent Model)
  • 도메인 추상화를 모델링
  • PIM(Platform Independent Model)정적 시스템 구조와 외부 및 내부 이벤트에 응답하는 방식을 보여주는 UML모델을 사용하여 설명
  • 시스템 작동을 모델링
  • PSM(Platform Specific Model)
  • 플랫폼 독립 모델의 변형 : 각 application 플랫폼에 별도로 적용

Agile method and MDA

  • MDA개발자는 개발에 대한 반복적인 접근방식을 지원 ⇒ 애자일에서 사용가능
  • extensive up-front modeling (광범위한 선행 모델링)은 애자일 선언문의 기본 아이디어와 모순됨
  • transformation이 완전히 자동화되고 complete program이 생성될 수 있다면 MDA를 애자일 개발 프로세스에 적용할 수 있다.

Adoption of MDA

  • 모델의 level을 변환하려면 specialized tool이 필요
  • limited tool availability
  • 대부분의 복잡한 시스템에서는 구현보다 major problem-requirements engineering, security and dependability, legacy system과의 통합, testing 이 더 중요하다.
  • plaform-independent 는 크고 수명이 긴 시스템에 적합하다.

Key Points

  • A model is an abstract view of a system that ignores system details. Complementary system models can be developed to show the system’s context, interactions, structure and behavior.보완 시스템 모델은 시스템의 context, interations, structure and behavior을 보여주기 위해 개발될 수 있다.
  • 모델은 시스템 세부사항을 무시하는 시스템의 abstract view이다.
  • Context models show how a system that is being modeled is positioned in an environment with other systems and processes.
  • context model은 모델링 되는 시스템이 어떻게 다른 시스템 및 프로세스가 있는 환경에 위치하는지 보여준다.
  • Use case diagrams and sequence diagrams are used to describe the interactions between users and systems in the system being designed. Use cases describe interactions between a system and external actors; sequence diagrams add more information to these by showing interactions between system objects.use case : 시스템과 외부 행위자 간의 상호작용 설명
  • sequece diagram : 시스템 object 간의 상호작용을 보여줌으로써 여기에 더 많은 정보를 추가함
  • Use case 다이어그램 및 sequence 다이어그램은 설계중인 시스템에서 사용자와 시스템 간의 상호작용을 설명하는데 사용된다.
  • Structural models show the organization and architecture of a system. Class diagrams are used to define the static structure of classes in a system and their associations.클래스 다이어그램은 시스템에서 클래스의 정적 구조와 해당 association을 정의하는데 사용된다.
  • 구조모델은 조직 및 아키텍처를 보여준다.
  • Behavioral models are used to describe the dynamic behavior of an executing system. This behavior can be modeled from the perspective of the data processed by the system, or by the events that stimulate responses from a system.이 행동은 시스템에 의해 처리되는 데이터의 관점에서 시스템의 응답을 자극하는 이벤트에 의해 모델링 될 수 있다.
  • 행동 모델은 실행 시스템의 동적 행동을 설명하는데 사용된다.
  • Activity diagrams may be used to model the processing of data, where each activity represents one process step.
  • 활동 다이어그램은 각 활동의 하나의 프로세스 단계를 나타내는 데이터 처리를 모델링하는데 사용할 수 있다.
  • State diagrams are used to model a system’s behavior in response to internal or external events.
  • 상태 다이어그램은 내부 및 외부 이벤트의 응답에 대한 시스템의 동작을 모델링하는데 사용된다.
  • Model-driven engineering is an approach to software development in which a system is represented as a set of models that can be automatically transformed to executable code.시스템이 실행 가능한 코드로 자동 변환될 수 있는 일련의 모델로 표현되는 개발이다.
  • 모델 중심 엔지니어링은 소프트웨어에 대한 접근방식으로