Skip to content

Commit

Permalink
Merge pull request #14 from cwi-swat/ready-for-tutor
Browse files Browse the repository at this point in the history
making php-analysis ready for tutor publication
  • Loading branch information
mahills authored Sep 21, 2023
2 parents e1d0203 + 5808dfa commit a1d16c3
Show file tree
Hide file tree
Showing 280 changed files with 5,050 additions and 249 deletions.
202 changes: 202 additions & 0 deletions CITATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
This is software will be directly citable via Zenodo soon. However, these are relavant publications
that you can cite in the mean time:

```bibtex
@article{DBLP:journals/scp/HillsKV17,
author = {Mark Hills and
Paul Klint and
Jurgen J. Vinju},
title = {Enabling {PHP} software engineering research in Rascal},
journal = {Sci. Comput. Program.},
volume = {134},
pages = {37--46},
year = {2017},
url = {https://doi.org/10.1016/j.scico.2016.05.003},
doi = {10.1016/j.scico.2016.05.003},
timestamp = {Wed, 14 Jun 2017 20:29:38 +0200},
biburl = {https://dblp.org/rec/journals/scp/HillsKV17.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
```

```bibtex
@inproceedings{DBLP:conf/scam/Anderson017,
author = {David Anderson and
Mark Hills},
title = {Supporting Analysis of {SQL} Queries in {PHP} AiR},
booktitle = {17th {IEEE} International Working Conference on Source Code Analysis
and Manipulation, {SCAM} 2017, Shanghai, China, September 17-18, 2017},
pages = {153--158},
publisher = {{IEEE} Computer Society},
year = {2017},
url = {https://doi.org/10.1109/SCAM.2017.23},
doi = {10.1109/SCAM.2017.23},
timestamp = {Fri, 24 Mar 2023 00:02:43 +0100},
biburl = {https://dblp.org/rec/conf/scam/Anderson017.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
```

```bibtex
@inproceedings{DBLP:conf/wcre/AndersonH17,
author = {David Anderson and
Mark Hills},
editor = {Martin Pinzger and
Gabriele Bavota and
Andrian Marcus},
title = {Query Construction Patterns in {PHP}},
booktitle = {{IEEE} 24th International Conference on Software Analysis, Evolution
and Reengineering, {SANER} 2017, Klagenfurt, Austria, February 20-24,
2017},
pages = {452--456},
publisher = {{IEEE} Computer Society},
year = {2017},
url = {https://doi.org/10.1109/SANER.2017.7884652},
doi = {10.1109/SANER.2017.7884652},
timestamp = {Fri, 24 Mar 2023 00:04:44 +0100},
biburl = {https://dblp.org/rec/conf/wcre/AndersonH17.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
```

```bibtex
@inproceedings{DBLP:conf/iwpc/Hills16,
author = {Mark Hills},
title = {Navigating the WordPress plugin landscape},
booktitle = {24th {IEEE} International Conference on Program Comprehension, {ICPC}
2016, Austin, TX, USA, May 16-17, 2016},
pages = {1--10},
publisher = {{IEEE} Computer Society},
year = {2016},
url = {https://doi.org/10.1109/ICPC.2016.7503709},
doi = {10.1109/ICPC.2016.7503709},
timestamp = {Thu, 23 Mar 2023 23:57:51 +0100},
biburl = {https://dblp.org/rec/conf/iwpc/Hills16.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
```

```bibtex
@inproceedings{DBLP:conf/kbse/Hills15,
author = {Mark Hills},
editor = {Myra B. Cohen and
Lars Grunske and
Michael Whalen},
title = {Variable Feature Usage Patterns in {PHP} {(T)}},
booktitle = {30th {IEEE/ACM} International Conference on Automated Software Engineering,
{ASE} 2015, Lincoln, NE, USA, November 9-13, 2015},
pages = {563--573},
publisher = {{IEEE} Computer Society},
year = {2015},
url = {https://doi.org/10.1109/ASE.2015.72},
doi = {10.1109/ASE.2015.72},
timestamp = {Fri, 24 Mar 2023 00:02:37 +0100},
biburl = {https://dblp.org/rec/conf/kbse/Hills15.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
```

