Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[ANNOUNCE] Another Trivia Language: URM

1 view
Skip to first unread message

Marcus Thiesen

unread,
Sep 23, 2003, 4:29:23 PM9/23/03
to P6I
Hi,

I'd like to add one more to the library of trivia languages. It is not
as strange as Bf or Ook! and it is actually a real (teaching) language.

Enter: URM

URM is a "language" at least used in German universities to teach the
basic principles of programming. URM stands for Universal Register
Machine - it basically means that you have a couple of operations and
an unlimited amount of registers to use for your programs.

Here are the URLs
More information:
http://perl.thiesenweb.de/readme-urm.txt

My initial package:
http://perl.thiesenweb.de/urmc-0.1.tar.bz2

Have fun
Marcus


--
---------------------------------------------------------
|Marcus Thiesen ICQ# 108989768|
---------------------------------------------------------
| www.thiesenweb.de |
---------------------------------------------------------
28A7 37CC AE2C BB6C D56D 8A3D E614 E56B 7546 75F2

signature.asc

Leopold Toetsch

unread,
Sep 24, 2003, 4:24:37 AM9/24/03
to mar...@thiesenweb.de, perl6-i...@perl.org
Marcus Thiesen <mar...@thiesenweb.de> wrote:
> Hi,

> I'd like to add one more to the library of trivia languages. It is not
> as strange as Bf or Ook! and it is actually a real (teaching) language.

> Enter: URM

Nice.

Some remarks:
- could you parrotify the Makefile and urmc. (i.e. no hardcoded "parrot"
executable, no "rm", ... just C<use Parrot::Config;>, assuming the
destination languages/urm)
- a "make test" target would be nice
- IIRC the license GPL should be ok for languages

> http://perl.thiesenweb.de/urmc-0.1.tar.bz2

> Have fun
> Marcus

Always, thanks
leo

Leopold Toetsch

unread,
Sep 24, 2003, 5:08:48 AM9/24/03
to mar...@thiesenweb.de, perl6-i...@perl.org
Marcus Thiesen <mar...@thiesenweb.de> wrote:

> Enter: URM

[ some more remarks ]

src> my $roffset = 15; ### imcc does that, don't know why

Its for PCC (Parrot Calling Conventions). The register allocator starts
to allocate registers from 16..31 first, so that only the top halve of
one register bank has to be preserved over function calls.

If your language doesn't provide subroutines you can safely ignore this.

Further: as URM has an arbitrary amount of registers, it would be much
simpler to target PIR code.

r46 <- r100 + r200

is currently for sure an error. OTOH translating this to


$I46 = $I100 + $I200

is fine.

And finally: Please emit an "end" statement at the end of your code
(i.e. when branching to a non existent label) or things will break
especially when running with the JIT core.

leo

Marcus Thiesen

unread,
Sep 25, 2003, 6:51:39 AM9/25/03
to perl6-i...@perl.org
On Wed, 2003-09-24 at 11:08, Leopold Toetsch wrote:
> Further: as URM has an arbitrary amount of registers, it would be much
> simpler to target PIR code.
>
> r46 <- r100 + r200
>
> is currently for sure an error. OTOH translating this to
>
>
> $I46 = $I100 + $I200
>

Ok, fixed that and some other issues Leo addressed. Now I have my own
register management and put all the not needed registers on the user
stack.
I've not rewritten the Makefiles because all the other languages/
Makefiles are either created by the parrot config or are really
hardcoded Unix makefiles.
Still have some open issues, but I believe it is enough for version 0.2

http://perl.thiesenweb.de/urmc-0.2.tar.bz2


Have fun,

signature.asc

Leopold Toetsch

unread,
Sep 25, 2003, 9:10:56 AM9/25/03
to mar...@thiesenweb.de, perl6-i...@perl.org
Marcus Thiesen wrote:

> On Wed, 2003-09-24 at 11:08, Leopold Toetsch wrote:
>> $I46 = $I100 + $I200
>
> Ok, fixed that and some other issues Leo addressed. Now I have my own
> register management and put all the not needed registers on the user
> stack.

Why? Parrot with the PIR assembler can handle an arbitrary register
count. I'm sure you are not able to write a program (doing something
useful) to force imc to spill registers :)


> I've not rewritten the Makefiles because all the other languages/
> Makefiles are either created by the parrot config or are really
> hardcoded Unix makefiles.

The latter is a bug of course. Anyway - if possible - put urm in
languages/urm, create confige/gen/makefiles/urm.in, adapt makefiles.pl,
run Configure, use Parrot:Config, replace hardcoded 'parrot' with config
vars and try to get it running.
If this step is too big (or you don't know, what I' talking about :),
just drop me a mail, I'll have a look at it then.

For the tests (thanks) you might consider reading "perldoc Test::Simple"
and alike -

BTW & apropos: met Michael G Schwern and David Hand yesterday at the
Vienna.pm TechMeet http://use.perl.org/~maks/journal/14901


> Have fun,
>
> Marcus

Thanks,
leo

Marcus Thiesen

unread,
Sep 25, 2003, 9:45:56 AM9/25/03
to perl6-i...@perl.org
On Thu, 2003-09-25 at 15:10, Leopold Toetsch wrote:
> > Ok, fixed that and some other issues Leo addressed. Now I have my own
> > register management and put all the not needed registers on the user
> > stack.
>
> Why? Parrot with the PIR assembler can handle an arbitrary register
> count. I'm sure you are not able to write a program (doing something
> useful) to force imc to spill registers :)

Just for fun. It's far to easy to use imc and I wanted the challenge.

> The latter is a bug of course.

See Cola.


> Anyway - if possible - put urm in
> languages/urm, create confige/gen/makefiles/urm.in, adapt makefiles.pl,
> run Configure, use Parrot:Config, replace hardcoded 'parrot' with config
> vars and try to get it running.
> If this step is too big (or you don't know, what I' talking about :),
> just drop me a mail, I'll have a look at it then.

I know what you're talking about. I'll try to do so in a minute.

> For the tests (thanks) you might consider reading "perldoc Test::Simple"
> and alike -

Jea, but I always feel strange using perl test tools for non perl stuff
like a compiler and it's output.

signature.asc
0 new messages