locked
Axum Compiler: "Internal Compiler Error during error emission" RRS feed

  • Question

  • I'm seeing several "Internal Compiler Error during error emission" messages coming from some Axum code that I wrote. I am sure that I am doing something wrong in the code, but I thought that I would report it so future versions of the Axum compiler could catch whatever condition I am triggering and produce more meaningful compiler messages.

    Code:

    namespace EulerProjectProblem2
    {
      // http://projecteuler.net/index.php?section=problems&id=2
      //
      // Each new term in the Fibonacci sequence is generated by adding the previous two terms.
      // By starting with 1 and 2, the first 10 terms will be:
      //
      // 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
      //
      // Find the sum of all the even-valued terms in the sequence which do not exceed four million.
      
      channel FibonacciTermsChannel
    	{
        input int TermCeiling;
        output int Term;
        output Signal Done;
      }
      
      agent FibonacciTermsAgent : channel FibonacciTermsChannel
      {
        public FibonacciTermsAgent()
        {
          int TermCeiling = receive(FibonacciTermsChannel::TermCeiling);
          
          bool KeepCalculatingTerms = true;
          int PreviousTerm1 = 1;
          int PreviousTerm2 = 2;
          
          PrimaryChannel::Term <-- 1;
          PrimaryChannel::Term <-- 2;
          while(KeepCalculatingTerms == true)
          {
            int Sum = PreviousTerm1 + PreviousTerm2;
            if(Sum > TermCeiling)
            {
              KeepCalculatingTerms = false;
            }
            else
            {
              PreviousTerm2 = PreviousTerm1;
              Sum = PreviousTerm2;
              PrimaryChannel::Term <-- Sum;
            }
          }
          PrimaryChannel::Done <-- Signal.Value;
        }
      }
      
      channel EvenNumberSummationChannel
      {
        input Signal Done;
        input int Term;
        output int Sum;
      }
      
      agent EvenNumberSummationAgent : channel EvenNumberSummationChannel
      {
        public EvenNumberSummationAgent()
    		{
    			int Sum = 0;
    
    			while(true)
    			{
    				receive
    				{
    					from PrimaryChannel::Done:
    						PrimaryChannel::Sum <-- Sum;
    						return;
    					from PrimaryChannel::Term:
    						int ReceivedTerm = receive(PrimaryChannel::Term);
    						if(ReceivedTerm % 2 == 0)
    							Sum = Sum + ReceievedTerm;
    						break;
    				}
    			}
        }
      }
    
      agent MainAgent : channel Microsoft.Axum.Application
      {
        public MainAgent()
        {
          var FibonacciTerms = FibonacciTermsAgent.CreateInNewDomain();
          var EvenNumberSummation = EvenNumberSummationAgent.CreateInNewDomain();
    			var Pipeline = FibonacciTerms::Term ==> EvenNumberSummation::Term;
    			Pipeline <-- 4000000;
          var Sum = receive(EvenNumberSummation::Sum);
          System.Console.WriteLine(Sum);
          System.Console.ReadLine();
          PrimaryChannel::ExitCode <-- 0;
        }
      }
    }
    

    Compiler Output:

    ------ Build started: Project: Problem001, Configuration: Debug Any CPU ------
    		Could not locate the .NET Framework SDK. The task is looking for the path to the .NET Framework SDK at the location specified in the SDKInstallRootv2.0 value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework. You may be able to solve the problem by doing one of the following: 1.) Install the .NET Framework SDK. 2.) Manually set the above registry key to the correct location.
    		Asynchronous agent constructors are on
    		Loading Axum compiler from 'C:\Users\jefff\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Microsoft\Microsoft Axum\0.3'
    		Build time: 00:00:00.0188992
    		Problem001 -> C:\Users\jefff\Documents\Visual Studio 2010\Projects\AxumResearch\EulerProjectProblem1\bin\Debug\EulerProjectProblem1.exe
    ------ Build started: Project: Problem002, Configuration: Debug Any CPU ------
    		Could not locate the .NET Framework SDK. The task is looking for the path to the .NET Framework SDK at the location specified in the SDKInstallRootv2.0 value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework. You may be able to solve the problem by doing one of the following: 1.) Install the .NET Framework SDK. 2.) Manually set the above registry key to the correct location.
    		Asynchronous agent constructors are on
    		Loading Axum compiler from 'C:\Users\jefff\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Microsoft\Microsoft Axum\0.3'
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Users\jefff\Documents\Visual Studio 2010\Projects\AxumResearch\Problem002\Program.ax(12,5): error MA2001: Could not resolve 'System.Concurrency.Messaging.IInteractionTarget<Signal>'
    C:\Users\jefff\Documents\Visual Studio 2010\Projects\AxumResearch\Problem002\Program.ax(12,5): error MA2001: Could not resolve array element type 'System.Concurrency.Messaging.IInteractionTarget<Signal>'
    C:\Users\jefff\Documents\Visual Studio 2010\Projects\AxumResearch\Problem002\Program.ax(12,5): error MA2001: Could not resolve return type 'System.Concurrency.Messaging.IInteractionTarget<Signal>[]'
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Users\jefff\Documents\Visual Studio 2010\Projects\AxumResearch\Problem002\Program.ax(12,5): error MA2001: Could not resolve property declaration 'System.Collections.Generic.List<Signal>'
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Users\jefff\Documents\Visual Studio 2010\Projects\AxumResearch\Problem002\Program.ax(12,5): error MA2001: Could not resolve 'System.Concurrency.Messaging.IInteractionSource<Signal>'
    C:\Users\jefff\Documents\Visual Studio 2010\Projects\AxumResearch\Problem002\Program.ax(12,5): error MA2001: Could not resolve array element type 'System.Concurrency.Messaging.IInteractionSource<Signal>'
    C:\Users\jefff\Documents\Visual Studio 2010\Projects\AxumResearch\Problem002\Program.ax(12,5): error MA2001: Could not resolve return type 'System.Concurrency.Messaging.IInteractionSource<Signal>[]'
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Users\jefff\Documents\Visual Studio 2010\Projects\AxumResearch\Problem002\Program.ax(12,5): error MA2001: Could not resolve property declaration 'System.Collections.Generic.List<Signal>'
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Users\jefff\Documents\Visual Studio 2010\Projects\AxumResearch\Problem002\Program.ax(49,5): error MA2001: Could not resolve 'System.Concurrency.Messaging.IInteractionSource<Signal>'
    C:\Users\jefff\Documents\Visual Studio 2010\Projects\AxumResearch\Problem002\Program.ax(49,5): error MA2001: Could not resolve array element type 'System.Concurrency.Messaging.IInteractionSource<Signal>'
    C:\Users\jefff\Documents\Visual Studio 2010\Projects\AxumResearch\Problem002\Program.ax(49,5): error MA2001: Could not resolve return type 'System.Concurrency.Messaging.IInteractionSource<Signal>[]'
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Users\jefff\Documents\Visual Studio 2010\Projects\AxumResearch\Problem002\Program.ax(49,5): error MA2001: Could not resolve property declaration 'System.Collections.Generic.List<Signal>'
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Users\jefff\Documents\Visual Studio 2010\Projects\AxumResearch\Problem002\Program.ax(49,5): error MA2001: Could not resolve 'System.Concurrency.Messaging.IInteractionTarget<Signal>'
    C:\Users\jefff\Documents\Visual Studio 2010\Projects\AxumResearch\Problem002\Program.ax(49,5): error MA2001: Could not resolve array element type 'System.Concurrency.Messaging.IInteractionTarget<Signal>'
    C:\Users\jefff\Documents\Visual Studio 2010\Projects\AxumResearch\Problem002\Program.ax(49,5): error MA2001: Could not resolve return type 'System.Concurrency.Messaging.IInteractionTarget<Signal>[]'
    C:\Program Files (x86)\MSBuild\Microsoft\Axum\1.0\Axum.targets(13,5): error : Internal Compiler Error during error emission
    C:\Users\jefff\Documents\Visual Studio 2010\Projects\AxumResearch\Problem002\Program.ax(49,5): error MA2001: Could not resolve property declaration 'System.Collections.Generic.List<Signal>'
    		Axum compilation failed
    		Build time: 00:00:02.1857827
    Done building project "Problem002.axproj" -- FAILED.
    
    Build FAILED.
    ========== Build: 1 succeeded or up-to-date, 1 failed, 0 skipped ==========
    

    Thank you!

    Monday, June 7, 2010 12:47 AM

