>"Maxim Kizub" <[EMAIL PROTECTED]> writes:
>
>> Early next week we'll put link to sources on our web page
>> too.
>
>Sounds great! Please send an announcement to the list, once this
>happens.
>
May friend Sergey, that is responsible for the web page of Forestro is in
vacation. He'll back early next week. That's the reason of the delay...
I'll drop a message when the link will be put on the web.
>> The question was about library support of call-by-contract feature
>> of the compiler/language.
>
>[...]
>
>> There should be something more that "more optimized version of core
>> classes".
>>
>> So, are you interested in such kind of cooperation?
>
>Assuming the following:
>
>1) call-by-contract will not effect run-time speed, and if it does,
> call-by-contract can be disabled by a compiler switch
First of all, the speed is delayed only by boolean expression
check, nothing more. Also, compiler tryes to optimize the need
of checks (for example, if a field was not changed in the method -
the constraints about this field are not checked on return).
Next, you may manually specify at compile time what kind
of checks you wish to enable/disable. This includes
trace calls, asserts, pre/post conditions and invariants, as
well as line/variable tables generation.
With proper support from JVM (like japhar or kaffe) it may be
possible to switch these checks on the fly ;-)
>2) GNU Classpath will still be compilable by a `normal' Java compiler
>
There are some ways to make sources compatible with
others compilers. The source code included in /*{ ... }*/
"comments" is ignored by other compilers (since it's a normal
comment for java) but used as normal source text by
kiev compiler. So, to use compatible with other compilers way
we need somthing like this:
class Test {
int i;
String s;
/*{
invariant CheckSomething {
i >= 0 :: "Negative i = "+i;
s != null && s.length() > 0 :: "Empty s";
}
}*/
String foo(int j)
/*{
require { j > i :: "Too small j <= "+i; }
ensure { $return != null; }
}*/
{ return s + i*j; }
}
If you'll need another way of compatibility syntax - I'll add it.
>I'm very interested in trying out anything which can make the
>Classpath libs better than Sun's libs. :)
>
>> PS Paul, have you tried to compile $classpath sources with kiev?
>
>I haven't. We'll get to work on that as soon as the GPL'd version is
>released.
Ok.
BTW - how can I download $Classpath sources to check that kiev
compiler can compile them? I've not found a link to distribution...