Download presentation
Presentation is loading. Please wait.
1
Aspect-Oriented Software Development (AOSD) Tutorial #5 Categories of Aspects – contd.; LTL properties formalization
2
Aspect-Oriented Software Development (236608) 2 Today: Aspects Categories (contd.), LTL properties Base system properties preservation –guaranteed –occasional From natural language to Temporal Logic Examples
3
Aspect-Oriented Software Development (236608) 3 LTL Future Operators - Reminder G palways p Fpeventually p (Շ, i) ⊨ Xp ⇔ (Շ, i+1) ⊨ pnext p (Շ, i) ⊨ p U q ⇔ ∃k : k ≥ i ⋀ (Շ, k) ⊨ g ⋀ ∀j : i ≤ j < k → (Շ, j) ⊨ fp until q (Շ, i) ⊨ p W q ≡ G p ⋁ p U q p weak until q k = i q is true in the current state ¬∃j. ( Շ, j) ⊨ p (and this is all right) maybe q is never true ( Շ, i) ⊨ G p ( Շ, i) ⊨ F p ( Շ, i) ⊨ X p i ( Շ, i) ⊨ p U q i i i …… …… … … … …… pppp p p pp q computation ( Շ ) = sequence of states
4
Aspect-Oriented Software Development (236608) 4 Base Properties Preservation?(1) p p, q q q, t q t t φ 1 = G (p → X q) φ 2 = G (r → X t) join-points: r becomes true r, q, t r t r r r Spectative aspect; “X” properties
5
Aspect-Oriented Software Development (236608) 5 Base Properties Preservation(2) p p, r q q, t φ 1 = G (p → F q) φ 2 = G (r → F t) r q r t p Regulative aspect; general liveness properties advice effect
6
Aspect-Oriented Software Development (236608) 6 More to Regulative Aspects p p, r q q, t φ 1 = G (p ∨ q) r q r t p Regulative aspect
7
Aspect-Oriented Software Development (236608) 7 Example: Rational Exam (reminder) private void doExam() { while (true) { r1 = randomRational(); r2 = randomRational(); result = r1.add(r2); answer = getAnswer(r1, r2); if (answer == null) break; checkAnswer(answer, result); } public static void main(String[] args) { RationalExam exam = new RationalExam(); exam.doExam(); } The system generates and checks online exams for students with simple arithmetic exercises for fractions RationalExam class: initiates exams, generates questions, accepts answers, checks answers
8
Aspect-Oriented Software Development (236608) 8 Rational Exam System Properties -1 “After a user answers a question, the system performs correctness check and prints out the result”
9
Aspect-Oriented Software Development (236608) 9 Rational Exam System Properties -2 “If an answer is a and the fractions in the question – r1 and r2, the correctness check will result in “true” iff a = r1 + r2”
10
Aspect-Oriented Software Development (236608) 10 Rational Exam – Properties Preservation Categoryφ1φ1 φ2φ2 Exceptions logging Multiplication Normalization Age restriction Grading Factor
11
Aspect-Oriented Software Development (236608) 11 From natural language to LTL In this example: Specification of events in the system and their relations Examples from the ontology of ARCADE temporal patterns: match patterns with temporal logic formulas
12
Aspect-Oriented Software Development (236608) 12 From natural language to LTL Temporal pattern (events)Temporal logic E between A and B A during B A before B, B only after A A leads to B C on A and B
13
Aspect-Oriented Software Development (236608) 13 Example – Toll System (Reminder) The system needs to react in-time in order to: read the gizmo identifier; turn on the light (to green or yellow); display the amount to be paid; photograph the plate number from the rear; sound the alarm; respond to gizmo activation and reactivation.
14
Aspect-Oriented Software Development (236608) 14 Toll System - Constraint 1
15
Aspect-Oriented Software Development (236608) 15 Constraint 1 - formalized Temporal Pattern = ? Predicates: Formula:
16
Aspect-Oriented Software Development (236608) 16 Constraint 1 – formalized – contd. Formalizing outcome action: Predicates: The whole formula:
17
Aspect-Oriented Software Development (236608) 17 Toll System - Constraint 2
18
Aspect-Oriented Software Development (236608) 18 Constraint 2 - formalized Temporal Pattern = ? Predicates: Formula:
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.