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

v1 syntax errors #250

Closed
dordow opened this issue Mar 14, 2020 · 3 comments
Closed

v1 syntax errors #250

dordow opened this issue Mar 14, 2020 · 3 comments
Assignees
Labels

Comments

@dordow
Copy link

dordow commented Mar 14, 2020

OCARINA VERSION:

Ocarina 2017.x (Working Copy from rd018610)
Copyright (c) 2003-2009 Telecom ParisTech, 2010-2020 ESA & ISAE
Build date:

HOST MACHINE and OPERATING SYSTEM:

Arch Linux 5.5.8-arch1-1

COMPILER VERSION

n/a

DESCRIPTION:

I am new to AADL and to ocarina so this question may be stupid but I could not find a solution yet. I have defined a one package with a data definition in a file named data_defs.aadl, with the following
content:

package data_defs
public
  data mydata
  end mydata;

  data implementation mydata.impl
  end mydata.impl;
end data_defs;

In a separate file I define a system with a reference to that data definition:

package mysystem
public
  with data_defs;

  system mysystem
  features
    inport : in data port data_defs::mydata;
  end mysystem;

  system implementation mysystem.impl
  end mysystem.impl;
end mysystem;

When I run ocarina with
ocarina -vy -aadlv1 -p mysystem.aadl
I get the following error message:

mysystem.aadl:8:15: parsing Package_Specification, Empty packages are not allowed
mysystem.aadl:12:01: parsing AADL_Declaration, unexpected keyword 'end'
Cannot parse AADL specifications

When I run ocarina with AADL v2, it parses the specification. When I put all definitions in a single file, it also works with V1. What is my mistake? Is it not possible to use separate files with V1?
Thanks in advance
Frank

@yoogx
Copy link
Contributor

yoogx commented Mar 14, 2020

AADLv1 is the old version of the standard. v2 adds a couple of new keywords, one is "with" + true namespace. I would recommend you stick to v2, and uses OSATE as IDE to have quickfixes for this type of syntax errors.

@yoogx yoogx changed the title Distributing package definitions over separate files v1 syntax errors Mar 14, 2020
@yoogx yoogx self-assigned this Mar 14, 2020
@yoogx yoogx added the question label Mar 14, 2020
@yoogx yoogx closed this as completed Mar 16, 2020
@dordow
Copy link
Author

dordow commented Mar 18, 2020

Thank you for your explanation. It seems that v1 requires to have the full model in a single file. However, I will follow your advice and change to v2.
I prefer command line tools to Java/Eclipse for various reasons so ocarina fits my conditions better than OSATE.

@yoogx
Copy link
Contributor

yoogx commented Mar 18, 2020

Sure. I also prefer emacs + text editor.You may want to check this companion project:
https://github.com/OpenAADL/AADLib/

It has (basic) modes for vim and emacs + collection of examples

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

No branches or pull requests

2 participants