From: Simon Wright <simon@pushface.org>
Subject: Re: Where to find Ravenscar compatible ADT Containers (List, Vector, stack)
Date: Tue, 28 Aug 2018 16:03:47 +0100
Date: 2018-08-28T16:03:47+01:00 [thread overview]
Message-ID: <lyefeilei4.fsf@pushface.org> (raw)
In-Reply-To: eec01618-ee08-4f7e-be3d-cb16ef2beb4b@googlegroups.com
Daniel Norber <danielnorberto@gmail.com> writes:
> The standard ADA.Containers library is not prepared for Ravenscar use.
> Even bounded versions, like Bounded_double_Linked_List have several
> violations of Ravenscar, like Implicit_Heap_Allocation when i try to
> instantiate it, and bind it.
Which compiler are you using? I ask because I encountered this with GCC
4.9.1 & GNAT GPL 2014
A workround (which allowed the package which revealed the problem to be
built) was to explicitly state the restriction in the body:
pragma Restrictions (No_Implicit_Heap_Allocations);
with Ada.Containers.Bounded_Vectors;
package body Containing is
subtype Index is Natural range 0 .. 19;
subtype Line is String (1 .. 20);
package Line_Vectors
is new Ada.Containers.Bounded_Vectors (Index_Type => Index,
Element_Type => Line);
making it a compiler error. Of course, that's not going to help with the
unbounded Containers.
> I've Found ADA95 booch ADT, but is not ready for the new ADA2012
> aspects that let you write something like this:
>
> for E of List loop
> E:= E + 1;
> --E is a reference. That increases performance with big structures.
> end loop;
Not sure that would actually be a performance improvement.
> Someone know a modern ADA2012 third party ADT that compliances
> Ravenscar?. Seems like ADA forgot Ravenscar users when they released
> 2005 containers.
The list of restriction violations for Bounded_Doubly_Linked_Lists (from
the ALI) for CE 2018 is
RV NO_ACCESS_SUBPROGRAMS
RV NO_DIRECT_BOOLEAN_OPERATORS
RV NO_DISPATCH
RV NO_EXCEPTIONS
RV NO_FINALIZATION
RV NO_NESTED_FINALIZATION
RV NO_RECURSION
RV NO_STANDARD_STORAGE_POOLS
RV NO_STREAMS
RV NO_UNCHECKED_ACCESS
RV NO_DEFAULT_INITIALIZATION
RV NO_DYNAMIC_SIZED_OBJECTS
RV NO_IMPLEMENTATION_ATTRIBUTES
RV NO_IMPLEMENTATION_PRAGMAS
RV NO_IMPLICIT_ALIASING
RV SPARK_05
I don't think any of those are non-Ravenscar?
next prev parent reply other threads:[~2018-08-28 15:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-28 12:06 Where to find Ravenscar compatible ADT Containers (List, Vector, stack) Daniel Norber
2018-08-28 14:48 ` Shark8
2018-09-03 9:39 ` Daniel Norber
2018-08-28 15:03 ` Simon Wright [this message]
2018-09-03 9:42 ` Daniel Norber
2018-08-29 0:24 ` Randy Brukardt
2018-08-30 0:21 ` Jere
2018-08-30 7:13 ` Jeffrey R. Carter
2018-08-30 12:14 ` AdaMagica
2018-08-30 23:40 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox