Browse Source

Corrected delegation order, understanding << and >> as stream operator and pointing in the direction of information flow.
Temporarily disabled incorrect (and ineffective) order check.

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@6921 8c9fc860-2736-0410-a75d-ab315db34111

skoster 8 years ago
parent
commit
b8b9bd5f5e
2 changed files with 3 additions and 1 deletions
  1. 2 0
      source/ActiveCellsRunner.mod
  2. 1 1
      source/ActiveCellsRuntime.mod

+ 2 - 0
source/ActiveCellsRunner.mod

@@ -309,10 +309,12 @@ type
 			if res # 0 then return; end; (*! do not do anything in case of an error *)
 			if res # 0 then return; end; (*! do not do anything in case of an error *)
 			if EnableTrace then trace(netPort, cellPort); end;
 			if EnableTrace then trace(netPort, cellPort); end;
 			(*! check correctness of delegation which is not 100% guaranteed by the operator ">>" *)
 			(*! check correctness of delegation which is not 100% guaranteed by the operator ">>" *)
+			(*
 			if ~netPort(Port).owner.isCellnet or (cellPort(Port).owner = netPort(Port).owner) then
 			if ~netPort(Port).owner.isCellnet or (cellPort(Port).owner = netPort(Port).owner) then
 				res := -1;
 				res := -1;
 				return;
 				return;
 			end;
 			end;
+			*)
 			netPort(Port).Delegate(cellPort(Port));
 			netPort(Port).Delegate(cellPort(Port));
 		end Delegate;
 		end Delegate;
 
 

+ 1 - 1
source/ActiveCellsRuntime.mod

@@ -525,7 +525,7 @@ type
 	
 	
 	operator ">>"* (cellPort: Pout; netPort: Pout); 
 	operator ">>"* (cellPort: Pout; netPort: Pout); 
 	begin
 	begin
-		Delegate(system.val(any, netPort), system.val(any, cellPort));
+		Delegate(system.val(any, cellPort), system.val(any, netPort));
 	end ">>";
 	end ">>";
 	
 	
 	operator ">>"* (netPort: Pin; cellPort: Pin); 
 	operator ">>"* (netPort: Pin; cellPort: Pin);