Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tla2bAST
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
general
stups
tla2bAST
Commits
19d463c3
Commit
19d463c3
authored
Oct 3, 2015
by
hansen
Browse files
Options
Downloads
Patches
Plain Diff
update build.gradle
parent
c8a1349a
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+2
-0
2 additions, 0 deletions
.gitignore
build.gradle
+1
-1
1 addition, 1 deletion
build.gradle
src/test/java/de/tla2b/util/TestUtil.java
+18
-18
18 additions, 18 deletions
src/test/java/de/tla2b/util/TestUtil.java
with
21 additions
and
19 deletions
.gitignore
+
2
−
0
View file @
19d463c3
...
@@ -19,3 +19,5 @@ Club_tla.mch
...
@@ -19,3 +19,5 @@ Club_tla.mch
testing
testing
Club.prob
Club.prob
TLA2B.jar
TLA2B.jar
src/test/resources/test
src/test/resources/bugs
This diff is collapsed.
Click to expand it.
build.gradle
+
1
−
1
View file @
19d463c3
...
@@ -38,7 +38,7 @@ dependencies {
...
@@ -38,7 +38,7 @@ dependencies {
compile
(
group:
'de.hhu.stups'
,
name:
'ltlparser'
,
version:
parser_version
)
compile
(
group:
'de.hhu.stups'
,
name:
'ltlparser'
,
version:
parser_version
)
testCompile
(
group:
'de.hhu.stups'
,
name:
'de.prob2.kernel'
,
version:
prob_version
)
//
testCompile (group: 'de.hhu.stups', name: 'de.prob2.kernel', version: prob_version)
testCompile
(
group:
'junit'
,
name:
'junit'
,
version:
'4.+'
)
testCompile
(
group:
'junit'
,
name:
'junit'
,
version:
'4.+'
)
}
}
...
...
This diff is collapsed.
Click to expand it.
src/test/java/de/tla2b/util/TestUtil.java
+
18
−
18
View file @
19d463c3
...
@@ -13,10 +13,10 @@ import de.be4.classicalb.core.parser.BParser;
...
@@ -13,10 +13,10 @@ import de.be4.classicalb.core.parser.BParser;
import
de.be4.classicalb.core.parser.exceptions.BException
;
import
de.be4.classicalb.core.parser.exceptions.BException
;
import
de.be4.classicalb.core.parser.node.Node
;
import
de.be4.classicalb.core.parser.node.Node
;
import
de.be4.classicalb.core.parser.node.Start
;
import
de.be4.classicalb.core.parser.node.Start
;
import
de.prob.scripting.Api
;
//
import de.prob.scripting.Api;
import
de.prob.statespace.StateSpace
;
//
import de.prob.statespace.StateSpace;
import
de.prob.statespace.Trace
;
//
import de.prob.statespace.Trace;
import
de.prob.statespace.Transition
;
//
import de.prob.statespace.Transition;
import
de.tla2b.exceptions.FrontEndException
;
import
de.tla2b.exceptions.FrontEndException
;
import
de.tla2b.exceptions.TLA2BException
;
import
de.tla2b.exceptions.TLA2BException
;
import
de.tla2b.output.ASTPrettyPrinter
;
import
de.tla2b.output.ASTPrettyPrinter
;
...
@@ -201,20 +201,20 @@ public class TestUtil {
...
@@ -201,20 +201,20 @@ public class TestUtil {
}
}
public
static
void
load_TLA_File
(
String
tlaFile
)
throws
Exception
{
public
static
void
load_TLA_File
(
String
tlaFile
)
throws
Exception
{
Api
api
=
de
.
prob
.
Main
.
getInjector
().
getInstance
(
Api
.
class
);
//
Api api = de.prob.Main.getInjector().getInstance(Api.class);
// TODO translate here and then pass the AST to api
//
// TODO translate here and then pass the AST to api
// Currently B definitions are not recognized by the api load command
//
// Currently B definitions are not recognized by the api load command
// Translator t = new Translator(tlaFile);
//
// Translator t = new Translator(tlaFile);
// Start start = t.translate();
//
// Start start = t.translate();
// ASTPrettyPrinter aP = new ASTPrettyPrinter(start);
//
// ASTPrettyPrinter aP = new ASTPrettyPrinter(start);
// start.apply(aP);
//
// start.apply(aP);
// System.out.println(aP.getResultString());
//
// System.out.println(aP.getResultString());
// StateSpace stateSpace = api.b_load(start);
//
// StateSpace stateSpace = api.b_load(start);
//
StateSpace
stateSpace
=
api
.
tla_load
(
tlaFile
);
//
StateSpace stateSpace = api.tla_load(tlaFile);
Trace
trace
=
new
Trace
(
stateSpace
);
//
Trace trace = new Trace(stateSpace);
Set
<
Transition
>
nextTransitions
=
trace
.
getNextTransitions
();
//
Set<Transition> nextTransitions = trace.getNextTransitions();
assertTrue
(
nextTransitions
.
size
()
>
0
);
//
assertTrue(nextTransitions.size() > 0);
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment