comp.lang.ada
 help / color / mirror / Atom feed
* Ann: HAC v.0.0996
@ 2022-01-22  9:41 Gautier write-only address
  2022-01-23  0:51 ` Leo Brewin
  0 siblings, 1 reply; 5+ messages in thread
From: Gautier write-only address @ 2022-01-22  9:41 UTC (permalink / raw)


HAC (HAC Ada Compiler) is a small, quick, open-source Ada compiler,
covering a subset of the Ada language.
HAC is itself fully programmed in Ada.

Web site: http://hacadacompiler.sf.net/

Source repositories:
#1 svn: https://sf.net/p/hacadacompiler/code/HEAD/tree/trunk/
#2 git: https://github.com/zertovitch/hac

* Main improvements since v.0.095:

  - range checks on discrete subtype assignment (:=) and
      conversion
  - short-circuit logical operators: "and then", "or else"
  - for S = Scalar subtype: S'First, S'Last, S'Succ, S'Pred, S'Pos,
      S'Val, S'Image, S'Value, S'Range attributes
  - for A = array object or array subtype: A'First [(N)],
      A'Last [(N)], A'Range [(N)], A'Length [(N)] attributes
  - "&", "<", ">", "=", "/=" operators defined for the String type
      (additionally to HAL.VString type)
  - CASE choices admit ranges
  - forward declarations for subprograms

Enjoy!

Gautier

PS: for Windows there is an integrated editor that embeds HAC:
LEA: http://l-e-a.sf.net

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ann: HAC v.0.0996
  2022-01-22  9:41 Ann: HAC v.0.0996 Gautier write-only address
@ 2022-01-23  0:51 ` Leo Brewin
  2022-01-23 12:09   ` Gautier write-only address
  0 siblings, 1 reply; 5+ messages in thread
From: Leo Brewin @ 2022-01-23  0:51 UTC (permalink / raw)


Thanks Gautier for the latest updates to HAC.

I just ran the gallery test on my macOS and I got a constraint error 
while running attributes.adb. Here is the output:

Attributes      Standard subtypes are indicated with '*'
==========           HAL subtypes are indicated with '#'

S'First and S'Last attributes for scalar subtype S:

   * Integer's bounds    : -9223372036854775808 .. 9223372036854775807
   * Natural's bounds    : 0 .. 9223372036854775807
   * Positive's bounds   : 1 .. 9223372036854775807
     Some_Range's bounds : -123 .. 456
   * Boolean's bounds    : False .. True
     A_to_Z's bounds     : A .. Z

Execution of ../hac terminated by unhandled exception
raised CONSTRAINT_ERROR : erroneous memory access
Load address: 0x10f8a0000
Call stack traceback locations:
0x10f9d02a7 0x7ff80fc2ae2b 0x10f9bcee4

If I comment out line number 47 (which uses Real'First and Real'Last) 
then the code runs without error.

For gnatmake I used the AdaCore 2019 version,

GNATMAKE Community 2019 (20190517-83)
Copyright (C) 1995-2019, Free Software Foundation, Inc.

and I'm running this on macOS 12.1

Cheers,
Leo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ann: HAC v.0.0996
  2022-01-23  0:51 ` Leo Brewin
@ 2022-01-23 12:09   ` Gautier write-only address
  2022-01-23 12:58     ` Gautier write-only address
  0 siblings, 1 reply; 5+ messages in thread
From: Gautier write-only address @ 2022-01-23 12:09 UTC (permalink / raw)


Hi Leo,
Thanks for the feedback. I ran into issues using an old version of GNAT (not the same year, for another machine, ...) so hopefully my fix solves your issue(s) as well.
The fix is commit d523657 on git/github, 588 on svn/sourceforge.
One issue involves the HAC_Image function (a "nice image" for floating-point numbers) and is not yet resolved (might be in that old GNAT's run-time library), but the attributes.adb examples turns around that one.
Cheers,
Gautier

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ann: HAC v.0.0996
  2022-01-23 12:09   ` Gautier write-only address
@ 2022-01-23 12:58     ` Gautier write-only address
  2022-01-23 23:13       ` Leo Brewin
  0 siblings, 1 reply; 5+ messages in thread
From: Gautier write-only address @ 2022-01-23 12:58 UTC (permalink / raw)


> One issue involves the HAC_Image function (a "nice image" for floating-point numbers) and is not yet resolved (might be in that old GNAT's run-time library), but the attributes.adb examples turns around that one. 

Issue was in System.Img_Real, procedure Set_Image_Real, as in GNAT GPL 2017. Obviously it has been fixed since then.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ann: HAC v.0.0996
  2022-01-23 12:58     ` Gautier write-only address
@ 2022-01-23 23:13       ` Leo Brewin
  0 siblings, 0 replies; 5+ messages in thread
From: Leo Brewin @ 2022-01-23 23:13 UTC (permalink / raw)


Thanks Gautier, it all works fine now.
Keep up the great work :)
Cheers, Leo

On 23/1/2022 11:58 pm, Gautier write-only address wrote:
>> One issue involves the HAC_Image function (a "nice image" for floating-point numbers) and is not yet resolved (might be in that old GNAT's run-time library), but the attributes.adb examples turns around that one.
> 
> Issue was in System.Img_Real, procedure Set_Image_Real, as in GNAT GPL 2017. Obviously it has been fixed since then.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-01-23 23:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-22  9:41 Ann: HAC v.0.0996 Gautier write-only address
2022-01-23  0:51 ` Leo Brewin
2022-01-23 12:09   ` Gautier write-only address
2022-01-23 12:58     ` Gautier write-only address
2022-01-23 23:13       ` Leo Brewin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox