P0194R0- Static Reflection (Revision 4)

Total Page:16

File Type:pdf, Size:1020Kb

P0194R0- Static Reflection (Revision 4) P0194R0- Static reflection (revision 4) Document number: P0194R0 Date: 2016-02-08 Project: Programming Language C++ Audience: Reflection (SG7) / EWG Reply-to: Mat´uˇsChochl´ık([email protected]), Axel Naumann ([email protected]) Static reflection (revision 4) Mat´uˇsChochl´ık,Axel Naumann Abstract This paper is the follow-up to N3996, N4111 and N4451 and it is the fourth revision of the proposal to add static reflection to the C++ standard. It also introduces and briefly describes a partial, experimental implementation of this proposal. Contents 1. Introduction 3 1.1. Revision history . .3 2. Concept specification 4 2.1. StringConstant . .4 2.2. Meta-Object . .5 2.2.1. is metaobject .......................................5 2.2.2. Definition . .5 2.2.3. reflects same .......................................5 2.2.4. get source location ...................................6 2.3. Meta-ObjectSequence . .6 2.3.1. is sequence ........................................6 2.3.2. Definition . .6 2.3.3. get size ..........................................6 2.3.4. get element ........................................7 2.4. Meta-Named . .7 2.4.1. has name ..........................................7 2.4.2. Definition . .7 2.4.3. get name ..........................................8 2.5. Meta-Typed . .8 2.5.1. has type ..........................................8 2.5.2. Definition . .8 2.5.3. get type ..........................................9 2.6. Meta-Scoped . .9 2.6.1. has scope ..........................................9 2.6.2. Definition . .9 2.6.3. get scope ..........................................9 2.7. Meta-Scope . 10 2.7.1. is scope .......................................... 10 2.7.2. Definition . 10 1 P0194R0- Static reflection (revision 4) 2.8. Meta-Alias . 10 2.8.1. is alias .......................................... 10 2.8.2. Definition . 11 2.8.3. get aliased ........................................ 11 2.9. Meta-Linkable . 11 2.9.1. is linkable ........................................ 11 2.9.2. Definition . 12 2.9.3. is static .......................................... 12 2.10. Meta-ClassMember . 12 2.10.1. is class member ...................................... 12 2.10.2. Definition . 12 2.10.3. is public .......................................... 13 2.11. Meta-GlobalScope . 13 2.11.1. is global scope ...................................... 13 2.11.2. Definition . 13 2.12. Meta-Namespace . 13 2.12.1. is namespace ........................................ 13 2.12.2. Definition . 14 2.13. Meta-NamespaceAlias . 14 2.13.1. Definition . 14 2.14. Meta-Type . 14 2.14.1. is type ........................................... 14 2.14.2. Definition . 15 2.14.3. get reflected type .................................... 15 2.15. Meta-TypeAlias . 15 2.15.1. Definition . 15 2.16. Meta-Class . 15 2.16.1. is class .......................................... 15 2.16.2. Definition . 16 2.16.3. get data members ..................................... 16 2.16.4. get all data members ................................... 16 2.17. Meta-Enum . 17 2.17.1. is enum ........................................... 17 2.17.2. Definition . 17 2.18. Meta-EnumClass . 17 2.18.1. Definition . 17 2.19. Meta-Variable . 17 2.19.1. is variable ........................................ 18 2.19.2. Definition . 18 2.19.3. get pointer ........................................ 18 2.20. Meta-DataMember . 18 2.20.1. Definition . 19 3. Reflection operator 19 3.1. Redeclarations . 19 3.2. Required header . 20 3.3. Future extensions . 20 4. Experimental implementation 20 2 P0194R0- Static reflection (revision 4) 5. Impact on the standard 21 5.1. Alternative spelling of the operator . 21 6. Known issues 21 7. References 21 Appendix 23 Appendix A. Diagrams 23 Appendix B. Examples of usage 27 B.1. Scope reflection . 27 B.2. Namespace reflection . 28 B.3. Type reflection . 29 B.4. Typedef reflection . 30 B.5. Class alias reflection . 31 B.6. Class data members (1) . 32 B.7. Class data members (2) . 34 B.8. Class data members (3) . 36 B.9. Simple serialization to JSON . 37 1. Introduction In this paper we propose to add native support for compile-time reflection to C++ by the means of compiler generated types providing basic metadata describing various program declarations. This paper introduces a new reflection operator and the initial subset of metaobject concepts which we assume to be essential and which will provide a good starting point for future extensions. When finalized, these metaobjects, together with some additions to the standard library can later be used to implement other third-party libraries providing both compile-time and run-time, high-level reflection utilities. Please refer to the previous papers [1, 2, 3, 4] for the motivation for this proposal, including some examples, design considerations and rationale. In [5] a complex use-case for a static reflection is described. 1.1. Revision history • Revision 4 { Further refines the concepts from N4111; prefixes the names of the metaobject oper- ations with get , adds new operations, replaces the metaobject category tags with new metaobject traits. Introduces a nested namespace std::meta which contains most of the reflection-related addi- tions to the standard library. Rephrases definition of meta objects using Concepts Lite. Specifies the reflection operator name { reflexpr. Introduces an experimental implementation of the reflection operator in clang. Drops the context-dependent reflection from N4111 (will be re-introduced later). • Revision 3 (N4451 [3]) { Incorporates the feedback from the discussion about N4111 at the Urbana meeting, most notably reduces the set of metaobject concepts and refines their definitions, removes some of the additions to the standard library added in the previous revisions. Adds context-dependent reflection. 3 P0194R0- Static reflection (revision 4) • Revision 2 (N4111 [2]) { Refines the metaobject concepts and introduces a concrete implementation of their interface by the means of templates similar to the standard type traits. Describes some additions to the standard library (mostly meta-programming utilities), which simpilfy the use of the metaobjects. Answers some questions from the discussion about N3996 and expands the design rationale. • Revision 1 (N3996 [1]) { Describes the method of static reflection by the means of compiler-generated anonymous types. Introduces the first version of the metaobject concepts and some possiblities of their implementation. Also includes discussion about the motivation and the design rationale for the proposal. 2. Concept specification We propose that the basic metadata describing a program written in C++ should be made available through a set of anonymous types { metaobjects, defined by the compiler and through related template classes implementing the interface of the metaobjects. At the moment these types should describe only the following program declarations: namespaces1, types, typedefs, classes and their data members and enum types. In the future, the set of metaobjects should be extended to reflect class inheritance, free functions, class member functions, templates, template parameters, enumerated values, possibly the C++ specifiers, etc. The compiler should generate metadata for the program declarations in the currently processed translation unit, when requested by the invocation of the reflection operator. Members of ordered sets (sequences) of metaobjects, like scope members, parameters of a function, base classes, and so on, should be listed in the order of appearance in the processed translation unit. Since we want the metadata to be available at compile-time, different base-level declarations should be reflected by statically different metaobjects and thus by different types. For example a metaobject reflecting the global scope namespace should be a different type than a metaobject reflecting the std namespace2, a metaobject reflecting the int type should have a different type then a metaobject reflecting the double type, etc. This section describes a set of metaobject concepts and their requirements, traits for metaobject classifi- cation and operations providing the individual bits of meta-data. Unless stated otherwise, all proposed named templates described below should go into the std::meta nested namespace in order to contain reflection-related definitions and to help avoiding potential name conflicts. 2.1. StringConstant StringConstant represents a compile-time character string type. struct StringConstant { typedef const char value_type[N+1]; static constexpr const char value[N+1]; typedef StringConstant type; }; 1in a limited form 2this means that they should be distinguishable for example by the std::is same type trait 4 P0194R0- Static reflection (revision 4) This concept could be replaced by the basic string constant from N4236. 2.2. Meta-Object A Meta-Object is a stateless anonymous type generated by the compiler (at the request of the programmer via the invocation of the reflexpr operator), providing metadata reflecting a specific program declaration. Instances of metaobjects cannot be constructed, i.e. metaobject types do not have any constructors. If the need for instantiation of metaobject types arises in practical use, then this requirement can be added in the future. 2.2.1. is metaobject In order to distinguish between regular types and metaobjects generated by the compiler, the is metaobject trait should be added directly to the std namespace as one of the type traits. template<typenameT> struct is_metaobject: integral_constant<bool, ...>{}; template<typenameT> constexpr bool is_metaobject_v= is_metaobject<T>::value;
Recommended publications
  • Package 'Pinsplus'
    Package ‘PINSPlus’ August 6, 2020 Encoding UTF-8 Type Package Title Clustering Algorithm for Data Integration and Disease Subtyping Version 2.0.5 Date 2020-08-06 Author Hung Nguyen, Bang Tran, Duc Tran and Tin Nguyen Maintainer Hung Nguyen <[email protected]> Description Provides a robust approach for omics data integration and disease subtyping. PIN- SPlus is fast and supports the analysis of large datasets with hundreds of thousands of sam- ples and features. The software automatically determines the optimal number of clus- ters and then partitions the samples in a way such that the results are ro- bust against noise and data perturbation (Nguyen et.al. (2019) <DOI: 10.1093/bioinformat- ics/bty1049>, Nguyen et.al. (2017)<DOI: 10.1101/gr.215129.116>). License LGPL Depends R (>= 2.10) Imports foreach, entropy , doParallel, matrixStats, Rcpp, RcppParallel, FNN, cluster, irlba, mclust RoxygenNote 7.1.0 Suggests knitr, rmarkdown, survival, markdown LinkingTo Rcpp, RcppArmadillo, RcppParallel VignetteBuilder knitr NeedsCompilation yes Repository CRAN Date/Publication 2020-08-06 21:20:02 UTC R topics documented: PINSPlus-package . .2 AML2004 . .2 KIRC ............................................3 PerturbationClustering . .4 SubtypingOmicsData . .9 1 2 AML2004 Index 13 PINSPlus-package Perturbation Clustering for data INtegration and disease Subtyping Description This package implements clustering algorithms proposed by Nguyen et al. (2017, 2019). Pertur- bation Clustering for data INtegration and disease Subtyping (PINS) is an approach for integraton of data and classification of diseases into various subtypes. PINS+ provides algorithms support- ing both single data type clustering and multi-omics data type. PINSPlus is an improved version of PINS by allowing users to customize the based clustering algorithm and perturbation methods.
    [Show full text]
  • J1939 Data Mapping Explained
    J1939 Data Mapping Explained Part No. BW2031 Revision: 1.05 May 18, 2018 Pyramid Solutions, Inc. 30200 Telegraph Road, Suite 440 Bingham Farms, MI 48025 www.pyramidsolutions.com | P: 248.549.1200 | F: 248.549.1400 © Pyramid Solutions 1 PUB-BW4031-001 Table of Contents Overview ......................................................................................................................... 2 J1939 Message Terminology ............................................................................................ 2 J1939 PGN Message Definitions ....................................................................................... 3 PGN and Parameter Documentation Examples ........................................................................ 3 J1939 Specification Example ........................................................................................................ 3 Parameter Table Example ............................................................................................................ 5 Determining the BridgeWay Data Table Layout ................................................................ 6 Data Table Layout for Modbus RTU and Modbus TCP (Big Endian) ........................................... 6 Data Table Layout for EtherNet/IP (Little Endian) .................................................................... 7 Configuring the BridgeWay I/O Mapping ......................................................................... 8 Configuration Attributes ........................................................................................................
    [Show full text]
  • Advanced Software Engineering with C++ Templates Lecture 4: Separate Compilation and Templates III
    Advanced Software Engineering with C++ Templates Lecture 4: Separate Compilation and Templates III Thomas Gschwind <thgatzurichdotibmdotcom> Agenda . Separate Compilation • Introduction (C++ versus Java) • Variables • Routines (Functions & Operators) • Types (Structures, Classes) • Makefiles . Templates III • Design and Implementation (C++ versus Java versus C#) • “Dynamic” Static Algorithm Selection • Binders Th. Gschwind. Fortgeschrittene Programmierung in C++. 2 Separate Compilation . Why? • Having only one source file is unrealistic • Break the code up into its logical structure • Reduction of compile time - Only changed parts need to be recompiled . How? • Use multiple source files • Need to know what information about functions and variables “used” from other files Th. Gschwind. Fortgeschrittene Programmierung in C++. 3 Separate Compilation in Java . Each Java file is compiled into a class file . If a Java class invokes a method of another class, the compiler consults that other class file to • Determine whether the class provides the requested method • Determine whether a class file implements a given interface • etc. • Hence, the .class file contains the entire interface . That’s why in Java, the compiler needs the class path . Finally, all class files are loaded by the Java Virtual Machine (and “linked”) . Java source code can be relatively well reconstructed from .class file (see Java Decompiler: jd, jad) Th. Gschwind. Fortgeschrittene Programmierung in C++. 4 Some Java Trivia . Let us write Hello World in Java . In order to simplify the reconfiguration (e.g., translation) • Put all the constants into one Java file • Put the complex application code into another public class Const { public static final String msg="Hello World!"; } public class Cool { public static void main(String[] args) { System.out.println(Const.msg); } } Th.
    [Show full text]
  • P2356R0 Date 2021-04-09 Reply-To Matus Chochlik [email protected] Audience SG7 Overview Details
    Overview Details Implementing Factory builder on top of P2320 Document Number P2356R0 Date 2021-04-09 Reply-to Matus Chochlik [email protected] Audience SG7 Overview Details The goal (Semi-)automate the implementation of the Factory design pattern Overview Details What is meant by \Factory" here? • Class that constructs instances of a \Product" type. • From some external representation: • XML, • JSON, • YAML, • a GUI, • a scripting language, • a relational database, • ... Overview Details Factory builder • Framework combining the following parts • Meta-data • obtained from reflection. • Traits • units of code that handle various stages of construction, • specific to a particular external representation, • provided by user. Overview Details Factory builder • Used meta-data • type name strings, • list of meta-objects reflecting constructors, • list of meta-objects reflecting constructor parameters, • parameter type, • parameter name, • ... Overview Details Factory builder • Units handling the stages of construction • selecting the \best" constructor, • invoking the selected constructor, • conversion of parameter values from the external representation, • may recursively use factories for composite parameter types. Overview Details Used reflection features • ^T • [: :]1 • meta::name_of • meta::type_of • meta::members_of • meta::is_constructor • meta::is_default_constructor • meta::is_move_constructor • meta::is_copy_constructor • meta::parameters_of • size(Range) • range iterators 1to get back the reflected type Overview Details Reflection review • The good2 • How extensive and powerful the API is • The bad • Didn't find much3 • The ugly • Some of the syntax4 2great actually! 3some details follow 4but then this is a matter of personal preference Overview Details What is missing • The ability to easily unpack meta-objects from a range into a template, without un-reflecting them. • I used the following workaround + make_index_sequence: template <typename Iterator > consteval auto advance(Iterator it, size_t n) { while (n-- > 0) { ++ it; } return it; } • Details follow.
    [Show full text]
  • Lecture 2: Variables and Primitive Data Types
    Lecture 2: Variables and Primitive Data Types MIT-AITI Kenya 2005 1 In this lecture, you will learn… • What a variable is – Types of variables – Naming of variables – Variable assignment • What a primitive data type is • Other data types (ex. String) MIT-Africa Internet Technology Initiative 2 ©2005 What is a Variable? • In basic algebra, variables are symbols that can represent values in formulas. • For example the variable x in the formula f(x)=x2+2 can represent any number value. • Similarly, variables in computer program are symbols for arbitrary data. MIT-Africa Internet Technology Initiative 3 ©2005 A Variable Analogy • Think of variables as an empty box that you can put values in. • We can label the box with a name like “Box X” and re-use it many times. • Can perform tasks on the box without caring about what’s inside: – “Move Box X to Shelf A” – “Put item Z in box” – “Open Box X” – “Remove contents from Box X” MIT-Africa Internet Technology Initiative 4 ©2005 Variables Types in Java • Variables in Java have a type. • The type defines what kinds of values a variable is allowed to store. • Think of a variable’s type as the size or shape of the empty box. • The variable x in f(x)=x2+2 is implicitly a number. • If x is a symbol representing the word “Fish”, the formula doesn’t make sense. MIT-Africa Internet Technology Initiative 5 ©2005 Java Types • Integer Types: – int: Most numbers you’ll deal with. – long: Big integers; science, finance, computing. – short: Small integers.
    [Show full text]
  • Chapter 4 Variables and Data Types
    PROG0101 Fundamentals of Programming PROG0101 FUNDAMENTALS OF PROGRAMMING Chapter 4 Variables and Data Types 1 PROG0101 Fundamentals of Programming Variables and Data Types Topics • Variables • Constants • Data types • Declaration 2 PROG0101 Fundamentals of Programming Variables and Data Types Variables • A symbol or name that stands for a value. • A variable is a value that can change. • Variables provide temporary storage for information that will be needed during the lifespan of the computer program (or application). 3 PROG0101 Fundamentals of Programming Variables and Data Types Variables Example: z = x + y • This is an example of programming expression. • x, y and z are variables. • Variables can represent numeric values, characters, character strings, or memory addresses. 4 PROG0101 Fundamentals of Programming Variables and Data Types Variables • Variables store everything in your program. • The purpose of any useful program is to modify variables. • In a program every, variable has: – Name (Identifier) – Data Type – Size – Value 5 PROG0101 Fundamentals of Programming Variables and Data Types Types of Variable • There are two types of variables: – Local variable – Global variable 6 PROG0101 Fundamentals of Programming Variables and Data Types Types of Variable • Local variables are those that are in scope within a specific part of the program (function, procedure, method, or subroutine, depending on the programming language employed). • Global variables are those that are in scope for the duration of the programs execution. They can be accessed by any part of the program, and are read- write for all statements that access them. 7 PROG0101 Fundamentals of Programming Variables and Data Types Types of Variable MAIN PROGRAM Subroutine Global Variables Local Variable 8 PROG0101 Fundamentals of Programming Variables and Data Types Rules in Naming a Variable • There a certain rules in naming variables (identifier).
    [Show full text]
  • Metaclasses: Generative C++
    Metaclasses: Generative C++ Document Number: P0707 R3 Date: 2018-02-11 Reply-to: Herb Sutter ([email protected]) Audience: SG7, EWG Contents 1 Overview .............................................................................................................................................................2 2 Language: Metaclasses .......................................................................................................................................7 3 Library: Example metaclasses .......................................................................................................................... 18 4 Applying metaclasses: Qt moc and C++/WinRT .............................................................................................. 35 5 Alternatives for sourcedefinition transform syntax .................................................................................... 41 6 Alternatives for applying the transform .......................................................................................................... 43 7 FAQs ................................................................................................................................................................. 46 8 Revision history ............................................................................................................................................... 51 Major changes in R3: Switched to function-style declaration syntax per SG7 direction in Albuquerque (old: $class M new: constexpr void M(meta::type target,
    [Show full text]
  • The Art of the Javascript Metaobject Protocol
    The Art Of The Javascript Metaobject Protocol enough?Humphrey Ephraim never recalculate remains giddying: any precentorship she expostulated exasperated her nuggars west, is brocade Gus consultative too around-the-clock? and unbloody If dog-cheapsycophantical and or secularly, norman Partha how slicked usually is volatilisingPenrod? his nomadism distresses acceptedly or interlacing Card, and send an email to a recipient with. On Auslegung auf are Schallabstrahlung download the Aerodynamik von modernen Flugtriebwerken. This poll i send a naming convention, the art of metaobject protocol for the corresponding to. What might happen, for support, if you should load monkeypatched code in one ruby thread? What Hooks does Ruby have for Metaprogramming? Sass, less, stylus, aura, etc. If it finds one, it calls that method and passes itself as value object. What bin this optimization achieve? JRuby and the psd. Towards a new model of abstraction in software engineering. Buy Online in Aruba at aruba. The current run step approach is: Checkpoint. Python object room to provide usable string representations of hydrogen, one used for debugging and logging, another for presentation to end users. Method handles can we be used to implement polymorphic inline caches. Mop is not the metaobject? Rails is a nicely designed web framework. Get two FREE Books of character Moment sampler! The download the number IS still thought. This proxy therefore behaves equivalently to the card dispatch function, and no methods will be called on the proxy dispatcher before but real dispatcher is available. While desertcart makes reasonable efforts to children show products available in your kid, some items may be cancelled if funny are prohibited for import in Aruba.
    [Show full text]
  • Julia's Efficient Algorithm for Subtyping Unions and Covariant
    Julia’s Efficient Algorithm for Subtyping Unions and Covariant Tuples Benjamin Chung Northeastern University, Boston, MA, USA [email protected] Francesco Zappa Nardelli Inria of Paris, Paris, France [email protected] Jan Vitek Northeastern University, Boston, MA, USA Czech Technical University in Prague, Czech Republic [email protected] Abstract The Julia programming language supports multiple dispatch and provides a rich type annotation language to specify method applicability. When multiple methods are applicable for a given call, Julia relies on subtyping between method signatures to pick the correct method to invoke. Julia’s subtyping algorithm is surprisingly complex, and determining whether it is correct remains an open question. In this paper, we focus on one piece of this problem: the interaction between union types and covariant tuples. Previous work normalized unions inside tuples to disjunctive normal form. However, this strategy has two drawbacks: complex type signatures induce space explosion, and interference between normalization and other features of Julia’s type system. In this paper, we describe the algorithm that Julia uses to compute subtyping between tuples and unions – an algorithm that is immune to space explosion and plays well with other features of the language. We prove this algorithm correct and complete against a semantic-subtyping denotational model in Coq. 2012 ACM Subject Classification Theory of computation → Type theory Keywords and phrases Type systems, Subtyping, Union types Digital Object Identifier 10.4230/LIPIcs.ECOOP.2019.24 Category Pearl Supplement Material ECOOP 2019 Artifact Evaluation approved artifact available at https://dx.doi.org/10.4230/DARTS.5.2.8 Acknowledgements The authors thank Jiahao Chen for starting us down the path of understanding Julia, and Jeff Bezanson for coming up with Julia’s subtyping algorithm.
    [Show full text]
  • Generic Programming
    Generic Programming July 21, 1998 A Dagstuhl Seminar on the topic of Generic Programming was held April 27– May 1, 1998, with forty seven participants from ten countries. During the meeting there were thirty seven lectures, a panel session, and several problem sessions. The outcomes of the meeting include • A collection of abstracts of the lectures, made publicly available via this booklet and a web site at http://www-ca.informatik.uni-tuebingen.de/dagstuhl/gpdag.html. • Plans for a proceedings volume of papers submitted after the seminar that present (possibly extended) discussions of the topics covered in the lectures, problem sessions, and the panel session. • A list of generic programming projects and open problems, which will be maintained publicly on the World Wide Web at http://www-ca.informatik.uni-tuebingen.de/people/musser/gp/pop/index.html http://www.cs.rpi.edu/˜musser/gp/pop/index.html. 1 Contents 1 Motivation 3 2 Standards Panel 4 3 Lectures 4 3.1 Foundations and Methodology Comparisons ........ 4 Fundamentals of Generic Programming.................. 4 Jim Dehnert and Alex Stepanov Automatic Program Specialization by Partial Evaluation........ 4 Robert Gl¨uck Evaluating Generic Programming in Practice............... 6 Mehdi Jazayeri Polytypic Programming........................... 6 Johan Jeuring Recasting Algorithms As Objects: AnAlternativetoIterators . 7 Murali Sitaraman Using Genericity to Improve OO Designs................. 8 Karsten Weihe Inheritance, Genericity, and Class Hierarchies.............. 8 Wolf Zimmermann 3.2 Programming Methodology ................... 9 Hierarchical Iterators and Algorithms................... 9 Matt Austern Generic Programming in C++: Matrix Case Study........... 9 Krzysztof Czarnecki Generative Programming: Beyond Generic Programming........ 10 Ulrich Eisenecker Generic Programming Using Adaptive and Aspect-Oriented Programming .
    [Show full text]
  • Does Personality Matter? Temperament and Character Dimensions in Panic Subtypes
    325 Arch Neuropsychiatry 2018;55:325−329 RESEARCH ARTICLE https://doi.org/10.5152/npa.2017.20576 Does Personality Matter? Temperament and Character Dimensions in Panic Subtypes Antonio BRUNO1 , Maria Rosaria Anna MUSCATELLO1 , Gianluca PANDOLFO1 , Giulia LA CIURA1 , Diego QUATTRONE2 , Giuseppe SCIMECA1 , Carmela MENTO1 , Rocco A. ZOCCALI1 1Department of Psychiatry, University of Messina, Messina, Italy 2MRC Social, Genetic & Developmental Psychiatry Centre, Institute of Psychiatry, Psychology & Neuroscience, London, United Kingdom ABSTRACT Introduction: Symptomatic heterogeneity in the clinical presentation of and 12.78% of the total variance. Correlations analyses showed that Panic Disorder (PD) has lead to several attempts to identify PD subtypes; only “Somato-dissociative” factor was significantly correlated with however, no studies investigated the association between temperament T.C.I. “Self-directedness” (p<0.0001) and “Cooperativeness” (p=0.009) and character dimensions and PD subtypes. The study was aimed to variables. Results from the regression analysis indicate that the predictor verify whether personality traits were differentially related to distinct models account for 33.3% and 24.7% of the total variance respectively symptom dimensions. in “Somatic-dissociative” (p<0.0001) and “Cardiologic” (p=0.007) factors, while they do not show statistically significant effects on “Respiratory” Methods: Seventy-four patients with PD were assessed by the factor (p=0.222). After performing stepwise regression analysis, “Self- Mini-International Neuropsychiatric Interview (M.I.N.I.), and the directedness” resulted the unique predictor of “Somato-dissociative” Temperament and Character Inventory (T.C.I.). Thirteen panic symptoms factor (R²=0.186; β=-0.432; t=-4.061; p<0.0001). from the M.I.N.I.
    [Show full text]
  • RICH: Automatically Protecting Against Integer-Based Vulnerabilities
    RICH: Automatically Protecting Against Integer-Based Vulnerabilities David Brumley, Tzi-cker Chiueh, Robert Johnson [email protected], [email protected], [email protected] Huijia Lin, Dawn Song [email protected], [email protected] Abstract against integer-based attacks. Integer bugs appear because programmers do not antici- We present the design and implementation of RICH pate the semantics of C operations. The C99 standard [16] (Run-time Integer CHecking), a tool for efficiently detecting defines about a dozen rules governinghow integer types can integer-based attacks against C programs at run time. C be cast or promoted. The standard allows several common integer bugs, a popular avenue of attack and frequent pro- cases, such as many types of down-casting, to be compiler- gramming error [1–15], occur when a variable value goes implementation specific. In addition, the written rules are out of the range of the machine word used to materialize it, not accompanied by an unambiguous set of formal rules, e.g. when assigning a large 32-bit int to a 16-bit short. making it difficult for a programmer to verify that he un- We show that safe and unsafe integer operations in C can derstands C99 correctly. Integer bugs are not exclusive to be captured by well-known sub-typing theory. The RICH C. Similar languages such as C++, and even type-safe lan- compiler extension compiles C programs to object code that guages such as Java and OCaml, do not raise exceptions on monitors its own execution to detect integer-based attacks.
    [Show full text]