Skip to content

Commit 68b039d

Browse files
authored
Merge pull request #18 from SWAT-engineering/chore/update-latest-rascal-release
Chore/update latest rascal release
2 parents 6d5d502 + fee15b3 commit 68b039d

File tree

7 files changed

+6
-59
lines changed

7 files changed

+6
-59
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.idea
2-
Config.rsc
32

43
# Files generated for Rascal resources
54
src/*.rsc

RELEASE-NOTES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# to be written
2+

pom.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<dependency>
4949
<groupId>org.rascalmpl</groupId>
5050
<artifactId>rascal</artifactId>
51-
<version>0.40.4</version>
51+
<version>0.40.17</version>
5252
</dependency>
5353
<dependency>
5454
<groupId>edu.appstate.cs</groupId>
@@ -136,9 +136,8 @@
136136
<plugin>
137137
<groupId>org.rascalmpl</groupId>
138138
<artifactId>rascal-maven-plugin</artifactId>
139-
<version>0.27.5</version>
139+
<version>0.28.9</version>
140140
<configuration>
141-
<errorsAsWarnings>true</errorsAsWarnings>
142141
<enableStandardLibrary>false</enableStandardLibrary>
143142
<bin>${project.build.outputDirectory}</bin>
144143
<srcs>

src/main/rascal/lang/php/analysis/cfg/BuildCFG.rsc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ public set[Lab] init(Stmt s, LabelState lstate) {
487487
case unset(list[Expr] unsetVars) : return init(head(unsetVars), lstate);
488488
489489
// A use statement is atomic.
490-
case use(_,_,_) : return { s.lab };
490+
case useStmt(_,_,_) : return { s.lab };
491491
492492
// In a while loop, the while condition is executed first and thus provides the first label.
493493
case \while(Expr cond, _) : return init(cond, lstate);
@@ -836,7 +836,7 @@ private set[Lab] final(Stmt s, LabelState lstate) {
836836
}
837837
838838
// A use is treated as a unit
839-
case use(_,_,_) : {
839+
case useStmt(_,_,_) : {
840840
return { s.lab };
841841
}
842842

src/main/rascal/lang/php/stats/Stats.rsc

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -520,28 +520,6 @@ public map[str Product, str Version] getLatestPHP5VersionsByDate() {
520520
return ( p : last(v5l)[0] | p <- versions<0>, v5l := sort([ <v,d> | <v,d,pv,_> <- versions[p], "5" == pv[0] ],bool(tuple[str,str] t1, tuple[str,str] t2) { return t1[1] < t2[1]; }), !isEmpty(v5l) );
521521
}
522522
523-
public map[str Product, str Version] getLatestVersionsByVersionNumber() {
524-
versions = loadVersionsCSV();
525-
return ( p : last(vl)[0] | p <- versions<0>, vl := sort([ <v,d> | <v,d,_,_> <- versions[p] ],bool(tuple[str,str] t1, tuple[str,str] t2) { return compareVersion(t1[0],t2[0]); }) );
526-
}
527-
528-
public map[str Product, str Version] getLatestPHP4VersionsByVersionNumber() {
529-
versions = loadVersionsCSV();
530-
return ( p : last(v4l)[0] | p <- versions<0>, v4l := sort([ <v,d> | <v,d,pv,_> <- versions[p], "4" == pv[0] ],bool(tuple[str,str] t1, tuple[str,str] t2) { return compareVersion(t1[0], t2[0]); }), !isEmpty(v4l) );
531-
}
532-
533-
public map[str Product, str Version] getLatestPHP5VersionsByVersionNumber() {
534-
versions = loadVersionsCSV();
535-
return ( p : last(v5l)[0] | p <- versions<0>, v5l := sort([ <v,d> | <v,d,pv,_> <- versions[p], "5" == pv[0] ],bool(tuple[str,str] t1, tuple[str,str] t2) { return compareVersion(t1[0],t2[0]); }), !isEmpty(v5l) );
536-
}
537-
538-
public map[str Product, str Version] getLatestVersions() = getLatestVersionsByVersionNumber();
539-
540-
public map[str Product, str Version] getLatestPHP4Versions() = getLatestPHP4VersionsByVersionNumber();
541-
542-
public map[str Product, str Version] getLatestPHP5Versions() = getLatestPHP5VersionsByVersionNumber();
543-
544-
545523
public str getPHPVersion(str product, str version) {
546524
versions = loadVersionsCSV();
547525
return getOneFrom(versions[product,version,_]<0>);

src/main/rascal/lang/php/stats/Unfriendly.rsc

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,16 +1165,6 @@ public str groupsTable() = groupsTable({},{},{});
11651165
11661166
public list[str] getFeatureLabels() = [ l | \map(_,rtype) := #FMap.symbol, /Type::label(l,_) := rtype ];
11671167
1168-
public void checkGroups() {
1169-
labels = getFeatureLabels();
1170-
groups = getFeatureGroups();
1171-
//keys = [rascalFriendlyKey(k) | k <- (exprKeyOrder()+stmtKeyOrder())];
1172-
missing = {*labels} - {*groups[g] | g <- groups};
1173-
extra = {*groups[g] | g <- groups} - {*labels};
1174-
for (m <- missing) println("Missing: <m>");
1175-
for (e <- extra) println("Extra: <e>");
1176-
}
1177-
11781168
public str generalFeatureSquiglies(FMap featsMap) {
11791169
labels = getFeatureLabels();
11801170
groups = getFeatureGroups();
@@ -1419,27 +1409,6 @@ public FeatureLattice calculateTransitiveFiles(FeatureLattice lattice, FeatureNo
14191409
return lattice;
14201410
}
14211411
1422-
public void checkGroups() {
1423-
labels = [ l | \map(_,rtype) := #FMap.symbol, /Type::label(l,_) := rtype ];
1424-
groups = ("binary ops" : [ l | str l:/^binaryOp.*/ <- labels ])
1425-
+ ("unary ops" : [l | str l:/^unaryOp.*/ <- labels ])
1426-
+ ("control flow" : ["break","continue","declare","do","for","foreach","goto","if","return","switch","throw","tryCatch","while","exit","suppress","label"])
1427-
+ ("assignment ops" : [l | str l:/^assign.*/ <-labels] + ["listAssign","refAssign", "unset"])
1428-
+ ("definitions" : ["functionDef","interfaceDef","traitDef","classDef","namespace","global","static","const","use","include","closure"])
1429-
+ ("invocations" : ["call","methodCall","staticCall", "eval", "shellExec"])
1430-
+ ("allocations" : ["array","new","scalar", "clone"])
1431-
+ ("casts" : [l | str l:/^cast.*/ <- labels])
1432-
+ ("print" : ["print","echo","inlineHTML" ])
1433-
+ ("predicates" : ["isSet","empty","instanceOf"])
1434-
+ ("lookups" : ["fetchArrayDim","fetchClassConst","var","classConst","fetchConst","propertyFetch","fetchStaticProperty"])
1435-
;
1436-
keys = [rascalFriendlyKey(k) | k <- (exprKeyOrder()+stmtKeyOrder())];
1437-
missing = toSet(keys) - {*g|g<-groups<1>};
1438-
extra = {*g|g<-groups<1>} - toSet(keys);
1439-
for (m <- missing) println("Missing: <m>");
1440-
for (e <- extra) println("Extra: <e>");
1441-
}
1442-
14431412
public tuple[set[FeatureNode],set[str],int] minimumFeaturesForPercent(FMap fmap, FeatureLattice lattice, int targetPercent) {
14441413
println("Calculating coverage needed for <targetPercent>%");
14451414

0 commit comments

Comments
 (0)