Giter Club home page Giter Club logo

requs's Introduction

EO principles respected here Managed by Zerocracy DevOps By Rultor.com We recommend IntelliJ IDEA

mvn codecov PDD status Maven Central Hits-of-Code Lines of code

REQUS is a controlled natural language (CNL) for requirements specifications. It is explained in details in this paper, which was published in the Proceedings of the 1st ACM SIGPLAN International Workshop on Beyond Code: No Code (BCNC). More details about REQUS syntax you can find at www.requs.org.

In order to use it in a Java project, just add this plugin to your pom.xml (get the latest version from here):

<reporting>
  <plugins>
    <plugin>
      <groupId>org.requs</groupId>
      <artifactId>requs-maven-plugin</artifactId>
      <version>...</version>
    </plugin>
  </plugins>
</reporting>

Then, add REQUS files to src/main/requs and name them as main.req, etc.

Then, run mvn clean site and you will see a report at target/site/requs.

How to contribute?

Fork the repository, make changes, submit a pull request. We promise to review your changes same day and apply to the master branch, if they look correct.

Please run Maven build before submitting a pull request:

$ mvn clean install -Pqulice

To render the site and edit its pages:

$ cd jekyll
$ bundle install
$ bundle exec jekyll serve --drafts

requs's People

Contributors

nikzor avatar renovate[bot] avatar v-karbovnichy avatar yegor256 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

requs's Issues

Trailing spaces bug

Curious parser behavior:

MeanTimeToRecovery is "time that System spends in unscheduled down time until recovery as a result of failure.
MTTR is a measure of System reliability via service recovery and therefore the MTTR target should be set at the lowest achievable number".

At the end of first sentence, after word 'failure' and period, there is a space and then carriage return before new line starts. Building this locally results in a successful build. But rultor-guard could not merge this due to the following error:

[ERROR] /src/main/requs/main.req[6]: Line has trailing spaces. (RegexpSinglelineCheck)
[INFO] Read our quality policy: http://www.qulice.com/quality.html
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:12 min
[INFO] Finished at: 2014-05-12T19:58:35+00:00
[INFO] Final Memory: 21M/50M
[INFO] ------------------------------------------------------------------------

I have just re-produced this bug locally and confirmed that this is not considered a bug during local

mvn clean requs:compile

.and is considered a bug during rultor-guard merge attempt. So I don't know if requs is wrong or rultor-guard is wrong.

trailingspaces

UML diagrams generation

We have a strict syntax for use cases and entities / relations which ensures somewhat consistent object and use cases model.

Can we implement auto-generation of UML Use case and Class diagrams during requs code compiling? I believe it would make compiled SRS much more clear and intuinive, therefore, easier to understand.

For instance, in can be an SVG graphics in the beginning of main SRS page with clickable shapes leading to their definition on the same page below.

input stream should not be mandatory if -?h provided

migrated from Trac, where originally posted by yegor256 on 27-Dec-2010 7:49pm

If an option is provided input stream shouldn't be mandatory, e.g.:

java -jar rqdql-2.0-SNAPSHOT-bin.jar -?

Such a call is waiting for some input, and it's not a correct behavior.

Informal content causes build error within UC flow

This code

User is "a human being".
Anonymous is "a person who is not identified in the system".

UC1 where Anonymous(a anonymous) signs up:
    1. The anonymous creates User(a user) "The system adds $5 to his balance".

builds with an error:

<error line="5" pos="42" type="syntax">extraneous input 'The system adds $5 to his balance' expecting {';', '.'}</error>

Expected to be no errors because any string within (" ") should be considered as informal content.

This code builds with no errors (same as previous except the informal content that is moved to the second flow:

User is "a human being".
Anonymous is "a person who is not identified in the system".

UC1 where Anonymous(a anonymous) signs up:
    1. The anonymous creates User(a user);
    2. "The system adds $5 to his balance".

Requs demo does not work in IE8

I'm not sure if Requs demo http://demo.requs.org/ is supposed to work with IE8, but when I tried it it seems not working.
Regardless of text entered in "Requirement" box, in "XML output2 box there are only: "...." written. No "error" or anything else.

Please investigate.

jcabi-maven-skin

migrated from Trac, where originally posted by yegor on 11-Nov-2012 1:11pm

let's use it

Business Requirements or Specifications

While using requs for technical specifications, our team is raising a question concerning documenting business cases, business logic and other information that is still critical to development but is non-technical.

Perhaps it would be a good idea to add a business requirement specification module.

Compiled SRS improvement: show the object type within the declaration of a use case

This code:

UC1 where User (a user) goes through life cycle of Repository(a repo):

after compilation looks like:

UC1 where user goes through life cycle using repo:

"repo" is the name of an object instance. It can be any camel case string. Although it shown as a link to object type definition, it is not clear what type does an object have when one reads the use case declaration.

Maybe this text would be less ambiguous?

UC1 where user goes through life cycle using Repository(a repo):

What is the meaning of "needs" in Requs?

When browsing edit for other project, I noticed following code that uses word "needs",where there should be "includes". Please explain, as I can be wrong, following to my history ;)

"Repository is "a storage of source code together with Dockerfile".

Repository needs:
    name as "a unique name of the repo in user's account",
    URI as "a non-ambiguous descriptor of a repo, for example ssh://git@github:yegor256/thindeck.git",
    key as "a private SSH key, see http://en.wikipedia.org/wiki/Public-key_cryptography".

