New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack Overflow in fault tree generation #1424

Closed
reteprelief opened this Issue Aug 1, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@reteprelief
Contributor

reteprelief commented Aug 1, 2018

This occurs when there is an error path from an in propagation to an out propagation of an in out port.

Originator:
Hello

in some cases the FTA of my AADL-model results in the following error in OSATE. The corresponding error log is attached as well as my model. As the error message isn't helpful at all I tried some fixes. If the error-flow "ef3" is removed the FTA works fine and as soon as it is implemented the error occurs. Right now this error path isn't used (ETH1 has no incoming propagations) but I want to be ready if the model needs to be extended. This is very important in my case of application so I want to predefine the possible error flows to add additional components without any effort. Is this possible with AADL or is there any error in my model? Maybe there is the option to enable or disable this flow if it's not connected as it is possible with the error-source above.

Kind regards
David

@reteprelief reteprelief added this to the 2.3.5 milestone Aug 1, 2018

@reteprelief reteprelief self-assigned this Aug 1, 2018

@wafflebot wafflebot bot added in progress and removed next labels Aug 1, 2018

@reteprelief

This comment has been minimized.

Show comment
Hide comment
@reteprelief

reteprelief Aug 1, 2018

Contributor
package modeling_file
public

	--system
	system sys
	end sys;
	
	
---------------------------------------------------------------------------------------------------------------------------------------------------
	

	device BTCU
		
		features
			MVB1	:	 in out event data port;
			
	end BTCU;

	
	device implementation BTCU.i
			
		annex EMV2{**
			use types	emv2_errortype_definition, ErrorLibrary;
			use behavior ErrorLibrary::PermanentTransientFailure; 
			
			error propagations
				MVB1	:	out propagation{BTCU_Error};
			flows
				ef0	:	error source MVB1{BTCU_Error} when FailedTransient;
			end propagations;
			
			
			component error behavior
				events
					Reset	:	recover event;
				transitions
					failtransition	:	Operational-[Failure]->(FailedTransient with 0.9, FailedPermanent with others);
				propagations	
					FailedTransient-[]->MVB1{BTCU_Error};		
			end component;
			
			properties
				emv2::occurrencedistribution => [ probabilityValue => 0.05e-6 ;] applies to Failure;					
		**};
			
	end BTCU.i;
	
	-------------------------------------------------------------------------------------------------------------------------------------------
	
	
	
	system CCUS1
		
		features
			ETH1	:	in out event data port;
			MVB1	:	in out event data port;
			
	end CCUS1;

	
	system implementation CCUS1.i
		
		
		annex EMV2{**
			use types	emv2_errortype_definition, ErrorLibrary;
			use behavior ErrorLibrary::PermanentTransientFailure; 
			
			error propagations
				MVB1	:	in propagation{BTCU_Error};
				ETH1	:	in propagation{CCUS_Error, BTCU_Error};
				ETH1	:	out propagation{CCUS_Error, BTCU_Error};
			flows
				ef1	:	error source ETH1{CCUS_Error} when FailedTransient;
				ef2	:	error path MVB1{BTCU_Error} -> ETH1{BTCU_Error};
				--ef3	:	error path ETH1{BTCU_Error} -> ETH1{BTCU_Error};
			end propagations;
	
			
			component error behavior
				events
					Reset	:	recover event;
				transitions
					failtransition	:	Operational-[Failure]->(FailedTransient with 0.9, FailedPermanent with others);
				propagations	
					FailedTransient-[]->ETH1{CCUS_Error};
			end component;
			
			properties
				emv2::occurrencedistribution => [ probabilityValue => 0.05e-6 ;] applies to Failure;	
		**};
	end CCUS1.i;

	

	-------------------------------------------------------------------------------------------------------------------------------------------
	
		

	device user
		features
			p_out	:	out event port;
			
		annex EMV2{**
			use types	emv2_errortype_definition, ErrorLibrary;
			use behavior ErrorLibrary::PermanentTransientFailure; 
			
			error propagations
				p_out	:	out propagation {User_Error};
			flows
				ef0	:	error source p_out{User_Error} when FailedTransient;
			end propagations;	
			
			component error behavior
				events
					Reset	:	recover event;
				transitions
					failtransition	:	Operational-[Failure]->(FailedTransient with 0.9, FailedPermanent with others);
				propagations	
					FailedTransient-[]->p_out{User_Error};		
			end component;
			
			properties
				emv2::occurrencedistribution => [ probabilityValue => 0.05e-6 ;] applies to Failure;				
		**};
	end user;
	
	
	process UGBT
		features
			p_in	:	in event port;
			
		annex EMV2{**
			use types	emv2_errortype_definition, ErrorLibrary;
			use behavior ErrorLibrary::PermanentTransientFailure; 
			
			error propagations
				p_in	:	in propagation{BTCU_Error, CCUS_Error, User_Error};
			flows
				ef0	:	error sink p_in{BTCU_Error, CCUS_Error, User_Error};
			end propagations;
			
			component error behavior
				events
					Reset	:	recover event;
				transitions
					failtransition	:	Operational-[p_in{BTCU_Error, CCUS_Error, User_Error} or Failure]->(FailedTransient with 0.9, FailedPermanent with others);
			end component;
			
			properties
				emv2::occurrencedistribution => [ probabilityValue => 0.05e-6 ;] applies to Failure;	
						
		**};
	end UGBT;
	
	
	system TDD1 
		features
			ETH1	:	in out event data port;
	end TDD1;
	
	
	system implementation TDD1.i
		subcomponents
			ugbt			:	process	ugbt;
			user			:	device	user;
		
		connections
			c4	:	port	ETH1 -> ugbt.p_in;
			c5	:	port	user.p_out -> ugbt.p_in;
			
			
		
		annex EMV2{**
			use types	emv2_errortype_definition, ErrorLibrary;
			use behavior ErrorLibrary::PermanentTransientFailure; 
			
			error propagations
				ETH1	:	in propagation{CCUS_Error, BTCU_Error};
			--flows
			--	ef1	:	error sink ETH1{CCUS_Error, BTCU_Error};
			end propagations;
			
			composite error behavior
			states
				[ugbt.FailedTransient]-> FailedTransient;
				[ugbt.FailedPermanent]-> FailedPermanent;
			end composite;
			
			properties
				emv2::occurrencedistribution => [ probabilityValue => 0.05e-6 ;] applies to Failure;	
		**};
	end TDD1.i;
	
	
	-------------------------------------------------------------------------------------------------------------------------------------------
	--implementation of system
	system implementation sys.i
		subcomponents
			BTCU	:	device BTCU.i;
			CCUS1	:	system CCUS1.i;
			TDD1	:	system TDD1.i;
			
		connections
			c0	:	port BTCU.MVB1 <-> CCUS1.MVB1;
			c1	:	port CCUS1.ETH1 <-> TDD1.ETH1;
			c2	:	port CCUS1.MVB1 -> BTCU.MVB1;
			c3	:	port TDD1.ETH1 -> CCUS1.ETH1;
			
			
		annex EMV2{**
			use types	emv2_errortype_definition, ErrorLibrary;
			use behavior ErrorLibrary::PermanentTransientFailure; 
			
			composite error behavior
			states
				[BTCU.FailedTransient]-> FailedTransient;
				[CCUS1.FailedTransient]-> FailedTransient;
				[TDD1.FailedTransient]-> FailedTransient;
				[BTCU.FailedPermanent]-> FailedPermanent;
				[CCUS1.FailedPermanent]-> FailedPermanent;
				[TDD1.FailedPermanent]-> FailedPermanent;
			end composite;	
		**};	
	end sys.i;


