Gems in categories Ada / Ada 2005 / Ada 2012, Ada Training and Ada

  • Gem #148 : Su(per)btypes in Ada 2012 - Part 3

    In the previous two Gems of this series, we saw how the aspects Static_Predicate and Dynamic_Predicate can be used to state properties of objects that should be respected at all times. This Gem is concerned with the Type_Invariant aspect.

    Continue Reading in Ada Answers »

    Yannick Moy
    AdaCore
  • Gem #147 : Su(per)btypes in Ada 2012 - Part 2

    In the previous Gem in this series, we saw how the aspect Static_Predicate can be used to state properties of scalar objects that should be respected at all times. This Gem is concerned with the Dynamic_Predicate aspect.

    Continue Reading in Ada Answers »

    Yannick Moy
    AdaCore
  • Gem #146 : Su(per)btypes in Ada 2012 - Part 1

    The new revision of Ada is full of features for specifying properties of types. In this series of three Gems, we describe three aspects that can be used to state invariant properties of types. This first Gem is concerned with the Static_Predicate aspect.

    Continue Reading in Ada Answers »

    Yannick Moy
    AdaCore
  • Gem #123: Implicit Dereferencing in Ada 2012

    This Gem discusses the use of features added in Ada 2012 that simplify accessing and updating the elements of containers.

    Continue Reading in Ada Answers »

    Christoph Grein
  • Gem #121 Breakpoint Commands—Part 1

    This gem will give a simple use case of breakpoint commands in GDB to check dynamically some properties of the debugged program. Continue Reading in Ada Answers »

    Jerome Guitton
    AdaCore
  • Gem #120 : GDB Scripting—Part 2

    In the previous Gem we saw how GDB provides scripting capabilities through its macro-coding language, which allows customization of the debugger using the .gdbinit file. In this Gem, we explore more advanced features of GDB scripting. Continue Reading in Ada Answers »

    Jean-Charles Delay
    AdaCore
  • Gem #119 : GDB Scripting—Part 1

    GDB, the GNU Project Debugger, is a powerful tool. General use includes basic CLI commands -- break, run, print, etc. -- but there is so much more you can do with it. One of those capabilities is scripting. Just as you have a .rc for your shell configuration, you can also add a .gdbinit for the debugger. This Gem describes some of the available features of GDB scripting and general customization with .gdbinit.

    Continue Reading in Ada Answers »

    Jean-Charles Delay
    AdaCore
  • Gem #118: File-System Portability Issues and GNATCOLL.VFS

    This Gem discusses some portability issues related to file systems. In particular, it addresses matters of file names and dealing with case-sensitive vs. case-insensitive file systems, character sets, and symbolic links, and also gives an introduction to the utility package GNATCOLL.VFS.

    Continue Reading in Ada Answers »

    Emmanuel Briot
    AdaCore
  • Gem #117: Design Pattern: Overridable Class Attributes in Ada 2012

    In this Gem we consider how to realize the capability of “class attributes” (such as supported in Python) using Ada. Continue Reading in Ada Answers »

    Emmanuel Briot
    AdaCore
  • Gem #116: Ada and C++ Exceptions

    One of the main issues raised by interfacing Ada and C++ is propagation of exceptions from one environment to the other. In this Gem, we’ll demonstrate how the new exception mechanism implemented in GNAT allows catching Ada exceptions in C++, and vice versa. Note that the following code will work starting with GNAT Pro 7. Continue Reading in Ada Answers »

    Quentin Ochem
    AdaCore
  • Gem #87: The Distributed Systems Annex, Part 3—- Mailboxes

    Ada Gem #87 -- This is the third in a series of gems introducing the facilities defined by the optional annex for Distributed systems (Annex E) of the Ada Reference Manual. In the previous two installments, we introduced the Distributed Systems Annex (DSA). We showed how a client/server architecture can be implemented, and we introduced distributed objects. The present gem shows how asynchronous message passing can be implemented on top of these facilities. Continue Reading in Ada Answers »

    Thomas Quinot
    AdaCore
  • Gem #86: Ada Quiz 1 - Basic Types

    This Gem is one in a series of occasional Ada quizzes exploring various features of the language, extracted from the AdaCore training courses. Continue Reading in Ada Answers »

    Quentin Ochem
    AdaCore
  • Gem #85:The Distributed Systems Annex 2—- Distributed Objects

    Ada Gem #85: This is the second in a series of Gems introducing the facilities defined by the optional annex for Distributed Systems (Annex E) of the Ada Reference Manual. In the first installment, we showed how a simple client/server architecture can be implemented easily with the Distributed Systems Annex (DSA). We now introduce distributed objects, which allow dynamic relationships between components of a distributed application. Continue Reading in Ada Answers »

    Thomas Quinot
    AdaCore
  • Gem #84: The Distributed Systems Annex 1 - Simple client/server

    Ada Gem #84 — This is the first in a series of Gems introducing the facilities defined by the optional annex for distributed systems (Annex E) in the Ada Reference Manual. In this introduction, we show how a simple client/server architecture can be implemented easily with the Distributed Systems Annex (DSA). Continue Reading in Ada Answers »

    Thomas Quinot
    AdaCore
  • Gem #83: Type-Based Security 2: Validating the Input

    Ada Gem #83 — Ada's strong type system makes it quite convenient to check at compilation time that certain security properties are verified, for example that a tainted value is not used where a trusted one is expected, or that data is properly validated before being used in a sensitive context (think of SQL injection attacks).
    In the first Gem of this series of two, we discussed how to handle tainted data. In this Gem, we explain how to validate the input given to an SQL command. (For an amusing comic-strip description of what SQL injection is, see: http://xkcd.com/327/.) Continue Reading in Ada Answers »

    Yannick Moy
    AdaCore
  • Gem #82: Type-Based Security 1: Handling Tainted Data

    Ada Gem #82 — The strong type system in Ada makes it quite convenient to check at compile time that certain security properties are verified, for example that a tainted value is not used where a trusted one is expected, or that data is properly validated before being used in a sensitive context (think of SQL injection attacks).
    In this series of two Gems, we present short examples of how this might be done. The first Gem discusses how to handle tainted data. Continue Reading in Ada Answers »

    Yannick Moy
    AdaCore
  • Gem #64: Handling Multiple-Unit Source Files

    Ada Gem #64 — This Gem describes how to compile applications in GNAT when source files contain multiple units. The preferred approach is to split source files, and here we describes how this can be done, although GNAT also provides a workaround that allows you to keep your existing files. Continue Reading in Ada Answers »

    Emmanuel Briot
    AdaCore
  • Gem #63: The Effect of Pragma Suppress

    Ada Gem #63 — The features of Ada have generally been designed to prevent violating the properties of data types, enforced either by compile-time rules or, in the case of dynamic properties, by using run-time checks. Ada allows run-time checks to be suppressed, but not with the intent of allowing programmers to subvert the type system. Continue Reading in Ada Answers »

    Gary Dismukes
    AdaCore
  • Gem #62: C++ constructors and Ada 2005

    Ada Gem #62 — In the previous Gem, we explored how to interface and make simple use of C++ constructors on the Ada side.

    In this Gem, we detail more advanced constructs related to Ada 2005 and C++ constructors.

    Continue Reading in Ada Answers »

    Javier Miranda
    AdaCore
    Arnaud Charlet
    AdaCore
  • Gem #61: Interfacing with C++ constructors

    Ada Gem #61 — In the previous Gem about generating bindings from C++ headers, we mentioned, without going into details, how to interface with C++ constructors in Ada using the CPP_Constructor pragma.

    In this Gem we present some common uses of C++ constructors in mixed-language programs in GNAT, and in the next Gem, we will show the use of some powerful Ada 2005 features in conjunction with C++ constructors.

    Continue Reading in Ada Answers »

    Javier Miranda
    AdaCore
    Arnaud Charlet
    AdaCore
   1  2  3     Next »