Repository includes:
    deployment-s? as Deployment."

However when reading this text on web page https://github.com/yegor256/thindeck/blob/master/src/main/requs/main.req it does not contain verb "needs", only "includes" - Please clarify.

acronyms

Let's make it possible to define acronyms and use them in the text. NFRs should be based on them too.

What attributes should we use and when?

In yegor256's article nothing is said about the attributes, though we have some in thindeck project.
For instance:

2edb8f:UC1 is specified.
2edb8f:UC1 is a must.
UC1 where User (a user) hosts Repository (a repo):

Maybe this issuse should be in thindeck project. However, I've already moved here one issue related to the article, that is why I create this issue in requs project.

Compiled SRS: Use Case alternate flows are a bit ambiguous

@yegor256, Alternative flows of use cases are now shown as:

uc_alternate_flows

It is a bit ambiguous, as if (2) is being executed in any case, while its alternative - only if "when" clause is true.

Maybe it would be more clear if it looked something like:

  1. ...
  2. when "a condition of alternative flow"
    (alternative flow)
    otherwise
    (normal flow)

Create a plugin for some editor to highlight requs syntax

This issue continues my question in #46. The article had a nice syntax highlighting before it was updated. Can I have that or any kind of highlighting in editor which I use for requs files? What editor should I use, what plugins should I install or how should I change the editor's config?

to implement Trac plugin entirely here

migrated from Trac, where originally posted by yegor256 on 14-Feb-2011 7:49am

The plugin is currently implemented in Fazend project in PHP. We should migrate it here and implement in Python

to embed Python plugin into Maven build cycle

migrated from Trac, where originally posted by yegor256 on 31-May-2011 5:30am

this is a sub-task of #5

We should embed Python plugin into Maven build cycle. Mandatory steps of the build cycle are:

  • unit tests
  • code coverage analysis
  • python coding standards validation (with PyLint, I think)
  • some other static code analysis check

Add unit-tests to plugin

migrated from Trac, where originally posted by maxim on 9-Jun-2011 8:50pm

This is a sub-task of #7

All test should be runned from tests.py.
Code coverage must be at least 80%

Budget 2 hours

The article about requs syntax contains errors in examples

This code from the article does not work:

UC8.1 where User (a user) shares Image with User (a friend):
  1. The user creates Image (a photo).
  2. The user updates the friend "selecting one of his contacts".
  3. The photo converts "to the right PNG format, 600x600 maximum".
  4. The friend receives email using SmtpServer.
  5. The friend reads the photo "in his own web page".

Flows must end with ";", except for the last one which must end with "."

Is it a bug? Or I shouldn't report such things?

to specify initial requirements

migrated from Trac, where originally posted by yegor256 on 27-Dec-2010 1:17pm

We have to specify initial requirements in the [wiki:SRS] document.

Seal auto-populate

Related to #30
The seal process flow is such that:

  1. User wants to seal an attribute
  2. User sets junk seal value
  3. User compiles
  4. User reads compilation error and gets seal value from message
  5. User updates code to reflect correct seal based on the code listed during compilation error message
  6. User compiles
  7. END if compilation successful, go to 4 if build fails

IMHO the fact that a compilation must fail in order for user to obtain the seal value, is counterproductive.

I understand the value of seals as a protection measure when a sealed code segment is being updated, but if a new attribute or previously not sealed attribute is being sealed, I think there should be a shortcut to auto-populate the seal during compilation without having to read the error message, getting the value, updating the code & recompiling.

add "markdown" to every use case

Let's generate a full markdown description of every use case. The description should include all details of it, including depending types. It will be rather long.

UML diagrams generation

We have a strict syntax for use cases and entities / relations which ensures somewhat consistent object and process model.

Can we implement auto-generation of UML Use case and Class diagrams during requs code compiling? I believe it would make compiled SRS much more clear and intuinive, therefore, easier to understand.

For instance, in can be an SVG graphics in the beginning of main SRS page with clickable shapes leading to their definition on the same page below.

Lists elementary use case is not recognized by parser

This code:

Repository is "something".
User is "someone".

UC1 where User (a user) hosts Repository (a repo):
    1. The user lists Repository(a repoList).

causes an error on demo page:

<error line="5" pos="0" type="seal">Step "1" refers to a non-existing use case "lists"</error>

I guess, the reason is either a bug in parser or I use incorrect syntax. If latter is the case (well, if not, too), I suggest to add examples of each elementary use case to requs syntax page.

Project Documentation: Attributes - seals

While working on another project using requs to document requirements, I couldn't find any info on:
how and when is a seal generated/calculated.
is this done by requs?

specifically i had issues with seal mismatch and couldn't find info on how to resolve it

Chrome and IE 11 show empty page when open requs main.xml

@yegor256, as you asked, I am adding the bug to requs project.

Current version of requs builds an XML that shows nothing if opened in Chrome or in IE 11. It works in Firefox though.

yegor256's article says:

Once compiled, I can open the SRS in any browser. It is in target/requs/index.xml. Even though it is an XML file, Google Chrome and Safari can open it as a webpage.

So, either an article should list compatible browsers or requs should provide XML/XSL compatible to each popular browser.

to implement skeleton in Java

migrated from Trac, where originally posted by yegor256 on 25-Dec-2010 6:48am

Skeleton of Java project should be implemented. Build process should be automated with Maven, and hooked to CI environment.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.