Skip to content

Commit 40384be

Browse files
Organize folders
1 parent 0f95444 commit 40384be

File tree

39 files changed

+247
-250
lines changed

39 files changed

+247
-250
lines changed

.gitignore

Lines changed: 63 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,81 @@
1-
# Compiled class file
1+
# Compiled class files
22
*.class
33

4-
# Log file
4+
# Log files
55
*.log
6+
logs/
67

78
# BlueJ files
89
*.ctxt
910

1011
# Mobile Tools for Java (J2ME)
1112
.mtj.tmp/
1213

13-
# Package Files #
14+
# Package Files
15+
*.jar
1416
*.war
1517
*.nar
1618
*.ear
1719
*.zip
1820
*.tar.gz
1921
*.rar
2022

21-
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
23+
# JVM crash logs
2224
hs_err_pid*
25+
replay_pid*
26+
27+
# Maven specific
28+
target/
29+
pom.xml.tag
30+
pom.xml.releaseBackup
31+
pom.xml.versionsBackup
32+
pom.xml.next
33+
release.properties
34+
dependency-reduced-pom.xml
35+
buildNumber.properties
36+
.mvn/timing.properties
37+
.mvn/wrapper/maven-wrapper.jar
38+
39+
# Visual Studio Code specific
40+
.vscode/*
41+
!.vscode/settings.json
42+
!.vscode/tasks.json
43+
!.vscode/launch.json
44+
!.vscode/extensions.json
45+
*.code-workspace
46+
47+
# Local History for Visual Studio Code
48+
.history/
49+
50+
# Eclipse specific
51+
.classpath
52+
.project
53+
.settings/
54+
55+
# IntelliJ IDEA specific (just in case)
56+
.idea/
57+
*.iws
58+
*.iml
59+
*.ipr
60+
61+
# NetBeans specific (just in case)
62+
/nbproject/private/
63+
/nbbuild/
64+
/dist/
65+
/nbdist/
66+
/.nb-gradle/
67+
build/
68+
69+
# macOS specific
70+
.DS_Store
71+
72+
# Windows specific
73+
Thumbs.db
74+
ehthumbs.db
75+
Desktop.ini
76+
77+
# Linux specific
78+
*~
79+
80+
# Spoon processor output
81+
spooned/
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"java.configuration.updateBuildConfiguration": "automatic"
3+
}

examples/demo/pom.xml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>com.example</groupId>
8+
<artifactId>demo</artifactId>
9+
<version>1.0</version>
10+
11+
<name>demo</name>
12+
<!-- FIXME change it to the project's website -->
13+
<url>http://www.example.com</url>
14+
15+
<properties>
16+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
17+
<maven.compiler.source>20</maven.compiler.source>
18+
<maven.compiler.target>20</maven.compiler.target>
19+
</properties>
20+
21+
<dependencies>
22+
<dependency>
23+
<groupId>junit</groupId>
24+
<artifactId>junit</artifactId>
25+
<version>4.11</version>
26+
<scope>test</scope>
27+
</dependency>
28+
<dependency>
29+
<groupId>com.example</groupId>
30+
<artifactId>liquidjava-api</artifactId>
31+
<version>0.0.2-SNAPSHOT</version>
32+
<scope>system</scope>
33+
<systemPath>${project.basedir}/lib/liquidjava-api-0.0.2-SNAPSHOT.jar</systemPath>
34+
</dependency>
35+
</dependencies>
36+
37+
<build>
38+
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
39+
<plugins>
40+
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
41+
<plugin>
42+
<artifactId>maven-clean-plugin</artifactId>
43+
<version>3.1.0</version>
44+
</plugin>
45+
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
46+
<plugin>
47+
<artifactId>maven-resources-plugin</artifactId>
48+
<version>3.0.2</version>
49+
</plugin>
50+
<plugin>
51+
<artifactId>maven-compiler-plugin</artifactId>
52+
<version>3.8.0</version>
53+
</plugin>
54+
<plugin>
55+
<artifactId>maven-surefire-plugin</artifactId>
56+
<version>2.22.1</version>
57+
</plugin>
58+
<plugin>
59+
<artifactId>maven-jar-plugin</artifactId>
60+
<version>3.0.2</version>
61+
</plugin>
62+
<plugin>
63+
<artifactId>maven-install-plugin</artifactId>
64+
<version>2.5.2</version>
65+
</plugin>
66+
<plugin>
67+
<artifactId>maven-deploy-plugin</artifactId>
68+
<version>2.8.2</version>
69+
</plugin>
70+
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
71+
<plugin>
72+
<artifactId>maven-site-plugin</artifactId>
73+
<version>3.7.1</version>
74+
</plugin>
75+
<plugin>
76+
<artifactId>maven-project-info-reports-plugin</artifactId>
77+
<version>3.0.0</version>
78+
</plugin>
79+
</plugins>
80+
</pluginManagement>
81+
</build>
82+
</project>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
package com.example;
2+
3+
import liquidjava.specification.ExternalRefinementsFor;
4+
import liquidjava.specification.Ghost;
5+
import liquidjava.specification.Refinement;
6+
import liquidjava.specification.StateRefinement;
7+
8+
@ExternalRefinementsFor("java.util.ArrayDeque")
9+
@Ghost("int size")
10+
public interface ArrayDequeRefinements<E> {
11+
12+
public void ArrayDeque();
13+
14+
@StateRefinement(to="size(this) == (size(old(this)) + 1)")
15+
public boolean add(E elem);
16+
17+
@StateRefinement(to="size(this) == (size(old(this)) + 1)")
18+
public boolean offerFirst(E elem);
19+
20+
@StateRefinement(from="size(this) > 0", to = "size(this) == (size(old(this)))")
21+
public E getFirst();
22+
23+
@StateRefinement(from="size(this) > 0", to = "size(this) == (size(old(this)))")
24+
public E getLast();
25+
26+
@StateRefinement(from="size(this)> 0", to="size(this) == (size(old(this)) - 1)")
27+
public void remove();
28+
29+
@StateRefinement(from="size(this)> 0", to="size(this) == (size(old(this)) - 1)")
30+
public E pop();
31+
32+
@Refinement("_ == size(this)")
33+
public int size();
34+
35+
@Refinement("_ == (size(this) <= 0)")
36+
public boolean isEmpty();
37+
38+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.example;
2+
3+
import java.io.IOException;
4+
import java.util.ArrayDeque;
5+
6+
public class TestArrayDeque {
7+
8+
public static void main(String[] args) throws IOException{
9+
/*Uncomment Below*/
10+
ArrayDeque<Integer> p = new ArrayDeque<>();
11+
p.add(2);
12+
p.remove();
13+
p.offerFirst(6);
14+
p.getLast();
15+
p.remove();
16+
// p.getLast();
17+
p.add(78);
18+
p.add(8);
19+
p.getFirst();
20+
21+
22+
}
23+
24+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.example;
2+
import liquidjava.specification.Refinement;
3+
4+
5+
/**
6+
* Hello world!
7+
*
8+
*/
9+
public class TestSimple {
10+
11+
12+
public static void main( String[] args ){
13+
14+
@Refinement("a > 0")
15+
int a = 1;
16+
}
17+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package com.example;
2+
3+
import static org.junit.Assert.assertTrue;
4+
5+
import org.junit.Test;
6+
7+
/**
8+
* Unit test for simple App.
9+
*/
10+
public class AppTest
11+
{
12+
/**
13+
* Rigorous Test :-)
14+
*/
15+
@Test
16+
public void shouldAnswerWithTrue()
17+
{
18+
assertTrue( true );
19+
}
20+
}

part3-liquidJava/together1/.classpath

Lines changed: 0 additions & 7 deletions
This file was deleted.

part3-liquidJava/together1/.project

Lines changed: 0 additions & 28 deletions
This file was deleted.
-13 KB
Binary file not shown.

0 commit comments

Comments
 (0)