Skip to content

Commit

Permalink
Added first requirement for lobster-trlc (#90)
Browse files Browse the repository at this point in the history
Co-authored-by: Christoph Klöffel <[email protected]>
  • Loading branch information
phiwuu and christophkloeffel authored Oct 11, 2024
1 parent ac92a68 commit 5966e49
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lobster/tools/trlc/requirements.rsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package trlc_req

type Tool_Requirement {
description '''
The content of the requirement.
A tool requirement describes the behaviour of a lobster tool from the point of view of the user.
It does not describe implementation details.
''' String
}
8 changes: 8 additions & 0 deletions lobster/tools/trlc/requirements.trlc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package trlc_req

Tool_Requirement OUTPUT_FILE {
description = '''
If a output file is specified as command line argument, then the output must be written into that file.
Otherwise, the output shall be written to 'trlc.lobster'.
'''
}
2 changes: 2 additions & 0 deletions lobster/tools/trlc/trlc.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ def main():
help=("name of lobster-trlc config file, "
"by default %(default)s"),
default="lobster-trlc.conf")
# lobster-trace: trlc_req.OUTPUT_FILE
ap.add_argument("--out",
help=("name of output file, "
"by default %(default)s"),
Expand Down Expand Up @@ -438,6 +439,7 @@ def main():
return 1

with open(options.out, "w", encoding="UTF-8") as fd:
# lobster-trace: trlc_req.OUTPUT_FILE
lobster_write(fd = fd,
kind = Requirement,
generator = "lobster-trlc",
Expand Down

0 comments on commit 5966e49

Please sign in to comment.