yulonglong / static-code-analyzer Goto Github PK
View Code? Open in Web Editor NEW(Completed). A software to thoroughly analyze and query "SIMPLE" programs.
(Completed). A software to thoroughly analyze and query "SIMPLE" programs.
as described in iteration 2
Yolim, please do duplicate checking for setUses(STMTNUM, VARNAME); and setModifies(STMTNUM, VARNAME);
Design Extractor
Explain decision decisions
Plus UML?
while i { //1
x = x + 2 * y; //2
call Third; //3
i = i - 1;} //4
Those variables that are modified and used by line 3 must be modified and used by line 1.
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!:)
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 such that all the data structures are hidden and only public APIs are available to other modules.
Fix wrong expected result in Queries6-1.txt
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
Development Plan for iterations
Testing Plans
Unit and System Test Case Documentation
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?
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 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.
Create thorough test cases as per iteration 1 requirement.
Import Static-Code-Analyzer from SVN to GitHub.
rewrite QueryParser to only store the synonym, after validation. (not storing attrName)
!!!FAILURES!!!
Test Results:
Run: 4 Failures: 2 Errors: 0
Create Design Extractor to create CFG
Used for Next, and Next* queries in Iteration 2.
Query Evaluator
After the PKB methods are available.
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.
Unit testing for the setting of modifies and uses relationships in the PKB.
Create a thorough unit testing for Revised Prototype.
Query Evaluator
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
Think of a scalable design for QueryEvaluator to support tuple and multiple clauses.
Refactor QueryDriver function.
Modifiy internal data structure of PKB to optimize query speed.
Update 2.4.2. query parser.
Update all APIs as necessary.
Include design decisions. (where necessary)
Include UML diagrams (where necessary)
Rewrite QueryParser to use new relationship class structure to store patternSyn.
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.
Please inform me (Kester) after you have decided on this and i will implement it.
Thorough unit testing for QueryParser required.
Some test cases in Queries6-1.txt failed, please fix the bugs.
2.3. Design Extractor
Explain decision decisions
Plus UML?
PKB
implement QueryParser as described in iteration 1.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.