1. Event-B
: a formal language for writing a high-level specification of computer systems (derived from requirements)
- includes logic and set theory
- used in safety-critical applications
http://www.event-b.org/
2. Set Expression
- a set is a collection of elements
- may be finite or infinite
- For element x and set S, we express the membership relation: x ∈ S
- The cardinality of a finite set is the number of elements in that set: card(S)
- A set S is said to be subset of set T when every element of S is also an element of T: S ⊆ T
- Union of S and T: S ∪ T
- Intersection of S and T: S ∩ T
- Difference of S and T: S ⧵ T
3. Event-B structure
- B context
* Sets: abstract types used in specification
* Constants: logical variables whose value remain constant
* Axioms: constraints on the constants
- B machine
* Variables: state variables whose values can change
* Invariants: constraints on the variables that should always hold true
* Initialisation: initial values for the abstract variables
* Events: guarded actions specifying ways in which the variables can change
4. Types
: all variables and expressions in B must have a type
- Predefined Types: Ζ Integers / Β Booleans / Ν all-non-negative integers
- Basic Types
set Word Name
- Powersets: the powerset of a set S is the set whose elements are all subsets of S: Ρ(S)
5. Predicate Logic
- Negation: ¬ P
- Conjunction: P ∧ Q
- Disjunction: P ∨ Q
- Implication: P ⇒ Q
- Universal Quantification: ∀x ·P
- Existential Quantification: ∃x ·P
6. Relations and Functions
- Ordered pair (an element consisting of two parts): x |-> y
- Cartesian product (the set of pairs whose first parts is in S and second parts is in T): S × T
- Relations (a set of ordered pair): S ↔ T = Ρ(S × T)
- The domain of a relation R (the set of first parts of all the pairs in R): dom(R)
- The range of a relation R (the set of second parts of all the pairs in R): ran(R)
- The relational image of set A under relation R: R[A]
- Partial Functions (each domain element has at most one range element): f ∈ X +-> Y
* f is a many-to-one relation
- Domain Restriction (only contains pairs whose first part is in the set A): A <| R
- Domain Substraction (remove those pairs from R whose first part is in A): A <<| R
- Range Restriction: R |> B
- Range Substraction: R |>> B
- Functional Overriding (replace existing mappings with new ones): f <+ g
- Total Function (every domain element has range elements): f ∈ X -> Y
- Relational Inverse: R^-1
- Relational Composition: Q;R
- Injective Function (one-to-one function): f ∈ X >+> Y
- Total Injective Function: f ∈ X >-> Y
- Surjective Function (onto function): f ∈ X +->> Y
- Total Surjective Function: f ∈ X -->> Y
- Bijective Function: f ∈ X >->> Y
http://wiki.event-b.org/images/EventB-Summary.pdf
7. Extension Refinement
: a process of enriching or modifying a model in order to augment the functionality being modelled or explain how some purpose is achieved
- context c1 -(extends)-> context c2
- machine m1 -(refines)-> machine m2
=> add additional variables and invariants
=> extend existing events to act on additional variables
=> add new events to act additional variables
8. Proof-based verification
- Proof Obligations: mathematical theorems derived from a formal model (or programme)
=> a sequence of the form Hypotheses |- Goal
=> we should prove the goal while assuming that the hypotheses are true
- mathematical operators and rules validity of a PO could be derived from deductive rules of logic and set theory
* Well-definedness (WD)
e.g. avoid division by zero, partial function application
* Invariants preservation (INV): each event maintains invariants
* Guard strengthening (GRD): refined event only possible when abstract event possible
* Simulation (SIM): update of abstract variable correctly simulated by update of concrete variable
http://www.computing.dcu.ie/~hamilton/teaching/CA648/sld_po.pdf
2017년 1월 28일 토요일
Software Testing
1. Testing
: the process of evaluating a system or its components(s)
- An early start to testing reduces the cost, time
- Debugging: it involves identifying, isolating and fixing the problems/bugs
! the part of White box or Unit Testing
- Different types of testing
* Manual testing
* Automation testing (Test Automation): uses another software to test the software
http://istqbexamcertification.com/what-is-a-software-testing/
2. Different Methods of Software Testing
http://www.careerride.com/Testing-white-box-black-box-gray-box.aspx
3. Different Levels of Testing
- Functional Testing: to evaluate the system's compliance with its specified requirements
1) Unit testing: to isolate each part of the programme and show that individual parts are correct in terms of requirements and functionality
2) Integration testing: to test combined parts of an application to determine if they function correctly together
3) System testing: to test the system as a whole
* enables us to test, verify and validate both the business requirements as well as the Applications Architecture
4) Regression testing: to verify that a fixed bug hasn't resulted in another functionality or business rule violation
5) User Acceptance testing: conducted by the Quality Assurance Team
- Non-Functional Testing: Performance testing / Usability Testing / Security Testing ...
http://istqbexamcertification.com/what-is-functional-testing-testing-of-functions-in-software/
http://istqbexamcertification.com/what-are-software-testing-levels/
http://istqbexamcertification.com/what-is-non-functional-testing-testing-of-software-product-characteristics/
: the process of evaluating a system or its components(s)
- An early start to testing reduces the cost, time
- Debugging: it involves identifying, isolating and fixing the problems/bugs
! the part of White box or Unit Testing
- Different types of testing
* Manual testing
* Automation testing (Test Automation): uses another software to test the software
http://istqbexamcertification.com/what-is-a-software-testing/
2. Different Methods of Software Testing
Black Box Testing
|
Grey Box Testing
|
White Box Testing
|
|
| Definition | done without having any knowledge of the interior workings of the application | test with limited knowledge of the internal workings of an application | the detailed investigation of internal logic and structure of the code |
| Advantages | - large numbers of moderately skilled testers can test | - rely on interface definition and functional specifications - can design test scenarios especially around communication protocols and data type handling |
- helps in optimising the code - maximum coverage is attained |
| Disadvantages | - limited coverage - inefficient testing - blind coverage |
- testing every possible input stream is unrealistic - many program paths will go untested |
- the costs are increased - it is difficult to maintain white box testing as the use of specialised tools like code analysers debugging tools are required |
http://www.careerride.com/Testing-white-box-black-box-gray-box.aspx
3. Different Levels of Testing
- Functional Testing: to evaluate the system's compliance with its specified requirements
1) Unit testing: to isolate each part of the programme and show that individual parts are correct in terms of requirements and functionality
2) Integration testing: to test combined parts of an application to determine if they function correctly together
3) System testing: to test the system as a whole
* enables us to test, verify and validate both the business requirements as well as the Applications Architecture
4) Regression testing: to verify that a fixed bug hasn't resulted in another functionality or business rule violation
5) User Acceptance testing: conducted by the Quality Assurance Team
- Non-Functional Testing: Performance testing / Usability Testing / Security Testing ...
http://istqbexamcertification.com/what-is-functional-testing-testing-of-functions-in-software/
http://istqbexamcertification.com/what-are-software-testing-levels/
http://istqbexamcertification.com/what-is-non-functional-testing-testing-of-software-product-characteristics/
UI Design
1. UI Design
: provides an interface that allows users to accomplish their goals with the software, without unnecessary effort
- UI has a major effect on the success or failure of software systems
http://searchmicroservices.techtarget.com/definition/user-interface-UI
2. UI - Different Layers
1) The Surface Layer: finished visual design aspects
2) The Skeleton Layer: screen layout and functional compartments on the screen
3) The Structure Layer: navigation from one section to another section in the user interface
4) The Scope Layer: built to support user tasks
5) The Strategy Layer: incorporates not only what the people running the site want to get out of it but what the users want to get out of the site as well
3. General UI Design Principles
1) Visibility of system status
2) Match between system and the real world
3) User control and freedom
4) Consistency and standards
5) Error prevention
6) Recognition rather than recall
7) Flexibility and efficiency of use
8) Aesthetic and minimalist design
9) Help users recognise, diagnose, and recover from errors
10) Help and documentation
https://www.nngroup.com/articles/ten-usability-heuristics/
4. Usability vs. Utility
- usability: does the system allow the user to learn and to use the raw capabilities easily?
* Learnability
* Efficiency of use
* Error handling
* Acceptability
- utility: does the system provide the raw capabilities to allow the user to achieve their goal?
https://msdn.microsoft.com/en-us/library/ms997577.aspx
5. Usability Principles
1) Do not rely on usability guidelines - always test with users
2) Base UI designs on users' tasks
3) Ensure that the sequences of actions to achieve a task are as simple as possible
4) Ensure that the user always knows what he or she can and should do next
5) Provide good feedback including effective error messages
6) Ensure that the user can always get out, go back or undo an action
7) Ensure that response time is adequate
8) Use understandable encoding techniques
9) Ensure that the UI's appearance is uncluttered
10) Consider the needs of different groups of users
11) Provide all necessary help
12) Be consistent
6. Wireframes
- a schematic produced displaying
- blueprint for layout, text and image placement, navigation components, colour scheme, and other web page components
https://webdesign.tutsplus.com/articles/a-beginners-guide-to-wireframing--webdesign-7399
: provides an interface that allows users to accomplish their goals with the software, without unnecessary effort
- UI has a major effect on the success or failure of software systems
http://searchmicroservices.techtarget.com/definition/user-interface-UI
2. UI - Different Layers
1) The Surface Layer: finished visual design aspects
2) The Skeleton Layer: screen layout and functional compartments on the screen
3) The Structure Layer: navigation from one section to another section in the user interface
4) The Scope Layer: built to support user tasks
5) The Strategy Layer: incorporates not only what the people running the site want to get out of it but what the users want to get out of the site as well
3. General UI Design Principles
1) Visibility of system status
2) Match between system and the real world
3) User control and freedom
4) Consistency and standards
5) Error prevention
6) Recognition rather than recall
7) Flexibility and efficiency of use
8) Aesthetic and minimalist design
9) Help users recognise, diagnose, and recover from errors
10) Help and documentation
https://www.nngroup.com/articles/ten-usability-heuristics/
4. Usability vs. Utility
- usability: does the system allow the user to learn and to use the raw capabilities easily?
* Learnability
* Efficiency of use
* Error handling
* Acceptability
- utility: does the system provide the raw capabilities to allow the user to achieve their goal?
https://msdn.microsoft.com/en-us/library/ms997577.aspx
5. Usability Principles
1) Do not rely on usability guidelines - always test with users
2) Base UI designs on users' tasks
3) Ensure that the sequences of actions to achieve a task are as simple as possible
4) Ensure that the user always knows what he or she can and should do next
5) Provide good feedback including effective error messages
6) Ensure that the user can always get out, go back or undo an action
7) Ensure that response time is adequate
8) Use understandable encoding techniques
9) Ensure that the UI's appearance is uncluttered
10) Consider the needs of different groups of users
11) Provide all necessary help
12) Be consistent
6. Wireframes
- a schematic produced displaying
- blueprint for layout, text and image placement, navigation components, colour scheme, and other web page components
https://webdesign.tutsplus.com/articles/a-beginners-guide-to-wireframing--webdesign-7399
Data Modelling
1. Data Modelling
: a technique for organising and documenting a system's data
- data must be organised in a way that is flexible and adaptable to unanticipated business requirements
2. Database Design
- Approaches
* Conventional files
* Databases approach which includes Relational model, Object-oriented model, Hierarchical model, Network model and Non-relational model
- Methodology: For data design, the relational model and the OO model are the two which dominate contemporary software engineering.
3. Entity Relationship Diagram (ERD)
: Graphical representation for Date Modelling
- Entity: all systems contain data and data describes 'things'
- Attributes: the pieces of data that we want to store about each instance of a given entity
* one or more attributes must be defined as identifier - "key" to find an instance of the entity
* Candidate key: a candidate to become the primary identifier of instances of an entity
* Primary key: a candidate key which will most commonly be used to uniquely identify a single entity instance
* Alternative key: any candidate key that is not selected to become the primary key
- Relationships: associations between instances
* Cardinality: One-to-One / One-to-Many / Many-to-Many
* Modality: optional / mandatory
http://searchcrm.techtarget.com/definition/entity-relationship-diagram
: a technique for organising and documenting a system's data
- data must be organised in a way that is flexible and adaptable to unanticipated business requirements
2. Database Design
- Approaches
* Conventional files
* Databases approach which includes Relational model, Object-oriented model, Hierarchical model, Network model and Non-relational model
- Methodology: For data design, the relational model and the OO model are the two which dominate contemporary software engineering.
3. Entity Relationship Diagram (ERD)
: Graphical representation for Date Modelling
- Entity: all systems contain data and data describes 'things'
- Attributes: the pieces of data that we want to store about each instance of a given entity
* one or more attributes must be defined as identifier - "key" to find an instance of the entity
* Candidate key: a candidate to become the primary identifier of instances of an entity
* Primary key: a candidate key which will most commonly be used to uniquely identify a single entity instance
* Alternative key: any candidate key that is not selected to become the primary key
- Relationships: associations between instances
* Cardinality: One-to-One / One-to-Many / Many-to-Many
* Modality: optional / mandatory
http://searchcrm.techtarget.com/definition/entity-relationship-diagram
Design Patterns
1. Design Patterns
- describes a problem which frequently occurs in our environment, and then describes the core of the solution to the problem
- a way of reusing abstract knowledge about a problem and its solution
- Different types of Patterns
* Creational patterns: the process of object construction and the instantiation process
e.g. Singleton pattern / Abstract pattern / Factory Method pattern
* Structural patterns: Composition of classes/objects: how classes and objects are composed to form larger structures
e.g. Adapter pattern: when an existing class performs the services that a client needs but has different method names
Composite pattern: compose objects (Component interface) into tree structures to represent part-whole (Leaf-Composite class) hierarchies
Decorator pattern
* Behavioural patterns: the way classes and objects interact/patterns of communication between class
e.g. Iterator pattern / Observer pattern
https://www.tutorialspoint.com/design_pattern/design_pattern_overview.htm
http://www.oodesign.com/adapter-pattern.html
http://www.oodesign.com/composite-pattern.html
2. Observer Pattern
: defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically
- Subject: the object which will frequently change its state and upon which other objects depend
* Keep track of its observers. Any number of Observer objects may observe a subject
* Provides an interface for attaching/detaching an observer
- Observer: the object which depends on a subject and updates according to its subject's state
* An updating interface for objects that gets notified of changes in a subject
(+) Minimal coupling between the Subject and the Observer
(+) Liability: possible cascading of notifications
- Implementing Issues
* Make sure the subject updates its state before sending out notifications
https://www.tutorialspoint.com/design_pattern/observer_pattern.htm
- describes a problem which frequently occurs in our environment, and then describes the core of the solution to the problem
- a way of reusing abstract knowledge about a problem and its solution
- Different types of Patterns
* Creational patterns: the process of object construction and the instantiation process
e.g. Singleton pattern / Abstract pattern / Factory Method pattern
* Structural patterns: Composition of classes/objects: how classes and objects are composed to form larger structures
e.g. Adapter pattern: when an existing class performs the services that a client needs but has different method names
Composite pattern: compose objects (Component interface) into tree structures to represent part-whole (Leaf-Composite class) hierarchies
Decorator pattern
* Behavioural patterns: the way classes and objects interact/patterns of communication between class
e.g. Iterator pattern / Observer pattern
https://www.tutorialspoint.com/design_pattern/design_pattern_overview.htm
http://www.oodesign.com/adapter-pattern.html
http://www.oodesign.com/composite-pattern.html
2. Observer Pattern
: defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically
- Subject: the object which will frequently change its state and upon which other objects depend
* Keep track of its observers. Any number of Observer objects may observe a subject
* Provides an interface for attaching/detaching an observer
- Observer: the object which depends on a subject and updates according to its subject's state
* An updating interface for objects that gets notified of changes in a subject
(+) Minimal coupling between the Subject and the Observer
(+) Liability: possible cascading of notifications
- Implementing Issues
* Make sure the subject updates its state before sending out notifications
https://www.tutorialspoint.com/design_pattern/observer_pattern.htm
피드 구독하기:
글 (Atom)