XML

kent logo

CO538 Anonymous Questions and Answers Keyword Index

This page provides a keyword index to questions and answers. Clicking on a keyword will take you to a page containing all questions and answers for that keyword, grouped by year.

To submit a question, use the anonymous questions page. You may find the keyword index and/or top-level index useful for locating past questions and answers.

Keyword reference for transterpreter

2012

Question 41 (2012):

Submission reference: IN2209

Every time I try to compile my code I get the following messsage:

    running: q7.tbc
    S:\courses\co538\transterpreter\bin\tvm.exe: could not open file: q7.tbc!
      Usage: S:\courses\co538\transterpreter\bin\tvm.exe BYTECODEFILE [MEMSIZE]

        BYTEFILE must be a valid Tranterpreter bytecode file.
        If MEMSIZE is specified, it is the the workspace size of the program;
        if not specified it will be computed automatically.
    q7.tbc exited with error code: 1

Is there any way to fix it?

Answer 41:

The main issue is that you're trying to run something which has not yet been compiled — the former depends on the latter in this case! In the TVM there should be two buttons, one which runs the program (and is producing the error you're seeing), the other which tries to compile it, turning your source "q7.occ" into the TVM bytecode file "q7.tbc". If it failed to compile, for whatever reason, the problem is there, but you can paste those errors in (if any) and we can try and help :-).

Keywords: transterpreter


Question 30 (2012):

Submission reference: IN2186

I have been running the Transterpreter from my own laptop without any problem up to now. However, it has suddenly given the following message when trying to compile any source file, including those in the examples folder:

    Command failed: C:\\(...)\\bin\\occ21.exe -t8 -zqa -etc -w -y -znd -znec
    -udo -zncc -init -xin -mobiles -zrpe -zcxdiv -zcxrem -zep -b -DEF
    OCCBUILD.TVM C:\(...)\(filename).occ
    
    compile exited with error code: 1

When I try to run the program (in this case, my q7.occ) anyway, I receive the error message:

    Failed to load/decode q7.tbc
    C:\(...)\bin\tvm.exe: failed to load user bytecode.
    q7.tbc exited with error code: 1

I have re-downloaded the Transterpreter and still receive the same error. Is there an issue that has suddenly appeared with my machine, or is there an easier fix?

Answer 30:

Were there any lines of output before the "Command failed" message? If your problem still exists, please get in touch with your seminar leader directly (bringing your laptop).

Keywords: transterpreter


Question 8 (2012):

Submission reference: IN2160

How do I change the path of skroc.exe in the transterpreter?

Answer 8:

We suspect you are using an old version of the Transterpreter – the new ones do not use skroc.exe.

On public room PCs, make sure you are using the one whose link icon has been copied from raptor at:

    \courses\co538\Transterpreter.lnk

Please make sure your are not using the Transterpreter icon set up for the Lego Mindstorms RCX (used in the Freshers' week workshop).

On your own machine, make sure you are using the latest version from transterpreter.org (20110201.1855).

If you are using the correct version and your problem still persists, please contact me or Fred Barnes or your class supervisor and make an appointment. Thanks.

Keywords: transterpreter

2011

Question 76 (2011):

Submission reference: IN2151

I am trying to run the Transterpreter, yet I get the error message "CreateProcess returned false" and thus cannot run the transterpreter.

Answer 76:

This sounds like a problem actually launching the Transterpreter. Check that the paths specified in the JEdit plugin (assuming you are using that!) are actually accessible from where you're trying to run things. If the compiling part works fine, then running things should too. Failing that, can you provide any more details? (or ask your class supervisor during one of the terminal sessions; it may be easier to diagnose the problem when it's in front of us).

Keywords: transterpreter


Question 6 (2011):

Submission reference: IN2035

Hi, While attempting to test the output from the integrate process for q2, I keep getting this error message whenever I try to run the program:

    Running: q2.tbc
    Error at ../../../../../../../modules/course/libsrc/demo_cycles.occ:50
    Program failed, state = e, eflags = 00000000
    q2.tbc exited with error code: 1

