Contracts for C++Version 1.0 (pre-Wrocław Edition) Timur Doumler CppCon 18 September 2024 Contracts for C++ The Swan, The Pike, and The Crab – Fable by Ivan Krylov, 18143 Copyright (c) Timur Doumler | Contract"; Eiffel programming language published 2001 D programming language published with Contracts support 2024 We are here12 Copyright (c) Timur Doumler | @timur_audio | https://timur Contract"; Eiffel programming language published 2001 D programming language published with Contracts support 2012 Ada programming language gains Contract support 2024 We are here13 Copyright0 码力 | 181 页 | 4.44 MB | 6 月前3
Better Code: Contracts1Better Code: Contracts Dave Abrahams & Sean Parent What's holding our software together? Can we do better than duct tape and good intentions? 2© 2023 Adobe. All Rights Reserved. Adobe’s Software components whose interaction is based on precisely defined specifications of the mutual obligations — contracts.” —Building bug-free O-O software: An Introduction to Design by Contract™ https://www.eiffel const { return min(size(first()), size(second())); } bool empty() const; ... 60Strong contracts simplify code 61© 2023 Adobe. All Rights Reserved. What's in a “strong contract?” | Tradeoffs0 码力 | 204 页 | 4.46 MB | 6 月前3
Back to Basics: Smart PointersSmart Pointers Back to Basics Rainer Grimm Training, Coaching, and Technology Consulting www.ModernesCpp.netSmart Pointer A First Overview std::unique_ptr – Exclusive Ownership std::shared_ptr – Concurrency Function Arguments and Return ValuesOverview 4 Smart pointers automatically manage the lifetime of its resource. ▪ Smart Pointers ▪ Allocate und deallocate their resource in the constructor management with reference counting ▪ Are C++ answer to garbage collection ▪ Release the resource if the smart pointer goes out of scope ▪ Are available in four versions raii.cppOverview Name C++ Standard0 码力 | 30 页 | 625.43 KB | 6 月前3
Noexcept: Enabling Testing of Contract ChecksGuild of America tell us about software development? • Good programs require good contracts. • Corollary: Good contracts require good enforcement. • Contract checks help catch bugs early in the process noexcept specifier and noexcept operator work and what they are for • The importance of writing contracts and checking them at run time • How to unit test contract-checking annotations (CCAs) • How noexcept replacement: left hip • Lives in Espoo Finland • Member of the C++ Standards Committee; chair of the contracts SG • Co-host of CppCast • Organizer of the Helsinki C++ Meetup • Interests: Clean code, good tools0 码力 | 90 页 | 1.38 MB | 6 月前3
Exceptions Under the SpotlightINBAL LEVIWHO AM I? • AC++ enthusiast. • An embedded software engineer at Solar Edge working on smart home. • One of the organizers of CoreCpp conference and user group. • A Member of WG21. • One of performance reasons. • The error handling mechanism was addressed by C++’s Direction group around 2016 (contracts) and again in 2018. • The exception mechanism was addressed by Herb Sutter (Chair) in 2019: RTTI. PART IV: ALTERNATIVES 45Other suggestions for error handling are on the table as well: 1. Contracts, and pre-conditions. 2. Vicente Botet and JF Bastien’sP0323R9: std::expected. 3. Ben Craig is0 码力 | 53 页 | 2.82 MB | 6 月前3
Regular, Revisitedconstraining types and function prototypes will result in intuitive usage; conversely, breaking subtle contracts for functions and algorithms will result in unexpected behavior for the caller. This talk representation of the elements it references: => we need to have a shallow operator== (just like smart pointers) wg21.link/p1085 Should Span be Regular?2023 Victor Ciura | @ciura_victor - Regular representation of the elements it references: => we need to have a shallow operator== (just like smart pointers) shallow const => shallow operator== wg21.link/p1085 Should Span be Regular?2023 Victor0 码力 | 180 页 | 19.96 MB | 6 月前3
Back To Basics Functionsimplement the function body. ● Functions are also great to use as ‘pre’ and ‘post’ conditions (i.e. contracts) 121Passing lots of parameters to your functions? ● It’s probably best to pass in a ‘struct’ or uct options); ● Another ○ void myFunction(OptionsStruct* options); ○ Pass in as a pointer (or smart pointer) to ensure we’re always just passing in an ‘8-byte’ address (on a 64-bit architecture).0 码力 | 123 页 | 7.26 MB | 6 月前3
Trends Artificial Intelligence
functions; specialists will push depth, delivering AI that speaks the language of compliance, contracts, and customer intent. The question isn’t whether platforms or specialists win – it’s who can abstract product and technology innovation, ensuring we deliver high-value solutions and cutting-edge AI and smart workflow capabilities to our customers. - AlphaSense Co-Founder & CEO Jack Kokko (3/25) Source: • Google AI Ultra Subscription • Google Beam • Google Meet speech translation • Personalized Smart Replies • Jules • Imagen 4 • Veo 3 • Lyria 2 • Flow TV • Project Moohan • Glasses with Android0 码力 | 340 页 | 12.14 MB | 4 月前3
Rethinking Task Based Concurrency and Parallelism for Low Latency C++latency market data and trading software for use in HFT ● Personal ○ github.com/buildingcpp ■ Work Contracts, Networking, Messaging, Glimpse Instrumentation, etc … ○ github.com/michaelmaniscalco ■ Algorithms the Alternative?Thread Thread Thread Back Front Work Contracts (Overview): ● A Work Contract Group contains: ○ An array of Work Contracts (each with their own logic and, if needed, data, queue queue, etc) ○ A Signal Tree (which has as many leaf nodes as there are work contracts in the group) ● Threads are brought to the “task” rather than the “task” being brought to the threads (as is done with0 码力 | 142 页 | 2.80 MB | 6 月前3
MITRE Defense Agile Acquisition Guide - Mar 2014Contracting Officer Manages the solicitation, award, and execution of Agile development contracts, and facilitates communication between government and contractor staff. Cost Estimator Tracks efficiencies gained across several Agile development efforts. For example, competing and negotiating contracts at the portfolio-level can streamline the contracting processes for individual programs and allow are locked- in at contract award; changes often require costly contract modifications Scope Contracts allow the program to refine Agile requirements throughout the development process The contractor0 码力 | 74 页 | 3.57 MB | 5 月前3
共 125 条
- 1
- 2
- 3
- 4
- 5
- 6
- 13