```bibtex
@inproceedings{DBLP:conf/oopsla/Hills15,
author = {Mark Hills},
editor = {Harry Xu and
Walter Binder},
title = {Supporting {PHP} dynamic analysis in {PHP} AiR},
booktitle = {Proceedings of the 13th International Workshop on Dynamic Analysis,
WODA@SPLASH 2015, Pittsburgh, PA, USA, October 26, 2015},
pages = {37--38},
publisher = {{ACM}},
year = {2015},
url = {https://doi.org/10.1145/2823363.2823373},
doi = {10.1145/2823363.2823373},
timestamp = {Fri, 14 Apr 2023 23:05:46 +0200},
biburl = {https://dblp.org/rec/conf/oopsla/Hills15.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
```

```bibtex
@inproceedings{DBLP:conf/wcre/000115,
author = {Mark Hills},
editor = {Yann{-}Ga{\"{e}}l Gu{\'{e}}h{\'{e}}neuc and
Bram Adams and
Alexander Serebrenik},
title = {Evolution of dynamic feature usage in {PHP}},
booktitle = {22nd {IEEE} International Conference on Software Analysis, Evolution,
and Reengineering, {SANER} 2015, Montreal, QC, Canada, March 2-6,
2015},
pages = {525--529},
publisher = {{IEEE} Computer Society},
year = {2015},
url = {https://doi.org/10.1109/SANER.2015.7081870},
doi = {10.1109/SANER.2015.7081870},
timestamp = {Fri, 24 Mar 2023 00:04:45 +0100},
biburl = {https://dblp.org/rec/conf/wcre/000115.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
```

```bibtex
@inproceedings{DBLP:conf/csmr/HillsK14,
author = {Mark Hills and
Paul Klint},
editor = {Serge Demeyer and
Dave W. Binkley and
Filippo Ricca},
title = {{PHP} AiR: Analyzing {PHP} systems with Rascal},
booktitle = {2014 Software Evolution Week - {IEEE} Conference on Software Maintenance,
Reengineering, and Reverse Engineering, {CSMR-WCRE} 2014, Antwerp,
Belgium, February 3-6, 2014},
pages = {454--457},
publisher = {{IEEE} Computer Society},
year = {2014},
url = {https://doi.org/10.1109/CSMR-WCRE.2014.6747217},
doi = {10.1109/CSMR-WCRE.2014.6747217},
timestamp = {Fri, 24 Mar 2023 00:02:40 +0100},
biburl = {https://dblp.org/rec/conf/csmr/HillsK14.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
```

```bibtex
@inproceedings{DBLP:conf/kbse/HillsKV14,
author = {Mark Hills and
Paul Klint and
Jurgen J. Vinju},
editor = {Ivica Crnkovic and
Marsha Chechik and
Paul Gr{\"{u}}nbacher},
title = {Static, lightweight includes resolution for {PHP}},
booktitle = {{ACM/IEEE} International Conference on Automated Software Engineering,
{ASE} '14, Vasteras, Sweden - September 15 - 19, 2014},
pages = {503--514},
publisher = {{ACM}},
year = {2014},
url = {https://doi.org/10.1145/2642937.2643017},
doi = {10.1145/2642937.2643017},
timestamp = {Tue, 06 Nov 2018 16:58:23 +0100},
biburl = {https://dblp.org/rec/conf/kbse/HillsKV14.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
```

