Formal Consistency Checking over Specifications in Natural Languages Rongjie Yan1, Chih-Hong Cheng2, Yesheng Chai1,3 1 State Key Laboratory of Computer Science, Institute of Software, China 2 Industrial Software Technologies, ABB Corporate Research, Germany 3 School of Computer Science & Technology, Soochow University, China

It’s all about engineering efficiency • Specifications concretize vague ideas how a system or a component should behave, often represented in the form of natural languages. • Early validation and verification (V&V) can reveal potential problems early • Validation – is the specification describing what we want?

13-Mar-15

http://www.bowdoin.edu/~disrael/what-the-customer-really-needed/what-the-customer-really-needed.jpg

1

Summary: What do we do in this work? • SpecCC – a tool to synthesize control components from specifications in natural language • Reports “inconsistent” when no implementation is possible

• Benefits: early V&V via • Checking inconsistencies in specification • Observing the behavior of the synthesized components, to infer if one needs to modify the specification

• How? • Heuristic translation natural language spec to formal spec • Algorithmic synthesis from formal spec to implementation (covered by [CAV’14]) 13-Mar-15

2

Outline • Background • Maintaining consistencies between natural language and formal language • Maintaining consistencies between formal language and implementability • Implementation and evaluation • Conclusion

13-Mar-15

3

Background • Natural languages: • a rich diversity of structures – we work on structured English • semantic ambiguities

• Linear temporal logic: • a temporal logic, • ϕ::=p | ~ϕ | ϕ∨ϕ | Xϕ | Fϕ | Gϕ |ϕUϕ • expressing properties of paths in a computation tree. neXt in Future 13-Mar-15





Globally

ϕ ϕ

Until

Gϕ ϕ φUϕ

φ

ϕ φ

ϕ

ϕ

φ

LTL looks intimidating at first but they are natural in essence!

ϕ

ϕ 4

Maintaining consistencies between natural and formal languages A structured English Lexical and syntactic parsing Syntax tree Basic syntax processing

Rule matching LTL formula

Semantic reasoning

Massaging the formula for meaningful & efficient synthesis

Reduced LTL formulas Time abstraction Formula ready for control synthesis engine 13-Mar-15

Input and output partition

Reduced LTL formulas 5

Lexical and syntactic parsing • Dependency relation extraction -> Rule matching -> Formula generation Example: When auto-control mode is entered, eventually the cuff will be inflated.

implication F

inflate_cuff

enter_auto-control_mode

G (enter_auto-control_mode -> F inflate_cuff) 13-Mar-15

6

Rationale behind post-processing • Semantic reasoning: understand “off == !on” • Time abstraction: avoid using 100neXt operators in synthesis • I/O partition: An LTL formula has no I/O defined! LTL formula

Semantic reasoning

Massaging the formula for meaningful & efficient synthesis

Reduced LTL formulas Time abstraction Formula ready for control synthesis engine 13-Mar-15

Input and output partition

Reduced LTL formulas 7

Semantic reasoning – antonym If pulse wave or arterial line is available, and cuff is selected, corroboration is triggered. Antonym subject antonym candidates

candidate

Select a candidate

Look for its antonyms

wordset antonym candidates corresponding antonyms

Intersection of two sets

Empty?

Yes

No antonym exists

No Antonyms exist for the given candidate 13-Mar-15

8

Semantic reasoning: example • If pulse wave or arterial line is available, and cuff is selected, corroboration is triggered • If pulse wave and arterial line are unavailable, and cuff is selected, and blood pressure is not valid, next manual mode is started. pulse wave

wordset

available unavailable

antonym candidates

antonyms

available

unavailable

unavailable

13-Mar-15

available

available_pulse_wave

available_pulse_wave

unavailable_pulse_wave

~ available_pulse_wave 9

Time counting and abstraction • Number of time unit is convert to Next operators • Θ={θ0,…, θn} be a set of numbers of successive Next operators, θi’ be the number after abstraction, where θi=θi’x d + Δi • Greatest common divisor based reduction • d is the greatest common divisor of Θ and Δi=0 • Error bound constrained abstraction • minimize , minimize

13-Mar-15

To reduce the complexity of LTL formulas

To reduce the error bound

10

Time counting and abstraction Req-08 If Air Ok signal remains low, auto-control mode is terminated in 3 seconds. Req-28 If a valid pressure is unavailable for 180 seconds, manual mode should be triggered. Req-42 When auto-control mode is running, and the arterial line or pulse wave or cuff is lost, an alarm should sound in 60 seconds. According to the three requirements, Θ={3, 180, 60} After reduction: Θ’={1,60,20}, where d = 3 •Req-08 G(~Air_ok_signal -> (terminate_auto-control_mode || X terminate_auto-control_mode )). •Req-28 • We still need to monitor 60 neXt! • ~ avail && X ~ avail && XX ~ avail ….. XXXXXXXXX…X ~ avail 13-Mar-15

