Formal Specification of Non-Functional Aspects in Two-Level Grammar
description
Transcript of Formal Specification of Non-Functional Aspects in Two-Level Grammar
Formal Specification of Non-Functional Aspects
in Two-Level Grammar
Chunmin Yang, Beum-Seuk Lee, Barrett Bryant, Carol Burt
University of Alabama at Birmingham
Rajeev Raje Indiana University Purdue University Indianapolis
Mikhail Auguston Andrew OlsonNew Mexico State University
This research is based upon work supported by, or in part by, the U. S. Army Research Laboratory and the U.S. Army Research Office under contract/grant number DAAD19-00-1-0350 and by the U. S. Office of Naval Research under award number N00014-01-1-0746.
Contents
Problem Statement
System Structure
Two-Level Grammar (TLG)
Case Study – ATM Example
Conclusion
Objectives
Motivation
Approach
Natural Language Processing
Knowledge Base
Non-Functional Aspect (QoS)
2
Problem Statement
3
Functional aspect Non-functional aspect
Well defined domain (concrete) Abstract and non-quantifiable
Local and simple attributes correlation
Dynamic and complex correlation
Easy prototyping and verification Poor measurement and formalism
Users’ main interest Its importance neglected
“the system should sort the list of the given numbers”
“the system should maintain high level of security”
Non-functional aspect (Quality of Service - QoS) in the UniFrame project
Query of heterogeneous components that satisfy certain QoSQoS specification and management
Objectives
Formal specification of QoS
Decomposability of QoS attributes
4
Correlation among QoS actions
QoS specifications in natural language
User friendly interface
Reuse of requirements document
Two-level Grammar (TLG)
Natural Language Processing (NLP)
System Structure
Know ledge Base
T wo Level Grammar
Vienna Development M ethod
J ava, C++
I FAD VDM T ool K it
Q oS Requirements Document in XM L
UM L
Code generators
Rose-VDM Link
N atural Language Processing
Decontextualization
Data and Function translation
I nformal
Formal
Q oS Requirements Document in N L
I n terpreter
5
Non-functional Aspect (QoS)
QoS attributes
Features or parameters of QoS
6
QoS catalog : throughput, capacity, end-to-end delay, parallelism constraints, availability, ordering constraints, error rate, security, transmission, adaptivity, evolvability, reliability, stability, result, achievability, priority, compatibility, and presentation
QoS actions
Events that have affect on QoS attributes
Correlation
Decomposition
QoS propertiesConstraints on QoS actions
Natural Language Processing
Syn
tax
Leve
lPart of Speech Parsing
Part of Sentence Parsing
QoS D escription
Se
ma
ntics
Leve
lPronouns
Pra
gm
atics
Leve
lContext
Know ledge Base
7
Natural Language Processing (Cont’d)
Sentence
Noun_ Phrase Verb_ Phrase
Pronoun Verb Propos_ Phrase
Proposition
tim e flies like
Subject Verb Proposition Modifi er Prop_ Object
Noun_ Phrase
Article Noun
an arrow
8
Knowledge Base
Tree-like structure
Composed of
Linguistics information – parts of speech
Contextual information – relations between sentences
Example
9
A TM Security
update level
be 6Encrypt io n byt e length
M aximum allo w ed at t empt s be less than 5
update attributes
be 80% secureSystem
be a savings accountA ccount type
M aximum co nnect io ns o f bank be less than 50
be lim ited to 4Maxim um allow ed attem pts
Delay level be less than 50
Syntax
Properties
Natural-language-like syntax Flexibility
Formal notation Formalism
Object-oriented structure Abstraction
Logic/Functional operation Computation
Two-Level Grammar (TLG)
class Class_Name. Data_Name {, Data_Name} :: Data_Type {, Data_Type}. Rule_Name : Rule_Body {, Rule_Body} {; Rule_Body}. end class.
10
Two-Level Grammar - Example
class Palindrome.
Char :: Character. Str :: {Char}*.
Empty is a palindrome. Char is a palindrome. Char Str Char is a palindrome : Str is a palindrome.
end class.
11
ATM – QoS Requirements Document in NL
ATM's security property is as follows.
The length of the encryption byte should be bigger than 3 and the allowed attempts has to be smaller than the maximum allowed attempts.
If the encryption byte length is 6 and the maximum allowed attempts is less than 5 then the system is 80% secure.
If the account type is a savings account or the maximum allowed connections of the bank is less than 50 or the delay level is less than 50 then the maximum allowed attempts is limited to 4.
If the user timeout is between 10000 and 120000 milliseconds we have a good delay level.
If the response time is longer than 30000 milliseconds, the delay level drops down to 40%.
12
ATM – QoS Requirements in XML
<c title = "ATM"> <c title = "Security"> <p meta = "satisfaction check"> <s>The length of the encryption byte should be bigger than 3 and the allowed attempts has to be smaller than the maximum allowed attempts</s> </p> <p meta = "level update"> <s>If the encryption byte length is 6 and the allowed attempts is less than 5 then the system is 80% secure</s> </p> <p meta = "attribute update"> <s>If the account type is a savings account or the maximum allowed connections of the bank is less than 50 or the delay level is less than 50 then the maximum allowed attempts is limited to 4</s> </p> </c> <c title = "Delay"> <p meta = "satisfaction check"> <s>If the user timeout is between 10000 and 120000 milliseconds we have a good delay level</s> </p> <p meta = "level update"> <s>If the response time is longer than 30000 milliseconds the delay level drops down to 40%</s> </p> </c></c>
13
ATM - Knowledge Base
14
A T M
Security
Delay
sat isfact io n check
update level
be b igger than 3Lengt h o f encrypt io n byt e
be sm aller thanA llow ed attem pts
be 6Encrypt io n byt e lengt h
M aximum allo w ed at t empt s be less than 5
updat e at t ribut es
Maxim um allow ed attem pts
be 80% secureSystem
be a savings accountA ccount type
M aximum co nnect io ns o f bank be less than 50
be lim ited to 4Maxim um allow ed attem pts
Delay level be less than 50
sat isfact io n check
update levelbe longer than 30000 m illisecondsR esponse tim e
dro p do w n t o 4 0 %Delay level
be betw een 10000 and 120000 m illisecondsUser tim eout
have Good delay level
ATM – Two-Level Grammar (TLG)
class Property. Level :: int.end class.
class Bank_Capacity extends Property. Maximum_Connections :: Integer.end class.
class ATM_Delay extends Property.
Response_Time :: Integer. User_Timeout :: Integer.
check satisfaction : User_Timeout > 10000, User_Timeout < 120000.
update level : Response_Time > 30000, Level := 40.
end class.
15
ATM – Two-Level Grammar (cont’d)
class ATM_Security extends Property.
Maximum_Allowed_Attempts :: Integer. Encryption_Byte_Length :: Integer. Allowed_Attempts :: Integer. Account_Type :: String.
check satisfaction : Encryption_Byte_Length > 3, Allowed_Attempts < Maximum_Allowed_Attempts.
update level : Encryption_Byte_Length = 6, Allowed_Attempts < 5, Level := 80.
update attributes : Account_Type = "savings", Maximum_Allowed_Attempts := 4; Bank_Capacity Maximum_Connections < 50, Maximum_Allowed_Attempts := 4; ATM_Delay Level < 50, Maximum_Allowed_Attempts := 4.
end class. 16
ATM - Unified Modeling Language (UML)
17
Conclusion
18
Summary
Formal specification of QoS using TLG
QoS specifications in natural language using NLP
Express the constraints in Object Constraint Language (OCL)
Future Work
Combine Model Driven Architecture (MDA) and formal methods in representing the QoS properties, and implement the representation within MDA
THE END
Beum-Seuk Lee : [email protected]
www.cis.uab.edu/info/grads/leebs
UniFrame : www.cs.iupui.edu/uniFrame
Contact info :