1. Testing eu.ex

Hello,

Sorry if this post will show some redundant lines.

I think running eu.ex with eu.ex is a good means to measure the stability of Euphoria. This is what I get with Euphoria 3.1.1 in the source tree of Eu 3.1.1:

Euphoria Interpreter 3.1.1 for 32-bit Windows.
Copyright (c) Rapid Deployment Software 2007
See http://www.RapidEuphoria.com/License.txt

file name to execute? eu.ex
Euphoria Interpreter 3.1.1 for 32-bit Windows.
Copyright (c) Rapid Deployment Software 2007
See http://www.RapidEuphoria.com/License.txt

file name to execute? eu.ex
Euphoria Interpreter 3.1.1 for 32-bit Windows.
Copyright (c) Rapid Deployment Software 2007
See http://www.RapidEuphoria.com/License.txt

file name to execute? eu.ex
Euphoria Interpreter 3.1.1 for 32-bit Windows.
Copyright (c) Rapid Deployment Software 2007
See http://www.RapidEuphoria.com/License.txt

file name to execute? eu.ex
Euphoria Interpreter 3.1.1 for 32-bit Windows.
Copyright (c) Rapid Deployment Software 2007
See http://www.RapidEuphoria.com/License.txt

file name to execute? hello.exw
Hello World

It took about 6 minutes to run the 4th instance of eu.ex with the 3rd instance and it took some time to run a little program to print Hello World, but it works.

This is what I get with the alpha2 version of Eu 4.0 running the 3rd instance:

Euphoria Interpreter 4.0a2 for 32-bit Windows.
Using Managed Memory
Copyright (c) Rapid Deployment Software 2008
See http://www.RapidEuphoria.com/License.txt

file name to execute? eu.ex
Euphoria Interpreter 4.0a2 for 32-bit Windows.
SVN Revision 1277
Using System Memory
Copyright (c) Rapid Deployment Software 2008
See http://www.RapidEuphoria.com/License.txt

file name to execute? eu.ex
Euphoria Interpreter 4.0a2 for 32-bit Windows.
SVN Revision 1277
Using System Memory
Copyright (c) Rapid Deployment Software 2008
See http://www.RapidEuphoria.com/License.txt

file name to execute? eu.ex

.\emit.e:806 in procedure emit_op()
obj has not been initialized
... called from .\parser.e:1220 in procedure UFactor()
... called from .\parser.e:1240 in function term()
... called from .\parser.e:1255 in function aexpr()
... called from .\parser.e:1269 in function cexpr()
... called from .\parser.e:1292 in function rexpr()
... called from .\parser.e:1322 in procedure Expr()
... called from .\parser.e:2790 in procedure Global_declaration()
... called from .\parser.e:3675 in procedure real_parser()
... called from .\parser.e:3828 in procedure parser()
... called from .\main.e:256 in procedure main()
... called from .\main.e:276

> see ex.err

Press Enter...

And this is the error message of Eu 4.0 rev 1359 with the 3rd instance:

...
file name to execute? eu.ex

.\emit.e:812 in procedure emit_op()
obj has not been initialized
... called from .\parser.e:1241 in function term()
... called from .\parser.e:1270 in function cexpr()
... called from .\parser.e:1323 in procedure Expr()
... called from .\parser.e:2782 in procedure Global_declaration()
... called from .\parser.e:3690 in procedure real_parser()
... called from .\parser.e:3843 in procedure parser()
... called from .\main.e:256 in procedure main()
... called from .\main.e:276

> see ex.err

Press Enter...

This is the error message of Eu 4.0 rev 1363:

.\emit.e:812 in procedure emit_op()
obj has not been initialized
... called from .\parser.e:1221 in procedure UFactor()
... called from .\parser.e:1241 in function term()
... called from .\parser.e:1256 in function aexpr()
... called from .\parser.e:1270 in function cexpr()
... called from .\parser.e:1293 in function rexpr()
... called from .\parser.e:1323 in procedure Expr()
... called from .\parser.e:2782 in procedure Global_declaration()
... called from .\parser.e:3705 in procedure real_parser()
... called from .\parser.e:3858 in procedure parser()
... called from .\main.e:256 in procedure main()
... called from .\main.e:276

> see ex.err

Press Enter...

If I run another program e.g. ed.ex as the 3rd instance I get the same error message.

I am not quite sure, but should it not be possible to run a third and fourth instance of Eu.ex with Euphoria 4.0 too?