11

Time counting and abstraction Req-08 If Air Ok signal remains low, auto-control mode is terminated in 3 seconds. Req-28 If a valid pressure is unavailable for 180 seconds, manual mode should be triggered. Req-42 When auto-control mode is running, and the arterial line or pulse wave or cuff is lost, an alarm should sound in 60 seconds.

According to the three requirements, Θ={3, 180, 60} After abstraction with error bound 5: Θ’={0,3,1}, where d = 60, Δ0=3, Δ1=0, Δ2=0 •Req-08 G(~Air_ok_signal -> terminate_auto-control_mode). •Req-28 G ((~ avail && X ~ avail && XX ~ avail && XXX ~ avail ) -> manual_mode) No error in this case (only strengthening and loose sampling): • • •

Error appears in „sense for 3 seconds then decide“ -> we decide before waiting Error appears in „actuate 3 seconds from now“ -> we actuate immediately The computed error is an estimate without differentiating for, in, and from now

13-Mar-15

12

Input and output variable partition • Automatically • Individual formula partition according to the positions of Implication and Until operators • Conflict resolution between the sets of inputs and sets of outputs of all formulas • Manually • Adjustment and confirmation G((available_pulse_wave || available_arterial_line) && select_cuff -> trigger_corroboration) Input: {available_pulse_wave, available_arterial_line, select_cuff} 13-Mar-15

Output: {trigger_corroboration} 13

Maintaining consistencies between formal language and implentability • Consistency checking by synthesizing the set of generated LTL formulas • The existence of a controller shows the consistency • Failure may locate the inconsistency • Heuristic refinement over inconsistent specification • Locate the pair of inconsistent requirements • Adjust the existing input/output variable partition • Modify the requirements 13-Mar-15

14

Implementation

13-Mar-15

15

Evaluation-1 Name

CARA

13-Mar-15

No.

Specification

Num. of formulas

Num. of Input

Num. of Output

Time(s)

0

Working mode and switching

30

22

28

34

1

Pump Monitor

20

9

14

2

2.1.1

BPM: cuff detector

14

13

12

1

2.1.2

BPM: AL detector

15

11

14

2

2.1.3

BPM: pulse wave detector

14

9

12

1

2.2.1

BPM: initial auto control

16

14

15

1

2.2.2

BPM: first corroboration

19

11

16

29

2.2.3

BPM: valid ctrl blood pressure

13

11

10

2

2.2.4

BPM: cuff source handler

11

9

10

2

2.2.5

BPM: arterial line blood pressure

16

9

13

1

2.2.6

BPM: arterial line corroboration

12

8

13

1

2.2.7

BPM: pulse wave handler

20

10

21

23

3.1

(PA) Model ctrl algorithm

9

15

11

3

3.2

(PA) Polling algorithm

56

12

20

11

16

Evaluation-2 Name

TELE

Robot

No.

Specification

Num. of formulas

Num. of Input

Num. of Output

Time(s)

1

Shopping

29

11

24

8

2

Article processing

17

3

13

1

3

On-line reservation

6

3

4

1

4

Information

15

8

14

1

5

Local bulletin board

17

7

16

1

1

A robot with 4 rooms

9

2

5

1

2

A robot with 9 rooms

14

2

10

1

3

Two robots with 5 rooms

25

2

11

7

The execution time is only about checking consistency, not about printing the strategy • We use compositional methods and conjucnt sub-strategies in BDD (printout strategy = printout BDD) 13-Mar-15

17

Conclusion • Set a bridge between system designers and formal methods for correctness-by-construction • Scalability is obtained from G4LTL-ST with compositional synthesis

• Combine syntax and semantic analysis in natural language processing • Antonym reasoning to reduce the number of propositions • Support time expression in specification • Semi-automatic input/output variable extraction

• Guided refinement over inconsistent specification 13-Mar-15

18

13-Mar-15

19

DATE Conference Template

Mar 13, 2015 - 3 School of Computer Science & Technology, Soochow University, China ... Example: When auto-control mode is entered, eventually.

927KB Sizes 1 Downloads 206 Views

Recommend Documents

IADIS Conference Template - UPCommons
representatives of the information and communications technologies (ICTs) in the ..... an additional degree of freedom in the protocol to alter the probability of ...