Answers

  • Jeff, thank you for your error report. We are absolutely interested in horrendous errors from the compiler like this. As you can see, one of the areas where an incubation project will cut corners is on error quality from the compiler. A production compiler could never get away with this, and we have a lot of work to do in this area.

    Thank you for your continued interest in Axum even though we are unable (at this time) to make any public commitments around it as a product! BTW, Waleed, it's really cool to see that people outside the Axum team is pitching in an helping with problems. It gladdens my heart!

    Thanks,

    Niklas

    • Marked as answer by Jeff.Ferguson Wednesday, June 16, 2010 12:34 PM
    Thursday, June 10, 2010 2:40 PM
    Moderator

All replies

  • Hi Jeff, I'm playing with your code right now, the source does not compile and there is some reported errors

    1. FibonacciTermsAgent Agent's Constructor: you have used the name of the implemented channel to reference the TermCeiling Port. this is false,  you have to use the PrimaryChannel keyword to reference the implemented channel in your agent: you should use this syntactic construct :

    int TermCeiling = receive(PrimaryChannel::TermCeiling);

    2. EvenNumberSummationAgent Agent's Constructor: you mistyped the identifier ReceivedTerm in this :

                            if(ReceivedTerm % 2 == 0)
                                Sum = Sum + ReceievedTerm; //ReceivedTerm

    3. In your channel ports, you have used integral type int, as you might know, int is coded in 31Bits + 1 last bits for signing, the maximum value supported by this type is 32767, so you should use long integral type instead of int, this will fit your case as far as it's less than 2147483647 + 1.

    this is a prototype i picked it from your code.

      channel FibonacciTermsChannel
        {
        input long TermCeiling;
        output long Term;
        output Signal Done;
      }

     


    With best regards. Oualid, vb4arab.com
    Monday, June 7, 2010 2:09 AM
  • I think that there is no support for implicit trans type casting in Axum Compiler, so you should trail your number tokens with the L suffix when use use the long type (agentChannel::Port <-- 40000000L where Port is of type long).

    Regards

    Waleed


    With best regards. Oualid, vb4arab.com
    Monday, June 7, 2010 2:15 AM
  • Thank you! As I mentioned in my original post, I was sure that I had errors in the code. I just wanted to post my code so Microsoft could see it and find opportunities for the compiler to produce more meaningful error messages.
    Monday, June 7, 2010 2:19 AM
  • Me too, I hope that Microsoft will continue support for this incubation project, there is no active updates from a while.


    With best regards. Oualid, vb4arab.com
    Monday, June 7, 2010 2:28 AM
  • Well, we did get 0.3, with support for the Visual Studio 2010 RTM. You are correct in noting that this is an incubation project that could go nowhere ... we'll just have to wait and see.
    Monday, June 7, 2010 2:49 AM
  • Jeff, thank you for your error report. We are absolutely interested in horrendous errors from the compiler like this. As you can see, one of the areas where an incubation project will cut corners is on error quality from the compiler. A production compiler could never get away with this, and we have a lot of work to do in this area.

    Thank you for your continued interest in Axum even though we are unable (at this time) to make any public commitments around it as a product! BTW, Waleed, it's really cool to see that people outside the Axum team is pitching in an helping with problems. It gladdens my heart!

    Thanks,

    Niklas

    • Marked as answer by Jeff.Ferguson Wednesday, June 16, 2010 12:34 PM
    Thursday, June 10, 2010 2:40 PM
    Moderator