프로그래밍언어론 2023-04-11 수업정리

Flow

PL Review


Axiomatic Semantics

Axiomatic System


Axiom

Axiomatic System

The Weakest Precondition(최약 사전조건)

Assignment Axiom

$${Q[E/x]}\ x:= E\ {Q}$$

The Rules of Consequences

The Rule of Composition

$$\frac{{P}\ S_1\ {Q},\ {Q}\ S_2\ {R}}{{P}\ S_1;S_2\ {R}}$$

The Rule of Selection

$$\frac{{P\wedge B}\ S_1\ {Q},\ {P \wedge \neg B}\ S_2\ {Q}}{{P}\ if \ B\ then\ S_1\ else\ S_2}$$

The Rule of Iteration

$$\frac{{I\wedge B}\ S\ {I}}{{I}\ while\ B\ do\ S\ {I\wedge \neg B}}$$

The Rule of Iteration Example 1

다음 구문에서 weakest precondition을 찾으시오

while y!=x do
	y := y+1
{y=x}

(cont...)

Reference

마크다운 수식(logic)