Coder Social home page Coder Social logo

decide's Introduction

Decide

The project is an implementation of an anti-ballistic missile system's launch interceptor program based on An experimental evaluation of the assumption of independence in multiversion programming by J. C. Knight and N. G. Leveson from 1986.

Short overview

The project provides a class AntiMissileSystem with a method decide() that generate a boolean signal which determines whether an interceptor should be launched based upon input radar tracking information (e.g. an array of 2D-coordinates, representing the missile's position at different points in time). The input radar tracking information is provided when an object of AntiMissileSystem is constructed together with additional information about the configuration of the system.

Besides the AntiMissileSystem class the project contains the classes Parameters which is a helper class to keep track of the system's configurations, a Point class to help represent the input radar tracking information and a Connector enumeration class used to describe certain aspects of the system's configuration. All of these can be found in the main subfolder.

Requirements

  • Java JDK: 1.8 or higher
  • Maven: 3.5.2 or higher

User manual

To use the anti-ballistic missile system simply create an instance of the AntiMissileSystem class providing the following parameters:

  • numPoints: the number of planar data points from the radar tracking
  • points: an array of Point instances representing the missiles position at different points in time
  • parameters: an instance of the Parameters class configured with the correct parameter values for the system
  • lcm: the logical connector matrix for the system in the form of a 15x15 symmetric matrix consisting of Connector enum types.
  • puv: the preliminary unlocking vector for the system in the form of a 15 element boolean vector.

After an instance has been created simply call the decide()method and an answer will be provided based on the data provided and the configuration of the system.

Testing

The anti-ballistic system has been tested using happy path tests, all of which can be found in the AntiMissileSystemTest class in the test subfolder.

Built With

  • Maven - Dependency Management

Contributions

  • Johannes Westlund

    • Helped create the skeleton for the project.
    • Implemented the requirements of LIC 2.
    • Implemented the requirements of LIC 3.
    • Implemented the requirements of LIC 9.
    • Implemented the requirements of LIC 10.
    • Implemented the requirements of LIC 11.
    • Implemented the requirements of LIC 12.
  • Kai Böhrnsen

    • Helped create the skeleton for the project.
    • Implemented the setup of Maven as the build tool.
    • Implemented the requirements of LIC 0.
    • Implemented the requirements of LIC 1.
    • Implemented the requirements of LIC 14.
  • Sara Ervik

    • Helped create the skeleton for the project.
    • Set up Slack channel for communication.
    • Implemented the requirements of LIC 5.
    • Implemented the requirements of LIC 6.
    • Implemented the requirements of LIC 7.
  • Madeleine Berner

    • Helped create the skeleton for the project.
    • Created Wiki on GitHub.
    • Created How-we-code in Wiki.
    • Implemented the requirements of LIC 4.
    • Implemented the requirements of LIC 8.
  • Oscar Melin

    • Helped create the skeleton for the project.
    • Implemented requirements of LIC 13 and generateFUV.
    • Implemented global helper function inCircle and areAllTrue.
    • Code review and test writing.
    • All around inspiration to team.

For more detailed information see closed issues.

Abbreviations

LIC: Launch Interceptor Condition

decide's People

Contributors

bohrnsen avatar interpreter95 avatar oscarmelin avatar fluffigpegasus avatar

Stargazers

. avatar Alfaxad Eyembe avatar  avatar  avatar  avatar  avatar  avatar  avatar Sara Wallebo avatar

Watchers

 avatar  avatar  avatar  avatar Peter Aren Gambo avatar

Forkers

swaggytyrion

decide's Issues

Fix bug in current project

Add "@test" on the line above void testLic7() { in the AntiMissileSystemTest.java file to ensure that the function is interpreted as a test by junit.

inCircle doesn't take notice of point on circle radius

Currently the function inCircle strictly compares the calculated radius "r" with the fixed radius parameter "radius" ( r < radius). It should be non-strict if we want to make sure it returns true for points on the circle created by the fixed radius ( r <= radius).

CMV - that cannot be contained within or on a circle of radius

LIC 13:

There exists at least one set of three data points, separated by exactly A PTS and B PTS consecutive intervening points, respectively, that cannot be contained within or on a circle of radius RADIUS1. In addition, there exists at least one set of three data points (which can be the same or different from the three data points just mentioned) separated by exactly A PTS and B PTS consecutive intervening points, respectively, that can be contained in or on a circle of radius RADIUS2. Both parts must be true for the LIC to be true. The condition is not met when NUMPOINTS < 5.
0 ≤ RADIUS2

CMV - three data points, separated by exactly E and F points, a triangle with area greater than A

There exists at least one set of three data points, separated by exactly E PTS and F PTS con- secutive intervening points, respectively, that are the vertices of a triangle with area greater than AREA1. In addition, there exist three data points (which can be the same or different from the three data points just mentioned) separated by exactly E PTS and F PTS consec- utive intervening points, respectively, that are the vertices of a triangle with area less than AREA2. Both parts must be true for the LIC to be true. The condition is not met when NUMPOINTS < 5.
0 ≤ AREA2

CMV - two data points, separated by exactly K consecutive intervening points, distance greater than the length

There exists at least one set of two data points, separated by exactly K PTS consecutive intervening points, which are a distance greater than the length, LENGTH1, apart. In addi- tion, there exists at least one set of two data points (which can be the same or different from the two data points just mentioned), separated by exactly K PTS consecutive intervening points, that are a distance less than the length, LENGTH2, apart. Both parts must be true for the LIC to be true. The condition is not met when NUMPOINTS < 3.
0 ≤ LENGTH2

See Table 1 in the pdf

CMV - three data points separated by exactly C and D that form an angle

There exists at least one set of three data points separated by exactly C PTS and D PTS consecutive intervening points, respectively, that form an angle such that:
angle < (PI − EPSILON) or
angle > (PI + EPSILON)
The second point of the set of three points is always the vertex of the angle. If either the first point or the last point (or both) coincide with the vertex, the angle is undefined and the LIC is not satisfied by those three points. When NUMPOINTS < 5, the condition is not met.
1≤C PTS,1≤D PTS
C PTS+D PTS ≤ NUMPOINTS−3

CMV - three consecutive data points which form an angle

There exists at least one set of three consecutive data points which form an angle such that: angle < (PI − EPSILON)
or
angle > (PI + EPSILON)
The second of the three consecutive points is always the vertex of the angle. If either the first point or the last point (or both) coincides with the vertex, the angle is undefined and the LIC is not satisfied by those three points.
(0 ≤ EPSILON < PI)

Putting it all together (BIG ISSUE)

Write the decide() method that uses the LICs to generate the CMV and from there combine the CMV with the LCM (see exercise description) to form the PUM. Then from the PUM generate the FUV which will at last give the final answer and output either "YES" or "NO".

CMV - consecutive data points that lie in more than quadrants

There exists at least one set of Q PTS consecutive data points that lie in more than QUADS quadrants. Where there is ambiguity as to which quadrant contains a given point, priority of decision will be by quadrant number, i.e., I, II, III, IV. For example, the data point (0,0) is in quadrant I, the point (-l,0) is in quadrant II, the point (0,-l) is in quadrant III, the point (0,1) is in quadrant I and the point (1,0) is in quadrant I.
(2 ≤ Q PTS ≤ NUMPOINTS), (1 ≤ QUADS ≤ 3)

Write README

The README should include a short summary and every group members contribution.

CMV - consecutive data points such that at least one of the points lies a distance greater than DIST

There exists at least one set of N PTS consecutive data points such that at least one of the points lies a distance greater than DIST from the line joining the first and last of these N PTS points. If the first and last points of these N PTS are identical, then the calculated distance to compare with DIST will be the distance from the coincident point to all other points of the N PTS consecutive points. The condition is not met when NUMPOINTS < 3.
(3 ≤ N PTS ≤ NUMPOINTS), (0 ≤ DIST)

lic6

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.