Session Types in C++gives a thought about types. That is something which he has tough of and learned as a child. I, on the contrary, developed so slowly that I did not begin to wonder about types until I was an adult.“ gives a thought about types. That is something which he has tough of and learned as a child. I, on the contrary, developed so slowly that I did not begin to wonder about types until I was an adult.“ informally: So, what is a type? Depends on who you ask. So called “dependent type”? 16What are types used for in programming? 17What are types used for in programming? • Similar to money and its roles: •0 码力 | 89 页 | 1.55 MB | 6 月前3
Back to Basics: Algebraic Data TypesBack to Basics: Algebraic Data Types I also do C++ training! arthur.j.odwyer@gmail.com Arthur O’Dwyer 2020-09-16Outline ● Why the name “algebraic data types”? [3–18] ○ Memory layout diagrams. Why Questions? ● More about pair and tuple [57–69] Questions? 2What do I mean by algebraic types? pair C++98. The original algebraic data type. tuple C++11. optional C++17. variant tuple are product types To find the size of the domain of a pair or tuple type, we take the product of the sizes of its element types. Therefore pair and tuple are known as product types. 5 A A possible0 码力 | 73 页 | 267.05 KB | 6 月前3
LITERALS SAFELY for Types that Behave as though Built-in - Pablo Halpern - CppCon 2021EMBRACING USER DEFINED LITERALS SAFELY for Types that Behave as though Built-in Pablo Halpern phalpern@halpernwightsoftware.com CppCon 2021 This work by Pablo Halpern is licensed under a Creative Embracing User Defined Literals Safely for Types that Behave as though Built-in – Pablo Halpern, Tuesday 9am ■ Embracing (and also destroying) Variant Types Safely – Andrei Alexandrescu, Thursday 9am 10/26/21 Pablo Halpern, 2021 (CC BY 4.0) 10Minimizing the divide between builtin and user-defined types ■ Operator overloading allows the syntax for assigning, comparing, and streaming a std::string to0 码力 | 66 页 | 1.47 MB | 6 月前3
simd: How to Express Inherent Parallelism Efficiently Via Data-Parallel Typesstd::simd how to express inherent parallelism efficiently via data-parallel types Dr. Matthias Kretz GSI Helmholtz Center for Heavy Ion Research CppCon ’23 @mkretz@floss.social github.com/mattkretzMotivation ResearchMotivation std::simd Overview Example: Image Processing Programming Models Outlook Summary Data-Parallel Types One variable stores WT values. One operator signifies WT operations (element-wise). W for “width”; vectorizable type — all arithmetic types except bool or long double • simd_maskbehaves like bool (element-wise) In contrast to bool, there are many different mask types: • storage: bit-masks vs. element-sized 0 码力 | 160 页 | 8.82 MB | 6 月前3
Theorem Proving in Lean
Release 3.23.0. . . . . . . . . . . 3 2 Dependent Type Theory 5 2.1 Simple Type Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2 Types as Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.8 Dependent Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 and Proofs 23 3.1 Propositions as Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.2 Working with Propositions as Types . . . . . . . . . . . . . . . .0 码力 | 173 页 | 777.93 KB | 1 年前3
The Idris Tutorial Version 0.9.18. . . . . . . . . . 6 3 Types and Functions 7 3.1 Primitive Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.2 Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.4 Dependent Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.8 Useful Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.9 More Expressions0 码力 | 69 页 | 316.20 KB | 1 年前3
The Idris Tutorial Version 0.9.20.1. . . . . . . . . . 6 3 Types and Functions 7 3.1 Primitive Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.2 Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.4 Dependent Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.8 Useful Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.9 More Expressions0 码力 | 71 页 | 316.18 KB | 1 年前3
The Idris Tutorial Version 0.11Release 0.10.3 The Idris Community March 26, 2016 Contents 1 Introduction 3 2 Getting Started 5 3 Types and Functions 7 4 Interfaces 21 5 Modules and Namespaces 29 6 Packages 33 7 Testing Idris Packages conventional programming languages, there is a clear distinction between types and values. For example, in Haskell, the following are types, representing integers, characters, lists of characters, and lists of inhabitants of those types: • 42, ’a’, "Hello world!", [2,3,4,5,6] In a language with dependent types, however, the distinction is less clear. Dependent types allow types to “depend” on values — in0 码力 | 71 页 | 314.20 KB | 1 年前3
An Introduction to LeanBasic Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.2 Defining Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.3 Defining New Types . . . Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.3 Inhabited Types, Subtypes, and Option Types . . . . . . . . . . . . . . . . 32 3.4 Monads . . . . . . . . . . . . . . . . . . 36 4 Theorem Proving in Lean 38 4.1 Assertions in Dependent Type Theory . . . . . . . . . . . . . . . . . . . . . 38 4.2 Propositions as Types . . . . . . . . . . . . . . . . . . . . . . . . . . .0 码力 | 48 页 | 191.92 KB | 1 年前3
Agda User Manual v2.6.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 3.7 Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 3.10 Function Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 i 3.27 Record Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 990 码力 | 191 页 | 857.07 KB | 1 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100













