Showing posts with label Concepts. Show all posts
Showing posts with label Concepts. Show all posts

Monday, March 9, 2009

Mapping ANSA Concepts to C++

0 comments
Download pdf-----Here-----Mapping ANSA Concepts to C++
Mapping ANSA Concepts to C++


Abstract
This document discusses the mapping of ANSA concepts to C++. The ANSA concepts to be
mapped are those specified by the ANSA computational model as described in [ANSASl].


Audience and Purpose
Overview
Current Mappings
Overview of the ANSA Computational Model
Principles
Concepts
Structure of the Model
Mapping Components
Mapping to C++
Terminology and Concepts
Object:
Class:
Global Function:
Member Function:
Inheritance:
Separation
Concurrency
Heterogeneity
Federation
Evolution
Scaling
Mapping ACM Concepts to C++
nputational) Object
Interface
Operation
Signature
Activity
Termination
Interface Type
Invocation
Server
Client
Interaction Model
Construction Model
Object Constructor
Interface Constructor
Invoker
Termination Namer and Termination Case Selector
Fixed and Variable Binder
Assigner
Interface Name
Composer

Functional Concepts in C++

0 comments
Download pdf----Here-----Functional Concepts in C++
Functional Concepts in C++


Abstract
We describe a parser-translator programthat translates typed l-terms into C++ classes
so as to integrate functional concepts. We prove the correctness of the translation of
l-terms into C++ with respect to a denotational semantics using Kripke-style logical
relations. We introduce a general technique for introducing lazy evaluation into
C++, and illustrate it by carrying out in C++ the example of computing the Fibonacci
numbers efficiently using infinite streams and lazy evaluation. Finally, we show how
merge higher-order l-terms with imperative C++ code.


INTRODUCTION
TRANSLATION OF TYPED l-TERMS INTO C++
PROOF OF CORRECTNESS
LAZY EVALUATION IN C++
COMBINING FUNCTIONAL AND IMPERATIVE PROGRAMMING

Concepts Linguistic Support for Generic Programming in C++

0 comments
Download pdf----Here----Concepts Linguistic Support for Generic Programming in C++
Concepts Linguistic Support for Generic Programming in C++


Introduction
Generic Programming
Lifting and Abstraction
Algorithm Specialization
Concepts
Language Support for Concepts
Constraining Templates with Concepts
Same-type Constraints
Negative Constraints
Constraint Propagation
Concept Definitions
Refinement
Associated Types
Nested Requirements
Function Signatures
Overloading and Specialization
Concept Maps
Implicit and Explicit Concepts
Refinements and Concept Maps
ConceptGCC
Compilation Model
Compilation of Constrained Templates
Concepts and Concept Maps
Type-checking Templates
Same-type Constraints
Use of Class Templates and Specializations
Evaluation
Defining STL Concepts
STL Algorithm Requirements
Backward Compatibility

Specifying C++ Concepts

0 comments
Download here---pdf----Specifying C++ Concepts

Specifying C++ Concepts


Abstract
C++ templates are key to the design of current successful
mainstream libraries and systems. They are the basis of programming
techniques in diverse areas ranging from conventional
general-purpose programming to software for safetycritical
embedded systems. Current work on improving templates
focuses on the notion of concepts (a type system for
templates), which promises significantly improved error diagnostics
and increased expressive power such as conceptbased
overloading and function template partial specialization.
This paper presents C++ templates with an emphasis on
problems related to separate compilation. We consider the
problem of how to express concepts in a precise way that
is simple enough to be usable by ordinary programmers. In
doing so, we expose a few weakness of the current specification
of the C++ standard library and suggest a far more
precise and complete specification. We also present a systematic
way of translating our proposed concept definitions,
based on use-patterns rather than function signatures, into
constraint sets that can serve as convenient basis for concept
checking in a compiler.


Introduction and overview
The problem
Template basics
Parameterization
Instantiations and checking
Performance
A more realistic example
An iterator concept for fill
Iterator concepts
A concept system
Concept definition
Explicit check request
Implicit check request
From concepts to constraints sets
Concept checking
Associated types and values
fill and associates revisited
The Assignable and Movable puzzle
Unary iterator predicates
Assignable
Standard iterator concepts
Siek’s proposal
Type classes
Qualified types