ISPIM Conference Template
preferably for free, from online communities e.g. social networks, discussion groups and blogs (Brabham, 2012 ... incomplete process of identification of scientific school of thought and to low efficiency in the research .... As Kang and Kang (2010)

IADIS Conference Template
challenges in design and implementation of cross layer adaptation schemes for multimedia transmission over wired and wireless networks. In addition, the paper proposes the basic aspects of a cross-layer adaptation framework for multimedia ..... The p

IADIS Conference Template
recent advances in wireless communications and positioning technologies. 3G technology makes mobile wireless communications faster than ever, and highly ...

IADIS Conference Template
prove it rigorously in Corollary 1. That corollary allows us, whenever we have a layout that is lext(k,U), to think without loss of generality that it starts with the vertices from U. ≤. Definition 2 (right extensibility with respect to multiple ve

IADIS Conference Template
The network layer needs to ensure the stability of routing without relying on the mechanisms from the physical layer, and routing solutions have to consider.

APSIPA Conference Template
E-mail: [email protected] Tel: +886-7-525XXXX. †Department of Electrical Engineering, National Sun Yat-sen University, Kaohsiung, Taiwan, R.O.C..

IADIS Conference Template
for next-generation wide area backbone networks. ... In optical networks, lightpath establishment is expected to be an on demand service, and each lightpath.

IADIS Conference Template - Research Unit 6
Research Academic Computer Technology Institute and Computer ... Cross layer adaptation, Multimedia transmission, Wireless and Mobile Networking. 1.

SIGPLAN Conference Proceedings template - Semantic Scholar
Jun 5, 2010 - of shared memory is a software-managed cache for memory reuse. Although it ...... Another way is to use an analytical performance model. [7],[15] to ..... [1] A. V. Aho, et. al., Compilers, Principles, Techniques, & Tools, Pear-.

SIGPLAN Conference Proceedings template
Application-Based Systems]: Real-time and embedded systems; ..... 00]() // new window. ) )* ..... cuted on a small mobile device that does not support Java.

IADIS Conference Template - Research Unit 6
consuming applications), the sensitiveness to packet delays (latency and jitter) .... represents the multimedia server, the proxy which is located at the edge of the .... Wireless Network Measurement: This module is responsible of monitoring the ...

SIGPLAN Conference Proceedings template - Semantic Scholar
Jun 5, 2010 - dresses two major challenges of developing high performance. GPGPU ... carefully: (1) how to parallelize an application into concurrent.

SIGPLAN Conference Proceedings template
Norman H. Cohen. IBM Thomas J. Watson Research Center ..... ger in the range 0 to 24 identifying the zone within the region. The following ... hour on the hour. When we ..... of its string arguments, and a call on this function within a repetition ..

Conference Full Paper template
EACS 2012 – 5th European Conference on Structural Control ... covariance- and data-driven Stochastic Subspace Identification (SSI) to automatically normalize ...

No Author Title Conference Volume Page City Country Date Year ...
1. Wen-Chung Chang. “Visual Simultaneous Localization and Mapping Employing. Active Infrared ..... In Lecture Notes in Computer Science : Advances ... Chih-Wei Cho [1st-year ..... “Six Degree-of-Freedom Task Encoding in Vision-Based.

CTE Conference Save the Date 2018_19.pdf
Page 1 of 1. Page 1 of 1. CTE Conference Save the Date 2018_19.pdf. CTE Conference Save the Date 2018_19.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying CTE Conference Save the Date 2018_19.pdf. Page 1 of 1.

Maritim conference rates - Conference Hotel Group
including technical support. • Data projector (determined ... Business premises of M Hotelgesellschaft mbH · Herforder Strasse 2 · 32105 Bad Salzuflen · Germany.

SAFA Regional CFO Conference 2017 Conference Theme
Jan 27, 2017 - others, the first SAFA Quiz & Elocution Contest, SAFA Best Presented ... The theme of the Conference is Navigating through Digital.

Multifunction peripheral with template registration and template ...
Jun 23, 2010 - nonvolatile memory 54; a hard disk drive (HDD) 55; a net work interface (I/F) 56; ... 54 may store display data and the like to be displayed in the.

Multifunction peripheral with template registration and template ...
Jun 23, 2010 - Io é : 100%. 5 A4. 8. Single side. 72dl I, ______ __@____I if" """"" ' f““"""_""""_ “ax—'2'?”rigs—"'1 ______ _ _,. F ' h A4 ...... play portion 93d.

national conference - national library conference - NMIMS
Challenges of the electronic era, our educational institute NMIMS in association with ... To bring together Academic and Public Library and Information.

CONFERENCE PROGRAMME
Mar 21, 2016 - Faculty of Economics and Business. Working ... The Online Dispute Resolution as Contribution ... „Cloud computing" opportunities and.

CONFERENCE PROGRAMME
Mar 21, 2016 - Faculty of Economics and Business. Working language – ... the Role of the. Sharing Economy ... „Cloud computing" opportunities and obstacles.