Skip to content
Snippets Groups Projects
Commit 832e19bc authored by Yingjian's avatar Yingjian
Browse files

Initial commit

parents
Branches
No related tags found
No related merge requests found
Showing
with 202 additions and 0 deletions
# Hanoi_JastAdd
- [ ] ./gradlew build
- [ ] ./gradlew jarAll
- [ ] java -jar Hanoi-all.jar
If we regard Atom as the smallest element, then we are under the circumstance of propositional logic, each Atom is a statement.
However, proposition like "the pillar has no disk" is less flexable and lack reusablity. Therefore we introduce the definition for atoms in first order logic.
An atom stands for the relation of terms, of one term or no term(goes back to the definition of propositional logic).
A term stands for the function of variables or a variable or no variable(constant).
Therefore, we have binary relations:
Compare return Left<right
Equal return Left==right
Unary relations:
SelfComp return term<pre-setted number
SelfEq return term==pre-setted number
\ No newline at end of file
File added
apply plugin: 'java-library'
apply plugin: 'jastadd'
apply plugin: 'application'
apply plugin: 'com.google.protobuf'
mainClassName = 'de.tudresden.inf.st.ag.starter.StarterMain'
allprojects {
group 'de.tudresden.inf.st'
}
sourceCompatibility = 1.11
targetCompatibility = 1.11
configurations {
baseRuntimeClasspath
//ragconnectClasspath
grammar2umlClasspath
}
repositories {
mavenCentral()
jcenter()
maven {
name "gitlab-maven"
url "https://git-st.inf.tu-dresden.de/api/v4/groups/jastadd/-/packages/maven"
}
}
buildscript {
repositories.jcenter()
dependencies {
classpath 'org.jastadd:jastaddgradle:1.13.3'
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.16'
}
}
dependencies {
//ragconnectClasspath group: 'de.tudresden.inf.st', name: 'ragconnect', version: '0.3.1'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${jackson_version}"
implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: "${jackson_version}"
api group: 'com.google.protobuf', name: 'protobuf-java', version: '3.0.0'
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.2'
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.2'
implementation group: 'org.apache.logging.log4j', name: 'log4j-jul', version: '2.11.2'
implementation group: 'org.fusesource.mqtt-client', name: 'mqtt-client', version: '1.15'
jastadd2 group: 'org.jastadd', name: 'jastadd', version: '2.3.5'
grammar2umlClasspath group: 'de.tudresden.inf.st', name: 'grammar2uml', version: '0.1.1'
}
File protoSrc = file("src/main/common/proto")
File genSrc = file("src/gen/java")
sourceSets.main.java.srcDir genSrc
sourceSets.main.proto.srcDir protoSrc
// idea.module.generatedSourceDirs += genSrc
//File robotModel = file('./src/main/jastadd/robot/RobotModel.relast')
//File componentModel = file('./src/main/jastadd/component/ComponentModel.relast')
File queen = file('./src/main/jastadd/UseCase/8q.relast')
File Constraint = file('./src/main/jastadd/UseCase/Constraint_Model.relast')
//File actionModel = file('./src/main/jastadd/action/ActionModel.relast')
//File containerModel = file('./src/main/jastadd/container/ContainerModel.relast')
protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.0.0'
}
generateProtoTasks {
all().each { task ->
}
ofSourceSet('main')
}
}
def relastFiles = ['src/main/jastadd/UseCase/Constraint_Model.relast', "src/main/jastadd/UseCase/8q.relast"]
test {
include 'src/main/java/de/tudresden/inf/st/ag/starter/**'
testLogging {
events 'passed', 'failed'
showExceptions = true
showStackTraces = true
exceptionFormat = 'full'
}
}
task jarAll(type: Jar) {
destinationDir = projectDir
manifest.attributes 'Main-Class': 'de.tudresden.inf.st.ag.starter.StarterMain'
baseName = "${project.name}-all"
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
clean.dependsOn 'cleanJarAll'
task cleanJarAll(type: Delete) {
delete jarAll.outputs.files
}
task relast(type: JavaExec) {
group = 'Build'
main = "-jar"
args(["./libs/relast.jar",
"--grammarName=./src/gen/jastadd/ag",
"--useJastAddNames",
"--listClass=java.util.ArrayList",
"--jastAddList=JastAddList",
"--resolverHelper",
"--file"]
+
relastFiles)
inputs.files relastFiles
outputs.files("./src/gen/jastadd/ag.ast",
"./src/gen/jastadd/ag.jadd")
}
task grammar2uml(type: JavaExec) {
group = 'Build'
main = 'de.tudresden.inf.st.jastadd.grammar2uml.compiler.Compiler'
classpath = configurations.grammar2umlClasspath
args([
'--verbose',
//constraintModel,
queen,
])
}
jastadd {
configureModuleBuild()
modules {
module("ag") {
java {
basedir "."
include "ag/src/main/**/*.java"
include "ag/src/gen/**/*.java"
}
jastadd {
basedir "./"
include "src/main/jastadd/**/*.ast"
include "src/main/jastadd/**/*.jadd"
include "src/main/jastadd/**/*.jrag"
include "src/gen/jastadd/*.ast"
include "src/gen/jastadd/*.jadd"
include "src/gen/jastadd/*.jrag"
}
}
}
cleanGen.doFirst {
delete "src/gen/java/org"
delete "src/gen-res/BuildInfo.properties"
}
preprocessParser.doFirst {
args += ["--no-beaver-symbol"]
}
module = "ag"
//astPackage = "AST"
astPackage = 'org.jastadd.ag.ast'
genDir = 'src/gen/java'
buildInfoDir = 'src/gen-res'
extraJastAddOptions = [
'--lineColumnNumbers',
'--List=JastAddList',
'--cache=all',
"--flush=api",
"--incremental=param",
"--tracing=cache,flush",
]
}
generateAst.dependsOn relast
\ No newline at end of file
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment