Giter Club home page Giter Club logo

static-code-analyzer's People

Contributors

ipsita93 avatar lacienat avatar syiham avatar yolim avatar yulonglong avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

gongfupanada

static-code-analyzer's Issues

Iteration 1 Report Work

1.3. Development Plan
3.1. Testing plan for Iteration 1.
3.3. System Testing

FIll in the above sections as necessary.
When in doubt, refer to assignment PDF.

Overall, in charge of development schedules for each iteration and for testing schedules and test cases for each iteration!:)

Iteration 1 Report Work

FOR LACIE AND HISYAM

2.4.3. Query Evaluator
You guys divide into sections like With, Pattern....
I am not really sure how to divide.

Explain design and implementation decisions.
Refer to PDF when in doubt about what to write about.

Refactor PKB (Data hiding)

Refactor PKB such that all the data structures are hidden and only public APIs are available to other modules.

Iteration 1 Report Work

Update 2.2. PKB>
Update PKB API. (where necessary)
Include UML diagrams.
Explain design decisions!!
Refer to PDF when in doubt about what to put

Bug: Multiple unit tests for Design Extractor fails.

The DFSDriver runs well and generates the correct toposort queueToProcess in the first unit test case.
However, SUBSEQUENT unit test cases fail to produce the CORREC toposort queueToProcess.

PROBLEM in DFS?

Set modifies and uses for procedures and statements

Accommodate multiple procedures and modifies relationships between them.
Set modifies for procedures in the PKB.
Set modifies for calls statements in the PKB.

Do the above by following this algorithm:
Get callsTree from AST.
Run DFS on callsTree to generate toposort queue.
Dequeue the toposort queue one by one. For each entry:
e,g, 2, [3,8]

  • Find the min and max progline for the procedure 2.
  • For each of the prog lines i (from min to max):

    find all the variables v1 to vn modified. setModifiesProcedure(2, v1) to setModifiesProcedure(2, vn). setModifiesStatemment(3, v1) to setModifiesStatemment(3, vn).setModifiesStatemment(8, v1) to setModifiesStatemment(8, vn).
    find all the variables w1 to wn that are used by prog line i. Call the setUsesProcedure for each. And call the setUsesStatement for each too.

Fix failed UnitTest for QueryEvaluator

!!!FAILURES!!!
Test Results:
Run: 4 Failures: 2 Errors: 0

  1. test: QueryEvaluatorTest::testEvaluateFollows (F) line: 80 QueryEvaluatorTest.cpp
    equality assertion failed
  • Expected: 7
  • Actual : -1
  1. test: QueryEvaluatorTest::testEvaluateModifies (F) line: 391 QueryEvaluatorTest.cpp
    equality assertion failed
  • Expected: x
  • Actual :

Construct the CFG

Create Design Extractor to create CFG
Used for Next, and Next* queries in Iteration 2.

Create QueryValidator

Create QueryValidator to validate queries after parsing.

E.g. variable a; Select a such that Modifies(a,2)
It is an invalid query as Modifies does not accept constant as second argument.

Fix pattern bug

These are the wrong answer i could spot, there might be more.
Please let me know if our program answers are wrong, or the expected output are wrong.

out5-1.xml

assign a, a1; Select a such that Follows(a1, a) pattern a1(,"Romeo"_)
stuans : 2,3,14,15
correct : 14

while w; assign a; Select w such that Follows(w,a) pattern a("x",_)
stuans : 5,9,16
correct : 16

assign a, a1; variable v; Select a such that Uses (a, v) pattern a1(v,_)
stuans : 3,6,8,10,13,15,17,18,20
correct : 3,10,13,15,17,18,20

assign a; stmt s; Select s such that Parent(s,a) pattern a("x",_)
stuans : 4,5,7,9,11,12,16
correct : 9,11

while w; assign a; Select w such that Parent(w,a) pattern a(,"x"_)
stuans : 4,5,7,9,11,12,16
correct : 9,11

Iteration 1 Report Work

Update 2.4.2. query parser.
Update all APIs as necessary.
Include design decisions. (where necessary)
Include UML diagrams (where necessary)

Iteration 1 Report Work

FOR LACIE AND HISYAM

2.4.3. Query Evaluator
You guys divide into sections like With, Pattern....
I am not really sure how to divide.

Explain design and implementation decisions.
Refer to PDF when in doubt about what to write about.

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.