```bibtex
@inproceedings{DBLP:conf/issta/HillsKV13,
author = {Mark Hills and
Paul Klint and
Jurgen J. Vinju},
editor = {Mauro Pezz{\`{e}} and
Mark Harman},
title = {An empirical study of {PHP} feature usage: a static analysis perspective},
booktitle = {International Symposium on Software Testing and Analysis, {ISSTA}
'13, Lugano, Switzerland, July 15-20, 2013},
pages = {325--335},
publisher = {{ACM}},
year = {2013},
url = {https://doi.org/10.1145/2483760.2483786},
doi = {10.1145/2483760.2483786},
timestamp = {Sun, 02 Oct 2022 16:10:12 +0200},
biburl = {https://dblp.org/rec/conf/issta/HillsKV13.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
```
2 changes: 2 additions & 0 deletions FUNDING
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* NWO-I Centrum Wiskunde & Informatica (2013-...)
* Apalachean State University (2023-...)
11 changes: 11 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Copyright (c) 2013, NWO-I Centrum Wiskunde & Informatica (CWI), Mark Hills, Apalachean State University
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

2 changes: 1 addition & 1 deletion META-INF/RASCAL.MF
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Project-Name: php-analysis
Source: src/main/rascal
Source: src/main/rascal, src/test/rascal
Require-Libraries: |lib://rascal-git|
13 changes: 13 additions & 0 deletions build.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
#
# Copyright (c) 2013, NWO-I Centrum Wiskunde & Informatica (CWI), Mark Hills, Apalachean State University
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

bin.includes = META-INF/,\
bin/

14 changes: 14 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
Copyright (c) 2013, NWO-I Centrum Wiskunde & Informatica (CWI), Mark Hills, Apalachean State University
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<!-- WARNING: Eclipse auto-generated file.
Any modifications will be overwritten.
To include a user specific buildfile here, simply create one in the same
Expand Down
8 changes: 7 additions & 1 deletion doc/PhpAnnotations.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
title: PHP annotations
---

Here we document the PHP code annotations that are used and defined by different (static) analyses in this project.

Syntax of `@param`

```
Expand Down Expand Up @@ -34,4 +40,4 @@ Syntax of `@var`
@var mixed $in
@var \ClassObject $classObj
@var \Namespace\ClassObject $classObj
```
```
5 changes: 5 additions & 0 deletions doc/PhpConstraintOperations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: PHP Constraint Operations
---

(((TODO)))
6 changes: 6 additions & 0 deletions doc/declarations.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
title: Declarations
---

Here we document the qualified naming scheme for the locations we used.

* namespaces
* `|php+namespace:///a/b|` for namespace `A\B`
* `|php+namespace:///|` for global namespace
Expand Down
25 changes: 14 additions & 11 deletions doc/number_of_duplicate_classes.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,41 @@
---
title: Example statistics
---

This is a very simple example report that PHP analysis can produce.

# Some stats

---
* Total number of class decls: 4021
* Unique class paths: 4021 (100%)
* Unique class names: 3997 (99%)

---
* Total number of interfaces decls: 160
* Unique interfaces paths: 160 (100%)
* Unique interfaces names: 156 (97%)

---
* Total number of trait decls: 0
* Unique trait paths: 0 (0%)
* Unique trait names: 0 (0%)

---
* Total number of mixed decls: 4181
* Unique mixed paths: 4181 (100%)
* Unique mixed names: 4152 (99%)

Type | Total | Unique Paths* | Unique Names* | Number of non unique:
- | - | - | - | -
class | 4021 | 4021 (100%) | 3997 (99%) | 24
interface | 160 | 160 (100%) | 156 (97%) | 4
trait | 0 | 0 (100%) | 0 (100%) | 0
mixed | 4181 | 4181 (100%) | 4152 (99%) | 27
| Type | Total | Unique Paths | Unique Names | Number of non unique |
| - | - | - | - | - |
| class | 4021 | 4021 (100%) | 3997 (99%) | 24 |
| interface | 160 | 160 (100%) | 156 (97%) | 4 |
| trait | 0 | 0 (100%) | 0 (100%) | 0 |
| mixed | 4181 | 4181 (100%) | 4152 (99%) | 27 |

\* `Unique Paths` contain the namespace, `Unique Names` only the name of the class.

List of duplicate class names:



```
<a.x, 425234>
<b.y, 425234>
<c.x, 425234>
```
Loading

0 comments on commit a1d16c3

Please sign in to comment.