I can't figure out what I'm doing wrong to cause this error :(. Thanks.

Editor: the following question has been rolled into this, since the answer is the same.

Hello, I'm doing Q1 and am on the bit about filtering to remove multiples of 5. I've got some code that I think would work, but my program compiles with no warnings (except that keyboard and error aren't used), but when I run it, it displays:

    Error at [file location]:88
    Program failed, state E =, eflags = 00000001
    q1.tbc exited with error code: 1

If the 88 refers to line 88, I don't understand why as line 88 is simply:

    INT input, remainder:

Can you give any reasons why this might occur (I expect the error message means far more to you than it does to me)?

Answer 6:

These look like possible problems with the Transterpreter? Do you get the same problem when running from a University PC in a terminal room?

Please send me, <p.h.welch@kent.ac.uk>, your source code and say what operating system (and version) you are running. Also, what Java (JDK) version do you have (since the jEdit part of the Transterpreter runs on Java)?

Sorry, doing this will identify yourself to me ... but finding bugs that are our fault will do you no harm! Same also, if the bug turns out to be yours!! :)

Added later: solution to the second question, at least, is below.

Thanks for sending your code – it's your fault!   ;)   But also our fault for giving such a terrible run-time error message and pointing to the wrong line number ...

Check out slides 63-64 of Basics – on the IF process. Also, look here in the occam-pi reference wiki.

Unlike in most programming languages, there is no default do-nothing if an IF-condition fails ... so:

    INT x:
    SEQ
      n := 42
      IF
        n = 43
	  out.string ("All is well", 0, out!)
      n := 99

causes a crash, since none of the IF-conditions (there is only one above) is true.

There is a proper engineering reason for this language decision. If you want a default do-nothing, you must say so:

    INT n:
    SEQ
      n := 42
      IF
        n = 43
	  out.string ("All is well", 0, out!)
        TRUE
	  SKIP
      n := 99

Saying so declares that you have programmed to manage all conditions that are necessary for that IF and that no action need be taken if none of them apply. Such an explicit declaration begs to be defended in any code review.

The INMOS team who first developed occam did not have this rule in the language originally. Their first project was writing the occam compiler in occam and, then, an operating system / IDE for a micro-computer (this was 1984). Their code had plenty of implicit do-nothings at the end of IFs. Someone noticed that many bugs were down to omitted tests (that should not have been omitted). Execution passed through such IFs without failing and crashes occured later that were difficult to trace back to the real source.

They changed the language to the present rule for IF-semantics. Now, explicit do-nothings (TRUE-SKIPs) had to be defended and missing tests were found. IFs without explicit do-nothings were either correct or crashed the first time they executed in a state when the missing test should have been present. Because the crashes were at the actual causes of failure, the bugs were easy to detect and fix.

See also Question 2 (2006), Question 70 (2000) and Question 46 (2000).

It may, or may not, be consoling to know that if you had a Linux or Mac OS and could install KRoC successfully, you could compile with the debug flag:

    kroc -d q1.occ

so that when your execution fails, you are told:

    KRoC: error in PROC "filter" in file "q1.occ" line 96
    KRoC: application error, stopped.

which takes you to the line with the offending IF ...

Keywords: if , stop , transterpreter

Referrers: Question 31 (2012)

2010

Question 29 (2010):

Submission reference: IN1925

I'm currently working on the dining philosophers animation but for some reason after making some changes my code refuses to compile - It doesn't produce any error messages but actually seems to break the compiler, giving me the following output:

  Compiling: q7.occ
  skroc: Could not compile q7.occ.
  skroc exited with error code: 1

I've tried the same code on two different machines with two different transterpreter versions (my laptop is running the latest one from the website) and get the same result.

I've tried undoing what I changed to cause such an issue but it doesn't seem to have helped. I appreciate that debugging this may well be impossible without seeing the source code, but I hoped you might be able to suggest what I could possibly have done to cause this.

Thanks!

Answer 29:

Without any more error messages it's a pretty hard problem to diagnose. Although it seems like a daft suggestion, check that the "q7.occ" file it's trying to compile actually exists and is readable, and/or, that the directory it's in is writable. It might also be the case that the "skroc" command cannot find the compiler executable, but if that were the case, I'd expect a more detailed error message (or at least some hint). It may be worth checking the occplug settings to make sure these are sensible (and that the paths referred to exist and contain the expected files). If you still have problems, post again, but please also say what OS you're using and what version of the Transterpreter.

Added later: one of the Transterpreter developers has just mailed:

Given that it mentions skroc in the output it must be a very old version of something. Try to get the student to upgrade?

Are you sure you are using the latest version from the website? What is its version number? You can ask again anonymously ... but it's faster to mail us (phw@kent.ac.uk, frmb@kent.ac.uk).

Keywords: q7 , transterpreter

2009

Question 15 (2009):

Submission reference: IN1813

Is there a version of the Transterpreter (or KRoC) that actually works on PowerPC based Macs?

Answer 15:

Sorry, there doesn't seem to be one pre-compiled (not many PowerPC Macs left these days). However, if you download the SVM source tree (see the KRoC install page (for Linux PCs and MAC OS X)), and build it with:

  ./build --with-toolchain=tvm --prefix=/usr/local/kroc

(where /usr/local/kroc is wherever you choose to install it), you should get a version of the transterpreter that might work! This won't give you the jEdit GUI/IDE, but should be runnable from the command line.

If you do this and it works, please let us know – same if it doesn't!

Keywords: transterpreter

2006

Question 29 (2006):

Submission reference: IN872

Sorry if theres a real obvious anwser to this question that I'm missing but is there a way for me to save(/load) the occ files a create in RoboDeb to my Windows drive? (for the sake of organisation and keeping backups)

If the directory structure for RoboDeb stored somewhere on my Windows install?

If this isn't possible I can always FTP or email my files so not too much of a problem but is it safe to assume that anything save when using the VMWare will be secure and wont dissappear for next time I use RoboDeb? Thanks.

Answer 29:

The VMWare VM is "safe" to store your files on in one sense, and "unsafe" in others.

The VM saves its data where you installed it to. For most of you (all of you?) this was in your Raptor filespace. So, there is a file that represents "your" part of the VM virtual disk. It contains your data. So, as long as you don't delete *that*, you can launch the VM and work with your files. If that file is on Raptor, at least it is backed up.

Now, you're right in thinking that this is not exactly the best place to put your work. There are a few ways you can get things on/off the VM; you'll have to decide what works best for you.

Hopefully, that answers the question. If you have more questions, you can either post them here, or you can join the tvm-discuss mailing list:

    https://ssl.untyped.com/cgi/mailman/listinfo/tvm-discuss

This is a good place to ask questions and get answers that pertain to the Transterpreter itself or the RoboDeb VM. The whole TVM team is on that list, and we're glad to help make the tools better in any way that we can.

Keywords: robodeb , transterpreter

Referrers: Question 35 (2006)


Question 28 (2006):

Submission reference: IN871

Is there any chance we can get our raptor quota increased? I couldnt get 128MB free on my raptor account for the VM we needed to run the robotics occam, the lowest I could get it down to without deleting files from other courses was 90MB and our limit is 200MB.

Answer 28:

Done! The raptor filespace limit for all students taking Co631 has been increased to 350MB.

Keywords: robodeb , transterpreter


Question 26 (2006):

Submission reference: IN858

Ref. to Question 25 (2006), I've been running it in Vista for a while and it all works 100% so long as you're running the latest Java release.

Answer 26:

:)

Keywords: transterpreter


Question 25 (2006):

Submission reference: IN851

Hi - I have just upgraded to vista and I have installed the Transterpreter and all works fine and all behavior is normal. However when I run the program the output from the program does not appear in the terminal window.

I have asked a friend to check the file on another machine and the code works fine. I have just tried installing the latest version Transterpreter on a XP machines and the same problem occurs. Any ideas.

Answer 25:

This is from the Transterpreter team:

"One thing to try is to make sure to resize the occPlug window. There is currently a bug where the terminal window will not appear at all unless the occPlug window itself is big enough to contain it. I am working on fixing this, along with a number of other issues.

"Other than that we have not ever tried the Transterpreter in Vista nor are we likely to have access to any Vista machines soon(?). Perhaps the student can get in touch with us directly if he's interested in helping with testing and ironing out futher Vista bugs..."

Keywords: transterpreter

Referrers: Question 26 (2006)

Valid CSS!

Valid XHTML 1.0!

This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.
Last modified Mon May 20 13:50:34 2013
This document is maintained by Fred Barnes, to whom any comments and corrections should be addressed.