23
From Natural Language Requirements to Executable Models of Software Components

From Natural Language Requirements to Executable Models of Software Components

  • Upload
    maj

  • View
    24

  • Download
    1

Embed Size (px)

DESCRIPTION

From Natural Language Requirements to Executable Models of Software Components. Barrett R. Bryant Beum-Seuk Lee Fei Cao Wei Zhao Carol C. Burt Jeffrey G. Gray Rajeev R. Raje Andrew M. Olson Mikhail Auguston. Component Deployment. Distributed Resource Discovery. Component - PowerPoint PPT Presentation

Citation preview

Page 1: From Natural Language Requirements to Executable Models of Software Components

From Natural Language Requirements to Executable Models of Software Components

Page 2: From Natural Language Requirements to Executable Models of Software Components

Barrett R. BryantBeum-Seuk LeeFei CaoWei Zhao Carol C. BurtJeffrey G. Gray

Rajeev R. RajeAndrew M. Olson Mikhail Auguston

Page 3: From Natural Language Requirements to Executable Models of Software Components

3Deploy(End)

Query

System Integrator

Quality Validation

Generative Domain Model

Component Developer

ComponentQuality Measures

ComponentDeployment

Distributed Resource Discovery

Standards

Domain Expert (Start)

ModifiedQuery

Yes

No

UniFrame Process

Page 4: From Natural Language Requirements to Executable Models of Software Components

4

Key Issues

Distributed Resource Discovery - component specification for deployment and location on the networkArchitecture-based Interoperability – generation of glue/wrapper code to connect heterogeneous componentsValidation of Quality Requirements – specification of Quality of Service contracts of components

Define a process for construction of heterogeneous distributed systems from pre-existing components who advertise functional and non-functional contracts for quality assurance.

Page 5: From Natural Language Requirements to Executable Models of Software Components

5

Possible Solutions

Unified Meta-Component Model (UMM) - informal specification of component functional and non-functional contractsTwo-Level Grammar (TLG) – formal specification language for describing UMM and domain-specific informationModel Driven Architecture (MDA) – model-based interoperability among heterogeneous components

Page 6: From Natural Language Requirements to Executable Models of Software Components

6

Current Work

Know ledge Base

T wo Level Grammar

J ava

Requirements Document in XM L

O CL or UM L

I nformal

Formal

N L Requirements Document

KB in XM L

Domain Know ledge in XM L

Q uery in N L

Contextual N atural Language Processing

XM I

Functionality-based Q oSUse Cases Component-based

O ntology, Formal restrictions

VDM ++

Data and Function translation

Decontextualization

Preprocessing

Page 7: From Natural Language Requirements to Executable Models of Software Components

7

ATM - Requirements Document

Bank keeps list of accounts. It verifies ID and PIN giving the balance and updates the balance with ID.

An account has three data fields; ID, PIN, and balance.ID and PIN are integers and balance is a real number.

ATM has 3 service types; withdraw, deposit, and balance check. For each service first it verifies ID and PIN from the bank giving the balance. ATM withdraws an amount with ID and PIN giving the balance in the following sequence. If the amount is less than or equal to the balance then it decreases the balance by the amount. And then it updates the balance in the bank with ID. ATM deposits an amount with ID and PIN giving the balance in the following order. It increases the balance by amount and then updates the balance in the bank with ID.ATM checks the balance with ID and PIN giving the balance.

Page 8: From Natural Language Requirements to Executable Models of Software Components

8

ATM - Requirements Document in XML

<document><p> <s>Bank keeps list of accounts.</s></p><p> <s>It verifies ID and PIN giving the balance in the following order.</s> <s>It selects the account from the list of accounts where the ID of the account is equal to the ID and the PIN of the account is equal to the PIN.</s> <s>And then it assigns the balance of the account into the balance.</s></p><p> <s>It updates the balance with ID in the following sequence.</s>

. . . . .

</document>

Page 9: From Natural Language Requirements to Executable Models of Software Components

Natural Language Processing

Know ledge Base

Requirements Document in XM L

Contextual N atural Language Processing

Sentence

Noun_ Phrase Verb_ Phrase

Noun Verb

ATM w ithdraw s

Subject Predicate M odifier Object

Noun_ Phrase

Article Noun

an am ount

Syn

tax

Leve

lPart of Speech Parsing

Part of Sentence Parsing

R equirem ents D ocum ent

Se

ma

ntics

Leve

lPronouns

Pra

gm

atics

Leve

lContext

Know ledge Base

Page 10: From Natural Language Requirements to Executable Models of Software Components

Syntax

