সব বই

পেশাদার

1 Markets I: The Ecosystem and Exchange-Traded Marketsবাজার অনলাইন 2 Markets II: Rates, FX and Creditবাজার অনলাইন 3 Markets III: Commodities, Energy and Cryptoবাজার অনলাইন 4 Quantitative Methodsপদ্ধতি অনলাইন 5 Derivatives and Volatilityডেরিভেটিভস অনলাইন 6 Rates, Credit, XVA and Riskসুদহার, ঋণ ও ঝুঁকি অনলাইন 7 Research Craft: Predictors, Backtests, Measurement, Portfoliosগবেষণা অনলাইন 8 Strategies I: Equities and Futuresকৌশল অনলাইন 9 Strategies II: Volatility, Relative Value, Macro and the Bank Desksকৌশল অনলাইন 10 Microstructure and Executionএক্সিকিউশন অনলাইন 11 Market Making and High-Frequency Tradingমার্কেট মেকিং অনলাইন 12 Machine Learning for Marketsমেশিন লার্নিং অনলাইন 13 Low-Latency Softwareপ্রযুক্তি অনলাইন 14 Networks, Hardware and Trading Infrastructureপ্রযুক্তি অনলাইন 15 Research, Data and Risk Platformsপ্রযুক্তি অনলাইন 16 The Desk and the Firmপ্রতিষ্ঠান অনলাইন 17 The Industry: Firms, Roles and Careersক্যারিয়ার অনলাইন 18 Interviews I: Maths, Probability and Speedক্যারিয়ার অনলাইন 19 Interviews II: Markets, Trading Games and the Final Roundক্যারিয়ার অনলাইন 20 Interviews III: Codeক্যারিয়ার অনলাইন
অ্যাপ পরিচিতি Coach সাইন ইন পড়া শুরু করো

বইগুলো এখনো বাংলা ভাষায় পাওয়া যায় না — ইংরেজি সংস্করণ দেখানো হচ্ছে।

Computer Science · পরিভাষা

Hoare triple, Hoare logic, assignment axiom, rule of consequence কী?

অন্য নাম: Hoare triple · Hoare logic · assignment axiom · rule of consequence

Definition 20.1 University Computer Science — Year 3 · অধ্যায় 20 — Program Verification: Hoare Logic and Model Checking

A Hoare triple {P} S {Q}\{P\}\,S\,\{Q\} is valid when every run of SS from a state satisfying PP that terminates ends in a state satisfying QQ. Hoare logic derives triples by the rules below, where Q[e/x]Q[e/x] is QQ with ee substituted for xx.

  • The assignment axiom: {Q[e/x]}  x=e  {Q}\{Q[e/x]\}\; x = e\; \{Q\}.
  • Sequence: from {P} S1 {R}\{P\}\,S_1\,\{R\} and {R} S2 {Q}\{R\}\,S_2\,\{Q\}, derive {P} S1;S2 {Q}\{P\}\,S_1; S_2\,\{Q\}.
  • If: from {P∧b} S1 {Q}\{P \wedge b\}\,S_1\,\{Q\} and {P∧¬b} S2 {Q}\{P \wedge \neg b\}\,S_2\,\{Q\}, derive {P}\{P\} if b: S1 else: S2 {Q}\{Q\}.
  • While: from {I∧b} S {I}\{I \wedge b\}\,S\,\{I\}, derive {I}\{I\} while b: S {I∧¬b}\{I \wedge \neg b\}.
  • The rule of consequence: from P⇒P′P \Rightarrow P', {P′} S {Q′}\{P'\}\,S\,\{Q'\} and Q′⇒QQ' \Rightarrow Q, derive {P} S {Q}\{P\}\,S\,\{Q\}.
A derivation as a proof tree: each line follows from the one above the bar by the rule named on its right. The two consequence steps need x 10 x < 10 ℝightarrow x + 1 10, which holds for 8-bit integers since x < 10 rules out the wrap, and x 10 (x < 10) ℝightarrow x = 10.
A derivation as a proof tree: each line follows from the one above the bar by the rule named on its right. The two consequence steps need x≤10∧x<10⇒x+1≤10x \le 10 \wedge x < 10 \Rightarrow x + 1 \le 10, which holds for 8-bit integers since x<10x < 10 rules out the wrap, and x≤10∧¬(x<10)⇒x=10x \le 10 \wedge \neg (x < 10) \Rightarrow x = 10.
প্রসঙ্গসহ পড়ো →