Roland

new topic     » topic index » view message » categorize

2. Re: Testing eu.ex

RStowasser said...

Hello,

Sorry if this post will show some redundant lines.

I think running eu.ex with eu.ex is a good means to measure the stability of Euphoria.

[snip]

This is the error message of Eu 4.0 rev 1363:

.\emit.e:812 in procedure emit_op()
obj has not been initialized

> see ex.err

Press Enter...

The issue here is how the different interpreters keep track of initialized variables. The C-based backend uses a value that simply cannot be a valid euphoria value: neither an integer, nor a valid sequence nor atom:

#define NOVALUE ((long)0xbfffffffL)

Within the eu-based backend, however, a very unlikely number is used:

global constant NOVALUE = -1.295837195871e307 

This value is a perfectly legitimate atom, of course, and I don't think I've ever seen it used outside of the interpreter. But, of course, you're running the eu-based interpreter multiple times, so it's more likely to be encountered.

Due to forward referencing, the assignment to a variable was put inside an if statement, which caused an init check to be done later. The C-based backend has no problem with this, but since in the eu backend, obj was assigned to the special uninitialized value, it causes an error. I'll rework this particular section of code to fix this issue.

I don't think that there's a better solution to this general problem.

Matt

new topic     » goto parent     » topic index » view message » categorize

3. Re: Testing eu.ex

Hi Matt,

sometimes it looks like magic if I see how you manage to improve Euphoria's source code. I used Euphoria rev 1367 and was able to run 3 instances of Eu.ex and then Hello.exw. I suppose it would be possible to run a fourth instance of eu.ex too, but due to the size and complexity of the code, Eu4 plays in another league now compared with Eu 3.1.1 and it would have taken too much time on my machine.
Therefore I translated and compiled eu.ex and tried to run eu.ex with it. This is my result:

(First instance is eu.exe):
Euphoria Interpreter 4.0 (development) for 32-bit Windows.
SVN Revision 1367
...
file name to execute? eu.ex
Euphoria Interpreter 4.0 (development) for 32-bit Windows.
SVN Revision 1367
...
file name to execute? eu.ex

.\shift.e:339 in procedure shift()
subscript must be an atom
(reading an element of a sequence)
... called from .\inline.e:69 in procedure shift()
... called from .\inline.e:84 in procedure replace_code()
... called from .\inline.e:323 in function inline_op()
... called from .\inline.e:461 in procedure check_inline()
... called from .\parser.e:3419 in procedure SubProg()
... called from .\parser.e:3683 in procedure real_parser()
... called from .\main.e:260 in procedure main()
... called from .\main.e:276

> see ex.err

Press Enter...

If I use this little program:

include get.e
puts(1, "Hello World")
if wait_key() then end if

I will get this error when I try to run hello.exw as 3rd instance:

.\shift.e:339 in procedure shift()
subscript must be an atom
(reading an element of a sequence)
... called from .\inline.e:69 in procedure shift()
... called from .\inline.e:84 in procedure replace_code()
... called from .\inline.e:278 in function returnf()
... called from .\inline.e:326 in function inline_op()
... called from .\inline.e:461 in procedure check_inline()
... called from .\parser.e:3419 in procedure SubProg()
... called from .\parser.e:3655 in procedure real_parser()
... called from .\main.e:260 in procedure main()
... called from .\main.e:276

> see ex.err

Press Enter...

I must add that I cannot do this test with Eu 3.1.1. I can translate and compile eu.ex of 3.1.1 but I cannot run any program with eu.exe in Windows (Vista). This confuses me a little bit. Maybe I do something very wrong in this case.

Roland

new topic     » goto parent     » topic index » view message » categorize

4. Re: Testing eu.ex

RStowasser said...

Therefore I translated and compiled eu.ex and tried to run eu.ex with it. This is my result:

.\shift.e:339 in procedure shift()
subscript must be an atom
(reading an element of a sequence)
> see ex.err

Press Enter...

Looks like it's a bug in the translator for replace(). It's now Bug #24.

Matt

new topic     » goto parent     » topic index » view message » categorize

5. Re: Testing eu.ex

In my opinion these two tests are really not trivial. Using Euphoria 4.0 rev 1370 and running these tests in Windows Vista with exw.exe, exwc.exe, ex.exe and eu.exe I can only say:
Tests passed. 100 %

But I think you already know this.

Roland

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu