Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Ada > Re: SPARK and s...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 4 Topic 5650 of 5800
Post > Topic >>

Re: SPARK and static unit checking?

by roderick.chapman@[EMAIL PROTECTED] Apr 14, 2008 at 07:57 AM

SPARK has a few general princles regarding the arithmetic
operators.

1) They are always "monotonic" meaning they take and return the same
type - the binary operators, for example, always have the signature
  (Left, Right : in T) return T

2) There is no re-declaration, renaming, or user-defined overloading
of the
operators, so "+" _always_ means "arithmetic addition" (which might
be signed integer, modular integer, floating, or fixed, of course...)

3) You can't change the base-name of an operator via a renaming,
which,
as Bob Duff pointed out in another thread, is a dreadful thing to do
anyway.

You can define functions with identifiers for names if you can put
up with having to write "My_Plus (A, B)" instead of "A + B" for
instance.

- Rod Chapman, SPARK Team
 




 4 Posts in Topic:
SPARK and static unit checking?
Jacob Sparre Andersen <  2008-04-11 02:59:20 
Re: SPARK and static unit checking?
JP Thornley <jpt@[EMAI  2008-04-13 20:39:34 
Re: SPARK and static unit checking?
Jacob Sparre Andersen <  2008-04-14 04:21:56 
Re: SPARK and static unit checking?
roderick.chapman@[EMAIL P  2008-04-14 07:57:49 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Jul 6 19:49:16 CDT 2008.