Request for GSoC project Typed/optimized arithmetic with unit

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Request for GSoC project Typed/optimized arithmetic with unit

SANAN ANSARI
Hi , I'm Sanan Ansari. I am pursing my B.E in computer Engineering from Mumbai university India.I just read the project idea of Typed/optimized arithmetic with unit. I have knowledge about Java.I would love to work on the project. Please .If you can give more documentation about project it will help me.

By the way this my first GSoC and I’m new to open source , real world project.

Hope you will help me as I’m a beginner.

Sent from Mail for Windows 10

Reply | Threaded
Open this post in threaded view
|

Re: Request for GSoC project Typed/optimized arithmetic with unit

Per Bothner
On 03/03/2018 09:35 AM, SANAN ANSARI wrote:
> Hi , I'm Sanan Ansari. I am pursing my B.E in computer Engineering from Mumbai university India.I just read the project idea of Typed/optimized arithmetic with unit. I have knowledge about Java.I would love to work on the project. Please .If you can give more documentation about project it will help me.
>
> By the way this my first GSoC and I’m new to open source , real world project.
>
> Hope you will help me as I’m a beginner.

Welcome!  The work needed to implement "Types for units" is moderate, but
it does require going fairly deep into low-level parts of the Kawa compiler.

Most of the work for "Types for units" will be in the Java language, but
it won't make sense without at least basic familiarity with the Kawa dialect of Scheme.
Plus test-cases and examples would be written in Scheme.  So start by downloading,
building, and using Kawa.  Write scripts and programs in it.  Perhaps focus in
on some Kawa feature that seems interesting/fun and go a bit deeper: For example
Kawa as a web server - or "Composable pictures" - or using it in place of a shell script.

Also look at the Kawa number hierarchy, especially the Quantities page:
https://www.gnu.org/software/kawa/Quantities.html
This doesn't go into depth, but should point in the right direction.
Also look at how Quantities are implemented - look in gnu/math in the source code.

As a model of what we want to do, look at how Kawa implements the unsigned types
ulong/uin/ushort/ubyte. Look at the dis-assembled bytecode (using either
the class gnu.byteode.dump or the standard javap).  Understand how ''ulong'
gets compiled to a plain long (when the types are known) vs how it is represented
as a gnu.math.ULog (when we don't know the type at compile-time).

In the same way that a 'ulong' is either a long or a gnu.math.ULong,
we want the type quantity[cm^2] to be either a double or a gnu.math.DQuantity.
Part of the goal is compile-time type-checking; part of the goal is to generate
efficient code, using just double arithmetic when possible.  In the latter case,
all of the unit checking and combing would be done at compile-time.

All of this stuff is in the Kawa manual at https://www.gnu.org/software/kawa/
--
        --Per Bothner
[hidden email]   http://per.bothner.com/
Reply | Threaded
Open this post in threaded view
|

Re: Request for GSoC project Typed/optimized arithmetic with unit

SANAN ANSARI
Thanks, I'll take a look.

On 4 Mar 2018 12:46 p.m., "Per Bothner" <[hidden email]> wrote:

> On 03/03/2018 09:35 AM, SANAN ANSARI wrote:
>
>> Hi , I'm Sanan Ansari. I am pursing my B.E in computer Engineering from
>> Mumbai university India.I just read the project idea of Typed/optimized
>> arithmetic with unit. I have knowledge about Java.I would love to work on
>> the project. Please .If you can give more documentation about project it
>> will help me.
>>
>> By the way this my first GSoC and I’m new to open source , real world
>> project.
>>
>> Hope you will help me as I’m a beginner.
>>
>
> Welcome!  The work needed to implement "Types for units" is moderate, but
> it does require going fairly deep into low-level parts of the Kawa
> compiler.
>
> Most of the work for "Types for units" will be in the Java language, but
> it won't make sense without at least basic familiarity with the Kawa
> dialect of Scheme.
> Plus test-cases and examples would be written in Scheme.  So start by
> downloading,
> building, and using Kawa.  Write scripts and programs in it.  Perhaps
> focus in
> on some Kawa feature that seems interesting/fun and go a bit deeper: For
> example
> Kawa as a web server - or "Composable pictures" - or using it in place of
> a shell script.
>
> Also look at the Kawa number hierarchy, especially the Quantities page:
> https://www.gnu.org/software/kawa/Quantities.html
> This doesn't go into depth, but should point in the right direction.
> Also look at how Quantities are implemented - look in gnu/math in the
> source code.
>
> As a model of what we want to do, look at how Kawa implements the unsigned
> types
> ulong/uin/ushort/ubyte. Look at the dis-assembled bytecode (using either
> the class gnu.byteode.dump or the standard javap).  Understand how ''ulong'
> gets compiled to a plain long (when the types are known) vs how it is
> represented
> as a gnu.math.ULog (when we don't know the type at compile-time).
>
> In the same way that a 'ulong' is either a long or a gnu.math.ULong,
> we want the type quantity[cm^2] to be either a double or a
> gnu.math.DQuantity.
> Part of the goal is compile-time type-checking; part of the goal is to
> generate
> efficient code, using just double arithmetic when possible.  In the latter
> case,
> all of the unit checking and combing would be done at compile-time.
>
> All of this stuff is in the Kawa manual at https://www.gnu.org/software/k
> awa/
> --
>         --Per Bothner
> [hidden email]   http://per.bothner.com/
>