Skip to content
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

EM2TypeSetUtil.contains improvement #24

Closed
juli1 opened this issue Jun 25, 2013 · 1 comment
Closed

EM2TypeSetUtil.contains improvement #24

juli1 opened this issue Jun 25, 2013 · 1 comment

Comments

@juli1
Copy link
Contributor

@juli1 juli1 commented Jun 25, 2013

When running the following model, I have the error below. However, EarlyDelivery is a subtype of TimingError and this should not be an error. In addition, this type of error would rather be detected by the unhandledfault function.

Outgoing containment valueout{EarlyDelivery} does not contain error types listed by incoming containment valuein{TimingError}

The model:

package unhandled_faults

public

system sender
features
valueout : out event port;
end sender;

system implementation sender.i1
annex EMV2 {**
use types ErrorLibrary;

error propagations
    valueout : out propagation {ValueError};
flows
    f1 : error source valueout {ValueError};
end propagations;

**};
end sender.i1;

system implementation sender.i2
annex EMV2 {**
use types ErrorLibrary;

error propagations
    valueout : out propagation {TimingError};
flows
    f1 : error source valueout {TimingError};
end propagations;

**};
end sender.i2;

system implementation sender.i3
annex EMV2 {**
use types ErrorLibrary;

error propagations
    valueout : out propagation {EarlyDelivery};
flows
    f1 : error source valueout {EarlyDelivery};
end propagations;

**};
end sender.i3;

system receiver
features
valuein : in event port;
end receiver;

system implementation receiver.i1
annex EMV2 {**
use types ErrorLibrary;

error propagations
    valuein : in propagation {ValueError};
flows
    f1 : error sink valuein {ValueError}; 
end propagations;

**};
end receiver.i1;

system implementation receiver.i2
annex EMV2 {**
use types ErrorLibrary;

error propagations
    valuein : in propagation {TimingError};
flows
    f1 : error sink valuein {TimingError}; 
end propagations;

**};
end receiver.i2;

system implementation receiver.i3
annex EMV2 {**
use types ErrorLibrary;

error propagations
    valuein : in propagation {LateDelivery};
flows
    f1 : error sink valuein {LateDelivery}; 
end propagations;

**};
end receiver.i3;

system assembly
end assembly;

system implementation assembly.i
subcomponents
s1_1 : system sender.i1;
s1_2 : system sender.i1;
s2_1 : system sender.i2;
s2_2 : system sender.i2;
s3_1 : system sender.i3;
r1_1 : system receiver.i1;
r1_2 : system receiver.i1;
r2_1 : system receiver.i2;
r2_2 : system receiver.i2;
connections
c1 : port s1_1.valueout -> r1_1.valuein;
c2 : port s1_2.valueout -> r1_1.valuein;
c3 : port s3_1.valueout -> r2_1.valuein;
end assembly.i;

end unhandled_faults;

@reteprelief
Copy link
Contributor

@reteprelief reteprelief commented Jun 25, 2013

addressed by commit 4c79d6c
we now have a method that returns the intersection of type tokens between a type set and a type token as a list.
In other words the subset of type tokens of the specified type token that match the type set constraint.
For reporting purposes in the unhandled fault checker we would want to also have the complement, i.e., those type tokens not covered by the constraint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.