Natural-language-like syntax Flexibility

Formal notation Formalism

Object-oriented structure Abstraction

Logic/Functional operation Computation

class Class_Name. Data_Name {, Data_Name} :: Data_Type {, Data_Type}. Rule_Name : Rule_Body {, Rule_Body}. end class.

Properties

Know ledge Base

T wo Level Grammar

Decontextualization

VDM ++

Data and Function translation

class Account. Id, PIN :: Integer. Balance, Amount :: Float.

withdraw Amount : Amount <= Balance, Balance := Balance - Amount. deposit Amount : …end class.

Example

Two-Level Grammar

Page 11: From Natural Language Requirements to Executable Models of Software Components

11

ATM – Two-Level Grammar

class ATM.

Balance, Amount :: Float. ID, PIN :: Integer.

withdraw Amount with ID and PIN : Bank verify ID and PIN giving Account, Account withdraw Amount.

deposit Amount with ID and PIN : Bank verify ID and PIN giving Account, Account deposit Amount.

check balance with ID and PIN giving Balance : Bank verify ID and PIN giving Account, Account getBalance Balance.

end class.

Page 12: From Natural Language Requirements to Executable Models of Software Components

12

ATM – Vienna Development Method

class ATM instance variables private bank : Bank operations public withdraw : real * int * int ==> void withdraw (amount, ID, PIN) == (dcl account : Account; account := bank . verify (ID, PIN); account . withdraw (amount); );

public deposit : real * int * int ==> void deposit (amount, ID, PIN) == (dcl account : Account; account := bank . verify (ID, PIN); account . deposit (amount); );

public checkBalance : int * int ==> real checkBalance (ID, PIN) == (dcl account : Account; account := bank.verify (ID, PIN); return account . getBalance (); );

end ATM

Page 13: From Natural Language Requirements to Executable Models of Software Components

System View

Page 14: From Natural Language Requirements to Executable Models of Software Components

14

ATM - Unified Modeling Language (UML)

Page 15: From Natural Language Requirements to Executable Models of Software Components

15

Model Driven Architecture

OMG initiative for interoperating between different component technologies (http://www.omg.org/mda)Application logic of components conforming to some domain specification is expressed as a Platform Independent Model (PIM)PIM is converted into a Platform Specific Model (PSM) using a specific component technology

Page 16: From Natural Language Requirements to Executable Models of Software Components

16

ProblemsApplication domain logic is typically expressed in natural language (NL)Automated tools are needed to develop the domain specifications from the NL requirementsTransformation from PIM’s to PSM’s should also be automated or semi-automated, based upon technology domain knowledgeModels must consider not only functional aspects of domain logic, but also non-functional properties (i.e., Quality of Service – QoS)

Page 17: From Natural Language Requirements to Executable Models of Software Components

17

Video Streaming Naval Application

uav.navair.navy.mil/home.htm

Page 18: From Natural Language Requirements to Executable Models of Software Components

18

Video-Streaming Domain knowledge (in NL)

Video server UMM (in NL)

NLP

NLP

Video-Streaming Domain knowledge (in TLG)

Video server UMMPI

(in TLG) Video server UMMPS

(in TLG)

Tool support

Model Driven Architecture

PIM

UML TLG

PSM (in UML and TLG)

Technology Domain knowledge (in TLG)

Video server implementation (in Java)

Feature model, dictionary, configuration constraints,

business rules ……….

Page 19: From Natural Language Requirements to Executable Models of Software Components

19

Model Transformation

Aspect-oriented approach enhanced with TLG formalismAugment Abstraction with SeparationGenerate PSM by weaving separated PIM level modules together with various domain knowledge

Page 20: From Natural Language Requirements to Executable Models of Software Components

20

Model Transformation

PIMDomain knowledge (Technology,etc..)

Aspect Weaver

PSM

Page 21: From Natural Language Requirements to Executable Models of Software Components

21

Approach Merits

Natural language as the starting point for developing the business domain modelsSufficient automation that components may be modified at the model level or even the natural language level as opposed to the code levelComplement MDA with formal methods and QoSTargeting the construction of heterogeneous distributed software systems by the automated generation of glue/wrapper code elicited from technology domain knowledge

Page 22: From Natural Language Requirements to Executable Models of Software Components

22

Acknowledgements

This research was supported by U. S. Army Research Laboratory and U. S. Army Research Office Grant DAAD190-00-1-0350 and U. S. Office of Naval Research Grant N000014-01-01-0746.

Page 23: From Natural Language Requirements to Executable Models of Software Components

23

Webpage

http://www.cis.uab.edu/UniFrame