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

Property associations for behavior variables are not supported #2190

Closed
Etienne13 opened this issue Feb 6, 2020 · 2 comments · Fixed by #2192
Closed

Property associations for behavior variables are not supported #2190

Etienne13 opened this issue Feb 6, 2020 · 2 comments · Fixed by #2192
Assignees
Milestone

Comments

@Etienne13
Copy link
Contributor

Etienne13 commented Feb 6, 2020

Summary

In BA, property associations can be attached to behavior variables. This is particularly useful for variables initialization, as mentioned in issue #2184

Steps to Reproduce

The following model is not parsed correctly by the BA plugin

package issue2184_InitialValue
public
	with Base_Types;
	with Data_Model;
	
	process top
		features
			o1: out data port Base_Types::Integer_32;

		annex behavior_specification {**
          variables
            tmp :  Base_Types::Integer_32 {Data_Model::Initial_Value => ("1");};
          states
            a : initial final state;
          transitions
            t : a -[]-> a {
              o1 := tmp
            };
        **};
	end top;

	
end issue2184_InitialValue;

Environment

  • OSATE Version: Nightly
  • Operating System: Linux
@Etienne13
Copy link
Contributor Author

Etienne13 commented Feb 6, 2020

@lwrage I have to parse property associations with records. Is there a utility function to retreive the property object of the record from its name and the property it is associated with?
For example, I have a property association my_prop => [f1=>1;]; how to retrieve "f1" from its name (a String) and the object corresponding to my_prop?

@Etienne13
Copy link
Contributor Author

Etienne13 commented Feb 7, 2020

@lwrage I found how to do it just by getting the property type of my_prop, casting the type into a RecordTye and then taking the content. I don't think we need a utility function for this.

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

Successfully merging a pull request may close this issue.

2 participants