Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
J
javawlp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
impresshs
javawlp
Commits
4c4a267b
Commit
4c4a267b
authored
6 years ago
by
Orestis Melkonian
Browse files
Options
Downloads
Patches
Plain Diff
Docs: minor fixes
parent
ce3c5a2d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/API.md
+4
-4
4 additions, 4 deletions
docs/API.md
docs/EDSL.md
+6
-1
6 additions, 1 deletion
docs/EDSL.md
with
10 additions
and
5 deletions
docs/API.md
+
4
−
4
View file @
4c4a267b
...
...
@@ -26,7 +26,7 @@ Enjoy!
pre(a > 2 || a == 2);
\
a = a * 2;
\
post(a > 4 || a == 4);
\
}
"
}
"
,
// optional control of which conditions to check
"
options
"
:
{
"
checkPre
"
:
true
,
"
checkPost
"
:
false
}
}
...
...
@@ -49,12 +49,12 @@ The JSON response has the following format:
<
var1
>
:
<
value1
>
<
var2
>
:
<
value2
>
...
}
}
,
/* in case of non-equivalence, we give all possible truth value-pairs of the specifications */
"
feedback
"
:
{
"
pre
"
:
[
/*both true*/
,
/*true, false*/
,
/*false, true*/
,
/*both false*/
],
"
post
"
:
[
/*both true*/
,
/*true, false*/
,
/*false, true*/
,
/*both false*/
]
}
}
,
"
err
"
:
/* an error occurred! */
}
```
...
...
@@ -83,7 +83,7 @@ There are 3 possible responses:
```
javascript
{
"
responseType
"
:
"
ResponseErr
"
,
"
err
"
:
"
(==): heterogeneous types
"
,
"
model
"
:
null
.
"
model
"
:
null
,
"
feedback
"
:
null
}
```
This diff is collapsed.
Click to expand it.
docs/EDSL.md
+
6
−
1
View file @
4c4a267b
...
...
@@ -39,18 +39,22 @@ We support the standard operations on arithmetic types (`Integer`, `Real`):
### Polymorphic equality
Any supported type can be compared for equality using the
`==`
operator, e.g.
Any supported type can be compared for equality using the
`==`
/
`!=`
operator, e.g.
```
java
public
static
void
fun
(
int
x
,
boolean
b
)
{
pre
(
x
==
1
);
pre
(
b
==
true
);
if
(
x
==
1
)
{
b
=
!
b
;
x
--;
}
post
(
b
==
false
);
post
(
x
!=
1
);
}
```
There is also a special form for performing null-checking on array
**variables**
, e.g.
`arr != null`
### Boolean expressions
Every pre/post-condition must be of
`Boolean`
type.
...
...
@@ -58,6 +62,7 @@ Every pre/post-condition must be of `Boolean` type.
The operations allowed on Booleans are:
*
`&&`
: logical conjunction, e.g.
`true && false`
*
`||`
: logical disjunction, e.g.
`true || false`
*
`!`
: logical negation, e.g.
`!(true || false)`
*
`imp`
: logical implication, e.g.
`imp(false, true && false)`
Here is an example specification making use of these operators:
...
...
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