Presentation is loading. Please wait.

Presentation is loading. Please wait.

Aspect-Oriented Software Development (AOSD) Tutorial #6 Categories of Aspects – contd.; LTL properties formalization; Assume – guarantee specifications.

Similar presentations


Presentation on theme: "Aspect-Oriented Software Development (AOSD) Tutorial #6 Categories of Aspects – contd.; LTL properties formalization; Assume – guarantee specifications."— Presentation transcript:

1 Aspect-Oriented Software Development (AOSD) Tutorial #6 Categories of Aspects – contd.; LTL properties formalization; Assume – guarantee specifications

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 Assume – guarantee aspects specification Examples

3 Aspect-Oriented Software Development (236608) 3 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

4 Aspect-Oriented Software Development (236608) 4 Rational Exam System Properties -1 “After a user answers a question, the system performs correctness check and prints out the result” φ 1 = G ( ((get_ans_ret = a) ⋀ (a ≠ null)) → (¬ call_check_ans U ( (call_check_ans ⋀ arg1 = a ⋀ arg2 =result) ⋀ X (¬ call_check_ans U (print ⋀ arg = check_ans_ret) ) ))) liveness

5 Aspect-Oriented Software Development (236608) 5 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” φ 2 = G ( (call_check_ans → arg2 =r1+r2) ⋀ (ret_c_a -> (check_ans_ret ↔ arg1 = arg2)) ) enough, due to φ 1 safety

6 Aspect-Oriented Software Development (236608) 6 Rational Exam – Properties Preservation φ 1 = G(((get_ans_ret=a) ⋀ (a ≠ null))→ (¬ call_ch_ans U ((call_ch_ans ⋀ arg1=a ⋀ arg2=result) ⋀ X(¬ call_ch_ans U (print ⋀ arg = ch_ans_ret))))) φ 2 = G((call_ch_ans → arg2=r1+r2) ⋀ (ret_c_a -> (check_ans_ret ↔ arg1 = arg2)) ) Categoryφ1φ1 φ2φ2 Exceptions logging Multiplication Normalization Age restriction Grading Factor ✔ (here) ✔ (defn) ✔ (here) ✔ (defn) ✔ (here) ✘ spectative strongly inv. weakly inv. regulative spectative weakly inv.

7 Aspect-Oriented Software Development (236608) 7 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

8 Aspect-Oriented Software Development (236608) 8 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 G(A → B) G (A → ((F B) ⋀ ((¬B) U E))) G ( (¬B) U A) G (A → F B) G (¬(A ⋀ B) ⋀ X(A ⋀ B)→ X C meaning (here): A has to be followed by E and then B


Download ppt "Aspect-Oriented Software Development (AOSD) Tutorial #6 Categories of Aspects – contd.; LTL properties formalization; Assume – guarantee specifications."

Similar presentations


Ads by Google