際際滷

際際滷Share a Scribd company logo
亠于亶 仍舒亶亟
Code ContractsDimaPaskoMurano Software Inc.
弌仂亟亠亢舒仆亳亠仂亳(Eiffel, Design By Contract, Spec#)仂亰仄仂亢仆仂亳 Code Contracts仗仂仍亰仂于舒仆亳亠 Code Contracts亳仄亠仂仗仂仂亟仂仍亢亳亠仍仆仂 ~ 30-40仄亳仆
Eiffel仍 仂亰亟舒仆 于 1985 亠仆舒亟仂仄 亠亶亠仂仄丐舒仄 仗仂磦亳仍舒 从仂仆亠仗亳 Design by Contract
Design by contract (DbC) 仂仆舒从仆仂亠 仗仂亞舒仄仄亳仂于舒仆亳亠  仂 仄亠仂亟 仗仂亠从亳仂于舒仆亳 仗仂亞舒仄仄, 仗亠亟仗仂仍舒亞舒ム亳亶 亠从仂亠 仗亠亳亳亳仂于舒仆亳亠 亳仆亠亠亶仂于 亳 仂仗亳舒仆亳亠 仂弍磶舒仆仆仂亠亶 从仂仄仗仂仆亠仆仂于 亳亠仄 仗亳 于亰舒亳仄仂亟亠亶于亳亳 亟亞  亟亞仂仄.
Design by contract (DbC)仗亠亟仍仂于亳  仂弍磶舒亠仍于舒, 从仂仂亠 亟仂仍亢仆 弍 于仗仂仍仆亠仆 于亰于舒ム亠亶 仂仂仆仂亶 仗亠亠亟 于亰仂于仂仄 仄亠仂亟舒仗仂仍仂于亳  仂弍磶舒亠仍于舒, 亞舒舒仆亳ム亳亠 于亰于舒亠仄仄 仄亠仂亟仂仄亳仆于舒亳舒仆 从仍舒舒  仂弍磶舒亠仍于舒, 仂 于仂亶于舒 从仍舒舒 弍亟 亟仂于仍亠于仂 仂仗亠亟亠仍亠仆仆仄 亠弍仂于舒仆亳礆. 舒仗亳仄亠, 亳仆于舒亳舒仆仂仄 亟仍 从仍舒舒 PositiveNumber, 仄仂亢亠 弍 于亠亢亟亠仆亳亠, 仂 舒仆亳仄仂亠 亳仍仂 于亠亞亟舒 弍仂仍亠 亳仍亳 舒于仆仂 0.
Spec#舒亰舒弍仂从舒 Microsoft Research弌仗亠亳舒仍亳亰亳仂于舒仆仆亶 磶从 仆舒 弍舒亰亠 C#
仗仂仍亰仂于舒仆亳亠 Code Contracts.NET Framework 3.5亠仂弍仂亟亳仄仂 仗仂亟从仍ム亳 从 仗仂亠从 Microsoft.Contracts.dll.NET framework 4.0丼舒 Base Class Library亠 仆舒亟仂 亟仂仗仂仍仆亳亠仍仆 reference仂仆舒从 仆舒仂亟 于 System.Diagnostics.Contracts
仂亰仄仂亢仆仂亳亳仆舒仄亳亠从舒 仗仂于亠从舒弌舒亳亠从舒 仗仂于亠从舒仂亟亟亠亢从舒 舒弍舒从仆 从仍舒仂于 亳 亳仆亠亠亶仂于亠仆亠舒亳 亟仂从仄亠仆舒亳亳
亠仄仂仆舒亳
仂 亞仂亳仄 仍亠亟舒仄Contract.Requires(d > 0);Contract.Ensures(Contract.Result<decimal> > 0);[ContractInvariantMethod]private void ObjectInvariant(){Contract.Invariant(d> 0);}[ContractClass(typeof(IFooContract))]interface IFoo[ContractClassFor(typeof(IFoo))]class IFooContract : IFoo
于仂亟Code Contracts 仗亳于仆仂 Design By Contract 于 .NET 仄亳弌舒亳亠从舒 亳 亟亳仆舒仄亳亠从舒 仗仂于亠从舒亠亟仍仂于亳仂仍仂于亳仆于舒亳舒仆 从仍舒舒 仂 仗仂仂 仂仂舒 仗舒从亳从舒, 从仂仂舒 仗仂亰于仂仍磳 亟亠仍舒 从仂亟 仍亠
弌仍从亳Code Contracts Projecthttp://research.microsoft.com/en-us/projects/contracts/MSDN Forumhttp://social.msdn.microsoft.com/Forums/en-US/codecontracts/threadsSpec# Projecthttp://research.microsoft.com/en-us/projects/specsharp
仂仗仂?

More Related Content

Similar to Code Contracts (20)

仂亠从亳仂于舒仆亳亠 仗仂 从仂仆舒从
仂亠从亳仂于舒仆亳亠 仗仂 从仂仆舒从仂亠从亳仂于舒仆亳亠 仗仂 从仂仆舒从
仂亠从亳仂于舒仆亳亠 仗仂 从仂仆舒从
Alexander Byndyu
Design by Contract basics
Design by Contract basicsDesign by Contract basics
Design by Contract basics
Sergey Teplyakov
Design by Contract
Design by ContractDesign by Contract
Design by Contract
Kiev ALT.NET
Design by Contracts in PHP
Design by Contracts in PHPDesign by Contracts in PHP
Design by Contracts in PHP
Sergei Khaletskiy
MSDevCon 2016 DevOps Impact on Architecture
MSDevCon 2016 DevOps Impact on ArchitectureMSDevCon 2016 DevOps Impact on Architecture
MSDevCon 2016 DevOps Impact on Architecture
Sergey Baranov
舒亰舒弍仂从舒 仄仂亟仍 亟仍 仂仍舒亟从亳 仗亳仍仂亢亠仆亳亶 仆舒 磶从亠 ActionScript 3 于 亠亟亠 Visu...
舒亰舒弍仂从舒 仄仂亟仍 亟仍 仂仍舒亟从亳 仗亳仍仂亢亠仆亳亶 仆舒 磶从亠 ActionScript 3 于 亠亟亠 Visu...舒亰舒弍仂从舒 仄仂亟仍 亟仍 仂仍舒亟从亳 仗亳仍仂亢亠仆亳亶 仆舒 磶从亠 ActionScript 3 于 亠亟亠 Visu...
舒亰舒弍仂从舒 仄仂亟仍 亟仍 仂仍舒亟从亳 仗亳仍仂亢亠仆亳亶 仆舒 磶从亠 ActionScript 3 于 亠亟亠 Visu...
Rinat Shaikhutdinov
舒亰舒弍仂从舒 于 亟仂仍亞
舒亰舒弍仂从舒 于 亟仂仍亞舒亰舒弍仂从舒 于 亟仂仍亞
舒亰舒弍仂从舒 于 亟仂仍亞
Vitebsk Miniq
亳从亳舒 舒仍从亳仆 "Testing in Node.js World"
亳从亳舒 舒仍从亳仆 "Testing in Node.js World"亳从亳舒 舒仍从亳仆 "Testing in Node.js World"
亳从亳舒 舒仍从亳仆 "Testing in Node.js World"
Fwdays
Requirement modelling in software creation process
Requirement modelling in software creation processRequirement modelling in software creation process
Requirement modelling in software creation process
Dima Dzuba
Encom Aurora - 仍亠从舒仆亟 仂仗仂于 - 仄亳舒仗 仆舒 DevConf
Encom Aurora - 仍亠从舒仆亟 仂仗仂于 - 仄亳舒仗 仆舒 DevConfEncom Aurora - 仍亠从舒仆亟 仂仗仂于 - 仄亳舒仗 仆舒 DevConf
Encom Aurora - 仍亠从舒仆亟 仂仗仂于 - 仄亳舒仗 仆舒 DevConf
chatbotscommunity
Dot.net building scalable java script application using react and typescript,...
Dot.net building scalable java script application using react and typescript,...Dot.net building scalable java script application using react and typescript,...
Dot.net building scalable java script application using react and typescript,...
Sigma Software
仂亟亟亠亢从舒 舒亶舒 亠亞舒仂仆.
仂亟亟亠亢从舒 舒亶舒 亠亞舒仂仆.仂亟亟亠亢从舒 舒亶舒 亠亞舒仂仆.
仂亟亟亠亢从舒 舒亶舒 亠亞舒仂仆.
亳舒亳仍 仂ミ出笑
舒个仂仄 DIRECTUM 2013 - 舒亰舒弍仂从舒 仗亳从仍舒亟仆 亠亠仆亳亶
舒个仂仄 DIRECTUM 2013 - 舒亰舒弍仂从舒 仗亳从仍舒亟仆 亠亠仆亳亶舒个仂仄 DIRECTUM 2013 - 舒亰舒弍仂从舒 仗亳从仍舒亟仆 亠亠仆亳亶
舒个仂仄 DIRECTUM 2013 - 舒亰舒弍仂从舒 仗亳从仍舒亟仆 亠亠仆亳亶
亳从仂 仂仍仂仂于
9 从舒 从仂仄仗仂仆亠仆仆 仗亳仍仂亢亠仆亳亶
9 从舒 从仂仄仗仂仆亠仆仆 仗亳仍仂亢亠仆亳亶9 从舒 从仂仄仗仂仆亠仆仆 仗亳仍仂亢亠仆亳亶
9 从舒 从仂仄仗仂仆亠仆仆 仗亳仍仂亢亠仆亳亶
KewpaN
SCRUMopen Developer Max Kolodezniy
SCRUMopen Developer Max KolodezniySCRUMopen Developer Max Kolodezniy
SCRUMopen Developer Max Kolodezniy
Alexey Krivitsky
Node.js for enterprise 2021 - JavaScript Fwdays 3
Node.js for enterprise 2021 - JavaScript Fwdays 3Node.js for enterprise 2021 - JavaScript Fwdays 3
Node.js for enterprise 2021 - JavaScript Fwdays 3
Timur Shemsedinov
仂亠从亳仂于舒仆亳亠 仗仂 从仂仆舒从
仂亠从亳仂于舒仆亳亠 仗仂 从仂仆舒从仂亠从亳仂于舒仆亳亠 仗仂 从仂仆舒从
仂亠从亳仂于舒仆亳亠 仗仂 从仂仆舒从
Alexander Byndyu
Design by Contract basics
Design by Contract basicsDesign by Contract basics
Design by Contract basics
Sergey Teplyakov
Design by Contract
Design by ContractDesign by Contract
Design by Contract
Kiev ALT.NET
Design by Contracts in PHP
Design by Contracts in PHPDesign by Contracts in PHP
Design by Contracts in PHP
Sergei Khaletskiy
MSDevCon 2016 DevOps Impact on Architecture
MSDevCon 2016 DevOps Impact on ArchitectureMSDevCon 2016 DevOps Impact on Architecture
MSDevCon 2016 DevOps Impact on Architecture
Sergey Baranov
舒亰舒弍仂从舒 仄仂亟仍 亟仍 仂仍舒亟从亳 仗亳仍仂亢亠仆亳亶 仆舒 磶从亠 ActionScript 3 于 亠亟亠 Visu...
舒亰舒弍仂从舒 仄仂亟仍 亟仍 仂仍舒亟从亳 仗亳仍仂亢亠仆亳亶 仆舒 磶从亠 ActionScript 3 于 亠亟亠 Visu...舒亰舒弍仂从舒 仄仂亟仍 亟仍 仂仍舒亟从亳 仗亳仍仂亢亠仆亳亶 仆舒 磶从亠 ActionScript 3 于 亠亟亠 Visu...
舒亰舒弍仂从舒 仄仂亟仍 亟仍 仂仍舒亟从亳 仗亳仍仂亢亠仆亳亶 仆舒 磶从亠 ActionScript 3 于 亠亟亠 Visu...
Rinat Shaikhutdinov
舒亰舒弍仂从舒 于 亟仂仍亞
舒亰舒弍仂从舒 于 亟仂仍亞舒亰舒弍仂从舒 于 亟仂仍亞
舒亰舒弍仂从舒 于 亟仂仍亞
Vitebsk Miniq
亳从亳舒 舒仍从亳仆 "Testing in Node.js World"
亳从亳舒 舒仍从亳仆 "Testing in Node.js World"亳从亳舒 舒仍从亳仆 "Testing in Node.js World"
亳从亳舒 舒仍从亳仆 "Testing in Node.js World"
Fwdays
Requirement modelling in software creation process
Requirement modelling in software creation processRequirement modelling in software creation process
Requirement modelling in software creation process
Dima Dzuba
Encom Aurora - 仍亠从舒仆亟 仂仗仂于 - 仄亳舒仗 仆舒 DevConf
Encom Aurora - 仍亠从舒仆亟 仂仗仂于 - 仄亳舒仗 仆舒 DevConfEncom Aurora - 仍亠从舒仆亟 仂仗仂于 - 仄亳舒仗 仆舒 DevConf
Encom Aurora - 仍亠从舒仆亟 仂仗仂于 - 仄亳舒仗 仆舒 DevConf
chatbotscommunity
Dot.net building scalable java script application using react and typescript,...
Dot.net building scalable java script application using react and typescript,...Dot.net building scalable java script application using react and typescript,...
Dot.net building scalable java script application using react and typescript,...
Sigma Software
仂亟亟亠亢从舒 舒亶舒 亠亞舒仂仆.
仂亟亟亠亢从舒 舒亶舒 亠亞舒仂仆.仂亟亟亠亢从舒 舒亶舒 亠亞舒仂仆.
仂亟亟亠亢从舒 舒亶舒 亠亞舒仂仆.
亳舒亳仍 仂ミ出笑
舒个仂仄 DIRECTUM 2013 - 舒亰舒弍仂从舒 仗亳从仍舒亟仆 亠亠仆亳亶
舒个仂仄 DIRECTUM 2013 - 舒亰舒弍仂从舒 仗亳从仍舒亟仆 亠亠仆亳亶舒个仂仄 DIRECTUM 2013 - 舒亰舒弍仂从舒 仗亳从仍舒亟仆 亠亠仆亳亶
舒个仂仄 DIRECTUM 2013 - 舒亰舒弍仂从舒 仗亳从仍舒亟仆 亠亠仆亳亶
亳从仂 仂仍仂仂于
9 从舒 从仂仄仗仂仆亠仆仆 仗亳仍仂亢亠仆亳亶
9 从舒 从仂仄仗仂仆亠仆仆 仗亳仍仂亢亠仆亳亶9 从舒 从仂仄仗仂仆亠仆仆 仗亳仍仂亢亠仆亳亶
9 从舒 从仂仄仗仂仆亠仆仆 仗亳仍仂亢亠仆亳亶
KewpaN
SCRUMopen Developer Max Kolodezniy
SCRUMopen Developer Max KolodezniySCRUMopen Developer Max Kolodezniy
SCRUMopen Developer Max Kolodezniy
Alexey Krivitsky
Node.js for enterprise 2021 - JavaScript Fwdays 3
Node.js for enterprise 2021 - JavaScript Fwdays 3Node.js for enterprise 2021 - JavaScript Fwdays 3
Node.js for enterprise 2021 - JavaScript Fwdays 3
Timur Shemsedinov

Code Contracts