Code Analysis++https://www.meetup.com/St-Petersburg-CPP-User- Group/ ● C++ Russia: https://cppconf.ru/en/Why Code Analysis?Software QualityReadability Maintainability tools fuzzer battery life Repeatable tests Undefined Behavior – Fun with NULL pointers, part 1: https://lwn.net/Articles/342330/Why code analysis – ● Improve software quality ● Lower developer frustration ● Avoid UBLanguageLanguage helps Built-in compiler check ○ Current LLVM implementation gives 5% overhead ○ Annotations to help analysis: gsl::SharedOwner, gsl::Owner, gsl::Pointer void sample1() { int* p = nullptr; {0 码力 | 61 页 | 2.70 MB | 6 月前3
From Eager Futures/Promises to Lazy Continuations: Evolving an Actor Library Based on Lessons LearnedFrom Eager Futures/Promises to Lazy Continuations Evolving an Actor Library Based on Lessons Learned from Large-Scale Deployments Benjamin Hindman @benh CppCon 2021prologue ● past life at UC Continuation{std::move(url), std::move(body), std::move(k)}; }lazy continuations auto k = http::Post(url, body, /* k' */); ● resulting type is the “computational graph”lazy continuations auto k = http::Post(url, body body, /* k' */); k.Start(); ● resulting type is the “computational graph” ● the graph is lazy, i.e., nothing has started when we get it (tradeoff for dynamic allocation) and must be explicitly startedlazy0 码力 | 264 页 | 588.96 KB | 6 月前3
Finding Bugs using Path-Sensitive Static AnalysisFinding Bugs using Path-Sensitive Static Analysis Gábor Horváth Gabor.Horvath@microsoft.com @XazaxHunWelcome to CppCon 2021! Join #visual_studio channel on CppCon Discord https://aka.ms/cppcon/discord latest announcements Take our survey https://aka.ms/cppconAgenda • Intro to path-sensitive static analysis • Path-sensitive checks in MSVC • A look under the hood • Upcoming features • Lessons learned2012 -> Unknown p -> Null p -> MaybeNull p -> MaybeNull Warning Unknown Null NotNull MaybeNull Analysis state Transition semi-lattice• Some paths are infeasible: • Not taking branch 1, but taking branch0 码力 | 35 页 | 14.13 MB | 6 月前3
Dependency Injection in C++Usage ImplementationMarshalling Base Implementations 13 Bloomberg Dependency Injection System Analysis Component Injection Trade Security Broker Pricing Sizing Sending Execute Trade Cancel ❑Constructors 92 Bloomberg DI for immutable APIsProblem : Lazy initialization ❑Not able to pass in a constructed object 96 Bloomberg DI for lazy object constructionBloomberg 97 Phasing DI into Legacy _name_); } const std::string index_name_; std::unique_ptrdb_helper_; }; Dependency Lazy InjectionBloomberg 98 Phasing DI into Legacy Codebase class LazyObj { :public LazyObj(…, const 0 码力 | 106 页 | 1.76 MB | 6 月前3
The Most Important Design Guideline is Testabilityinto smaller chunks •Static analysis tools99 How can we test it? •Remove old code and add new code at the same time •Separate tasks into smaller chunks •Static analysis tools •Formal Design100 How •Remove old code and add new code at the same time •Separate tasks into smaller chunks •Static analysis tools •Formal Design •Code Review101 How can we test it? •Remove old code and add new code at Control Tracking) 2. Enumeration/Constant Versioning and Deprecation 3. Automated Static Code Analysis for Renaming 4. Semantic Versioning for Enums 5. Refactor Scripts and Tools to Validate Renaming0 码力 | 126 页 | 9.11 MB | 6 月前3
stdx::interval, a library for intervals on totally ordered setssuch cases that they should account for? Did they know such cases might be there but they were too lazy to work out what they were?—or, even less charitably, they lacked the analytic skill to be able to adequate analytical scrutiny. It’s not that all cases receive equal scrutiny; some case require more analysis, some less. The actual difference between cases starts with their descriptions. Some cases have circumstances. The more such requisite circumstances accrue, the longer the description and the greater the analysis to fully comprehend it. The proper goal is complete coverage of all cases, a full portfolio that0 码力 | 1 页 | 45.14 KB | 6 月前3
The Roles of Symmetry And Orthogonality In Designcomponent) 2 Implementation Hygiene • Unnecessarily complex processing • Example: Eager-compute or Lazy-compute that introduces stochastic time-shifting of computation and resource contention, or which ALGOL 68, section 0.1.2, Orthogonal design Dutch mathematician and computer scientist: • Numerical analysis • Programming languages • Design principles • Essential for design of complex systems: • System Ranged object lifetimes (e.g., std::smart_ptr<>, std::unique_ptr<>) • Time-shifted computation (i.e., lazy-compute, eager- compute) • Double-compute (e.g., in iterators, or when using std::range) • Synchronization0 码力 | 151 页 | 3.20 MB | 6 月前3
Back to Basics: Concurrencygraphics, and game engine development. ○ My research in program analysis is related to performance building static/dynamic analysis and software visualization tools. ● I do consulting and technical (2/2) ● Fixing deadlock ○ Re-run code, and see if you are missing a pair of lock/unlock ○ Static analysis techniques (i.e. thread sanitizers) may detect deadlock before compilation. ○ Otherwise deadlock save state (which could be done asynchronously) and give you more control of your program (i.e., lazy-computation). ○ Nice explanation of coroutines: https://stackoverflow.com/questions/553704/what-is-a-coroutine0 码力 | 141 页 | 6.02 MB | 6 月前3
Things Happening in SG14Many have reported that design styles tend to change (monadic programming, functional programming, lazy execution) making it harder to grasp what’s going on from the source code (it’s « more magic ») Many have reported that design styles tend to change (monadic programming, functional programming, lazy execution) making it harder to grasp what’s going on from the source code (it’s « more magic ») non-thread-safe operations at compile-time • There seems to be prior art in Clang’s thread safety analysis 116P2966 requests: parallel and concurrent computing • Naming, tracing and debugging • Adding0 码力 | 148 页 | 1009.97 KB | 6 月前3
Hello 算法 1.1.0 C++ 版源。 2.1.2 理论估算 由于实际测试具有较大的局限性,因此我们可以考虑仅通过一些计算来评估算法的效率。这种估算方法被称 为渐近复杂度分析(asymptotic complexity analysis),简称复杂度分析。 复杂度分析能够体现算法运行所需的时间和空间资源与输入数据大小之间的关系。它描述了随着输入数据大 小的增加,算法执行所需时间和空间的增长趋势。这个定义有些拗口,我们可以将其分为三个重点来理解。 能误判这些元素不存在,如图 6‑7 所示。 第 6 章 哈希表 hello‑algo.com 126 图 6‑7 在开放寻址中删除元素导致的查询问题 为了解决该问题,我们可以采用懒删除(lazy deletion)机制:它不直接从哈希表中移除元素,而是利用一个 常量 TOMBSTONE 来标记这个桶。在该机制下,None 和 TOMBSTONE 都代表空桶,都可以放置键值对。但不同的 資料結構 code 代码 程式碼 file 文件 檔案 function 函数 函式 method 方法 方法 variable 变量 變數 asymptotic complexity analysis 渐近复杂度分析 漸近複雜度分析 time complexity 时间复杂度 時間複雜度 space complexity 空间复杂度 空間複雜度 loop 循环 迴圈 iteration0 码力 | 379 页 | 18.47 MB | 1 年前3
共 188 条
- 1
- 2
- 3
- 4
- 5
- 6
- 19
相关搜索词
CodeAnalysis++FromEagerFuturesPromisestoLazyContinuationsEvolvinganActorLibraryBasedonLessonsLearnedfromLargeScaleDeploymentsFindingBugsusingPathSensitiveStaticDependencyInjectioninC++TheMostImportantDesignGuidelineisTestabilitystdxintervallibraryforintervalstotallyorderedsetsRolesofSymmetryAndOrthogonalityInBackBasicsConcurrencyThingsHappeningSG14Hello算法1.1













