Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inox
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
Package Registry
Model registry
Operate
Environments
Terraform modules
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
LARA
inox
Commits
24a79f90
Commit
24a79f90
authored
10 years ago
by
Regis Blanc
Committed by
Etienne Kneuss
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add xlang section with some basic structure
parent
e9f45433
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/index.rst
+1
-1
1 addition, 1 deletion
doc/index.rst
doc/xlang.rst
+55
-0
55 additions, 0 deletions
doc/xlang.rst
with
56 additions
and
1 deletion
doc/index.rst
+
1
−
1
View file @
24a79f90
...
...
@@ -15,6 +15,7 @@ Contents:
installation
gettingstarted
purescala
xlang
verification
synthesis
repair
...
...
@@ -27,4 +28,3 @@ Indices and tables
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
This diff is collapsed.
Click to expand it.
doc/xlang.rst
0 → 100644
+
55
−
0
View file @
24a79f90
.. _xlang:
XLang
=====
To complement the core PureScala language, the XLang module of Leon brings a
few extensions to that core language.
These extensions are kept as an optional feature, that needs to be explicitly
enabled from the command line with the option ``--xlang``. If you do not specify
the option, Leon will reject any program making use of an XLang feature.
Technically, these extensions are implemented using a translation to PureScala.
This means They are not implemented in the back-end solving system of Leon, but
parsed in the the front-end and eliminate early during the Leon pipelining
process.
Imperative Code
---------------
XLang lets you introduce local variables in functions, and use Scala assignments
syntax.
.. code-block:: scala
def foo(x: Int): Int = {
var a = x
var b = 42
a = a + b
b = a
b
}
The above example illustrates three new features introduced by XLang:
1. Declaring a variable in a local scope
2. Blocks of statement
3. Assignment
While loops
Arrays
Nested function closure on local variables.
.. note::
some note comes here
Epsilon
-------
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