end modeling_file;
Contributor

reteprelief commented Aug 1, 2018

package modeling_file
public

	--system
	system sys
	end sys;
	
	
---------------------------------------------------------------------------------------------------------------------------------------------------
	

	device BTCU
		
		features
			MVB1	:	 in out event data port;
			
	end BTCU;

	
	device implementation BTCU.i
			
		annex EMV2{**
			use types	emv2_errortype_definition, ErrorLibrary;
			use behavior ErrorLibrary::PermanentTransientFailure; 
			
			error propagations
				MVB1	:	out propagation{BTCU_Error};
			flows
				ef0	:	error source MVB1{BTCU_Error} when FailedTransient;
			end propagations;
			
			
			component error behavior
				events
					Reset	:	recover event;
				transitions
					failtransition	:	Operational-[Failure]->(FailedTransient with 0.9, FailedPermanent with others);
				propagations	
					FailedTransient-[]->MVB1{BTCU_Error};		
			end component;
			
			properties
				emv2::occurrencedistribution => [ probabilityValue => 0.05e-6 ;] applies to Failure;					
		**};
			
	end BTCU.i;
	
	-------------------------------------------------------------------------------------------------------------------------------------------
	
	
	
	system CCUS1
		
		features
			ETH1	:	in out event data port;
			MVB1	:	in out event data port;
			
	end CCUS1;

	
	system implementation CCUS1.i
		
		
		annex EMV2{**
			use types	emv2_errortype_definition, ErrorLibrary;
			use behavior ErrorLibrary::PermanentTransientFailure; 
			
			error propagations
				MVB1	:	in propagation{BTCU_Error};
				ETH1	:	in propagation{CCUS_Error, BTCU_Error};
				ETH1	:	out propagation{CCUS_Error, BTCU_Error};
			flows
				ef1	:	error source ETH1{CCUS_Error} when FailedTransient;
				ef2	:	error path MVB1{BTCU_Error} -> ETH1{BTCU_Error};
				--ef3	:	error path ETH1{BTCU_Error} -> ETH1{BTCU_Error};
			end propagations;
	
			
			component error behavior
				events
					Reset	:	recover event;
				transitions
					failtransition	:	Operational-[Failure]->(FailedTransient with 0.9, FailedPermanent with others);
				propagations	
					FailedTransient-[]->ETH1{CCUS_Error};
			end component;
			
			properties
				emv2::occurrencedistribution => [ probabilityValue => 0.05e-6 ;] applies to Failure;	
		**};
	end CCUS1.i;

	

	-------------------------------------------------------------------------------------------------------------------------------------------
	
		

	device user
		features
			p_out	:	out event port;
			
		annex EMV2{**
			use types	emv2_errortype_definition, ErrorLibrary;
			use behavior ErrorLibrary::PermanentTransientFailure; 
			
			error propagations
				p_out	:	out propagation {User_Error};
			flows
				ef0	:	error source p_out{User_Error} when FailedTransient;
			end propagations;	
			
			component error behavior
				events
					Reset	:	recover event;
				transitions
					failtransition	:	Operational-[Failure]->(FailedTransient with 0.9, FailedPermanent with others);
				propagations	
					FailedTransient-[]->p_out{User_Error};		
			end component;
			
			properties
				emv2::occurrencedistribution => [ probabilityValue => 0.05e-6 ;] applies to Failure;				
		**};
	end user;
	
	
	process UGBT
		features
			p_in	:	in event port;
			
		annex EMV2{**
			use types	emv2_errortype_definition, ErrorLibrary;
			use behavior ErrorLibrary::PermanentTransientFailure; 
			
			error propagations
				p_in	:	in propagation{BTCU_Error, CCUS_Error, User_Error};
			flows
				ef0	:	error sink p_in{BTCU_Error, CCUS_Error, User_Error};
			end propagations;
			
			component error behavior
				events
					Reset	:	recover event;
				transitions
					failtransition	:	Operational-[p_in{BTCU_Error, CCUS_Error, User_Error} or Failure]->(FailedTransient with 0.9, FailedPermanent with others);
			end component;
			
			properties
				emv2::occurrencedistribution => [ probabilityValue => 0.05e-6 ;] applies to Failure;	
						
		**};
	end UGBT;
	
	
	system TDD1 
		features
			ETH1	:	in out event data port;
	end TDD1;
	
	
	system implementation TDD1.i
		subcomponents
			ugbt			:	process	ugbt;
			user			:	device	user;
		
		connections
			c4	:	port	ETH1 -> ugbt.p_in;
			c5	:	port	user.p_out -> ugbt.p_in;
			
			
		
		annex EMV2{**
			use types	emv2_errortype_definition, ErrorLibrary;
			use behavior ErrorLibrary::PermanentTransientFailure; 
			
			error propagations
				ETH1	:	in propagation{CCUS_Error, BTCU_Error};
			--flows
			--	ef1	:	error sink ETH1{CCUS_Error, BTCU_Error};
			end propagations;
			
			composite error behavior
			states
				[ugbt.FailedTransient]-> FailedTransient;
				[ugbt.FailedPermanent]-> FailedPermanent;
			end composite;
			
			properties
				emv2::occurrencedistribution => [ probabilityValue => 0.05e-6 ;] applies to Failure;	
		**};
	end TDD1.i;
	
	
	-------------------------------------------------------------------------------------------------------------------------------------------
	--implementation of system
	system implementation sys.i
		subcomponents
			BTCU	:	device BTCU.i;
			CCUS1	:	system CCUS1.i;
			TDD1	:	system TDD1.i;
			
		connections
			c0	:	port BTCU.MVB1 <-> CCUS1.MVB1;
			c1	:	port CCUS1.ETH1 <-> TDD1.ETH1;
			c2	:	port CCUS1.MVB1 -> BTCU.MVB1;
			c3	:	port TDD1.ETH1 -> CCUS1.ETH1;
			
			
		annex EMV2{**
			use types	emv2_errortype_definition, ErrorLibrary;
			use behavior ErrorLibrary::PermanentTransientFailure; 
			
			composite error behavior
			states
				[BTCU.FailedTransient]-> FailedTransient;
				[CCUS1.FailedTransient]-> FailedTransient;
				[TDD1.FailedTransient]-> FailedTransient;
				[BTCU.FailedPermanent]-> FailedPermanent;
				[CCUS1.FailedPermanent]-> FailedPermanent;
				[TDD1.FailedPermanent]-> FailedPermanent;
			end composite;	
		**};	
	end sys.i;


end modeling_file;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment