Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F2718223
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Feb 15, 6:38 PM
Size
23 KB
Mime Type
text/x-diff
Expires
Tue, Feb 17, 6:38 PM (1 d, 15 h)
Engine
blob
Format
Raw Data
Handle
237574
Attached To
rXR Xreate
View Options
diff --git a/cpp/src/CMakeLists.txt b/cpp/src/CMakeLists.txt
index cb91525..62be4db 100644
--- a/cpp/src/CMakeLists.txt
+++ b/cpp/src/CMakeLists.txt
@@ -1,238 +1,238 @@
cmake_minimum_required(VERSION 2.8.11)
project(xreate)
cmake_policy(SET CMP0022 NEW)
message("MODULES" ${CMAKE_MODULE_PATH})
# LLVM
#======================
FIND_PACKAGE (LLVM REQUIRED)
set(LLVM_VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR})
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
message("LLVM LIB PATH:" ${LLVM_LIBRARY_DIRS})
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
INCLUDE_DIRECTORIES(${LLVM_INCLUDE_DIRS})
message(STATUS "INCLUDE DIR: ${LLVM_INCLUDE_DIRS}")
add_definitions(${LLVM_DEFINITIONS})
message(STATUS "LLVM DEFS: " ${LLVM_DEFINITIONS})
execute_process(
COMMAND llvm-config --libs
OUTPUT_VARIABLE LLVM_LIBS
OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "LLVM LIBS: " ${LLVM_LIBS})
# CLANG
#======================
set(CLANG_LIBS
clangCodeGen
clangASTMatchers
clangQuery
clangTooling
clangFrontend
clangSerialization
clangDriver
clangParse
clangSema
clangAnalysis
clangAST
clangEdit
clangLex
clangBasic
)
# POTASSCO
#======================
-set(POTASSCO_PATH "/opt/potassco/clingo" CACHE PATH "Path to potassco sources")
+set(CLINGO_PATH "/opt/potassco/clingo" CACHE PATH "Path to potassco sources")
set(POTASSCO_INCLUDE_PATH
- ${POTASSCO_PATH}/libgringo
- ${POTASSCO_PATH}/libclasp
- ${POTASSCO_PATH}/libclingo
- ${POTASSCO_PATH}/libprogram_opts
- ${POTASSCO_PATH}/liblp
+ ${CLINGO_PATH}/libgringo
+ ${CLINGO_PATH}/libclasp
+ ${CLINGO_PATH}/libclingo
+ ${CLINGO_PATH}/libprogram_opts
+ ${CLINGO_PATH}/liblp
)
INCLUDE_DIRECTORIES(${POTASSCO_INCLUDE_PATH})
set(LIBCLASP_LIBS
clingo
clasp
gringo
program_opts
reify
lp
)
message("CLASP LIBS: " ${LIBCLASP_LIBS})
# OTHER DEPENDENCIES
#===========================
set(JEAYESON_INCLUDE_PATH
${CMAKE_HOME_DIRECTORY}/../vendors/jeayeson/include/
)
INCLUDE_DIRECTORIES(${JEAYESON_INCLUDE_PATH})
# COCO
#===========================
set(COCO_EXECUTABLE "" CACHE PATH "Path to coco executable")
set(COCO_FRAMES_PATH "" CACHE PATH "Path to coco frames")
set(COCO_GRAMMAR_PATH ${CMAKE_HOME_DIRECTORY}/../grammar/)
set(COCO_SOURCE_FILES_MAIN
${COCO_GRAMMAR_PATH}/main/Parser.cpp
${COCO_GRAMMAR_PATH}/main/Scanner.cpp
)
set(COCO_SOURCE_FILES_MODULES
${COCO_GRAMMAR_PATH}/modules/Parser.cpp
${COCO_GRAMMAR_PATH}/modules/Scanner.cpp
)
set(COCO_SOURCE_FILES ${COCO_SOURCE_FILES_MODULES} ${COCO_SOURCE_FILES_MAIN})
INCLUDE_DIRECTORIES(${COCO_GRAMMAR_PATH})
add_custom_command(OUTPUT ${COCO_SOURCE_FILES_MAIN}
COMMAND ${COCO_GRAMMAR_PATH}/gen-grammar main ${COCO_EXECUTABLE} ${COCO_FRAMES_PATH}
WORKING_DIRECTORY ${COCO_GRAMMAR_PATH}
MAIN_DEPENDENCY ${COCO_GRAMMAR_PATH}/xreate.ATG
)
add_custom_command(OUTPUT ${COCO_SOURCE_FILES_MODULES}
COMMAND ${COCO_GRAMMAR_PATH}/gen-grammar modules ${COCO_EXECUTABLE} ${COCO_FRAMES_PATH}
WORKING_DIRECTORY ${COCO_GRAMMAR_PATH}
MAIN_DEPENDENCY ${COCO_GRAMMAR_PATH}/modules.ATG
)
message(STATUS "COCO GRAMMAR BUILD STATUS:" ${COCO_OUTPUT})
# XREATE
#======================
set(SOURCE_FILES
analysis/temporalseqgraph.cpp
pass/cfatemporalseqpass.cpp
analysis/cfagraph.cpp
pass/cfapass.cpp
modules.cpp
compilation/interpretation-instructions.cpp
ExternLayer.cpp
analysis/cfagraph.cpp
compilation/latereasoning.cpp
analysis/interpretation.cpp
query/latex.cpp
query/polymorph.cpp
compilation/polymorph.cpp
aux/latereasoning.cpp
compilation/latex.cpp
analysis/typeinference.cpp
xreatemanager.cpp
transcendlayer.cpp
analysis/dfagraph.cpp
llvmlayer.cpp
pass/compilepass.cpp
analysis/utils.cpp
pass/dfapass.cpp
compilation/targetinterpretation.cpp
pass/interpretationpass.cpp
ast.cpp
aux/xreatemanager-decorators.cpp
compilation/operators.cpp
compilation/transformations.cpp
compilation/transformersaturation.cpp
pass/versionspass.cpp
attachments.cpp
compilation/containers.cpp
compilation/advancedinstructions.cpp
utils.cpp
pass/abstractpass.cpp
contextrule.cpp
query/containers.cpp
aux/serialization/expressionserializer.cpp
)
set(XREATE_INCLUDE_DIRS
${CMAKE_CURRENT_SOURCE_DIR}/
)
INCLUDE_DIRECTORIES(${XREATE_INCLUDE_DIRS})
set(XREATE_PRIVATE_INCLUDE_DIRS
${XREATE_INCLUDE_DIRS}
${COCO_GRAMMAR_PATH}
${JEAYESON_INCLUDE_PATH}
${LLVM_INCLUDE_DIRS}
${POTASSCO_INCLUDE_PATH}
)
add_library(${PROJECT_NAME} SHARED ${COCO_SOURCE_FILES} ${SOURCE_FILES})
target_link_libraries(${PROJECT_NAME})
target_include_directories(${PROJECT_NAME} INTERFACE
${XREATE_INCLUDE_DIRS}
${COCO_GRAMMAR_PATH}
${JEAYESON_INCLUDE_PATH}
${LLVM_INCLUDE_DIRS}
${POTASSCO_INCLUDE_PATH}
)
get_directory_property(DEFINITIONS_ALL DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMPILE_DEFINITIONS)
message("definitions all: " ${DEFINITIONS_ALL})
target_compile_definitions(${PROJECT_NAME} INTERFACE ${DEFINITIONS_ALL})
get_directory_property(COMPILATION_OPTIONS_ALL DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMPILE_OPTIONS)
message("compilations all: " ${COMPILATION_OPTIONS_ALL})
target_compile_options(${PROJECT_NAME} INTERFACE ${COMPILATION_OPTIONS_ALL})
SET_PROPERTY(TARGET ${PROJECT_NAME} PROPERTY
INTERFACE_LINK_LIBRARIES ${LIBCLASP_LIBS} ${CLANG_LIBS} ${LLVM_LIBS} tbb boost_system boost_filesystem
)
#${CLANG_LIBS}
#set (LINK_INTERFACE_LIBRARIES "")
# FUNCTION(PREPEND var prefix)
# SET(listVar "")
# FOREACH(f ${ARGN})
# LIST(APPEND listVar "${prefix}/${f}")
# ENDFOREACH(f)
# SET(${var} "${listVar}" PARENT_SCOPE)
# ENDFUNCTION(PREPEND)
#set(COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES "-j4")
#cotire(xreate)
# MACRO (ADD_PCH_RULE _header_filename _src_list)
# SET(_gch_filename "${_header_filename}.gch")
# LIST(APPEND ${_src_list} ${_gch_filename})
# SET (_args ${CMAKE_CXX_FLAGS})
# LIST(APPEND _args -c ${_header_filename} -o ${_gch_filename})
# GET_DIRECTORY_PROPERTY(DIRINC INCLUDE_DIRECTORIES)
# foreach (_inc ${DIRINC})
# LIST(APPEND _args "-I" ${_inc})
# endforeach(_inc ${DIRINC})
# SEPARATE_ARGUMENTS(_args)
# add_custom_command(OUTPUT ${_gch_filename}
# COMMAND rm -f ${_gch_filename}
# COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} ${_args}
# DEPENDS ${_header_filename})
# ENDMACRO(ADD_PCH_RULE _header_filename _src_list)
# ADD_PCH_RULE (${CMAKE_HOME_DIRECTORY}/src/ast.h SOURCE_FILES)
# ADD_PCH_RULE (${CMAKE_HOME_DIRECTORY}/src/llvmlayer.h SOURCE_FILES)
# ADD_PCH_RULE (${CMAKE_HOME_DIRECTORY}/src/clasplayer.h SOURCE_FILES)
# ADD_PCH_RULE (${CMAKE_HOME_DIRECTORY}/src/pass/abstractpass.h SOURCE_FILES)
diff --git a/documentation/index.xml b/documentation/index.xml
index a1db8a3..f31c7d6 100644
--- a/documentation/index.xml
+++ b/documentation/index.xml
@@ -1,192 +1,318 @@
<?xml version="1.0" encoding="UTF-8"?>
<chapter version="5.1" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xila="http://www.w3.org/2001/XInclude/local-attributes"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:trans="http://docbook.org/ns/transclusion"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:m="http://www.w3.org/1998/Math/MathML"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:db="http://docbook.org/ns/docbook">
<?xxe-sn 2b06cb2u4g0 1?>
<title><?xxe-sn 2b06cb2u4g0 2?>Xreate Manual</title>
<para><?xxe-sn 2b06cb2u4g0 6?>Xreate is an open source general purpose high
level programming language designed to write efficient and safe computer
programs.</para>
<para><?xxe-sn 2b06cb2u4g0 8?>Here "high level" has very specific meaning as
an ability to easily write, read, as well as adapt software to a constantly
changing environment or business goals. In this respect, any software
product can be evaluated on the basis of the three dimensions: efficiency,
safety and adaptability. Unfortunately, those properties are proved to be
largely contradictory for it is manageable to write either efficient(still
unsafe) or safe(and impractical) code, but not both. Thus, the ultimate goal
of the language is to allow developers to produce code with all these
properties at the same time. Xreate's design principles allow to adopt any
programming technique as long as it does not improve one dimension at the
expense of another.</para>
<para><?xxe-sn 2b06cb2u4g0 7?>To achieve aforementioned design goals Xreate
has tree distinctive layers:</para>
<itemizedlist>
<?xxe-sn 2b06cb2u4g0 e?>
<listitem>
<?xxe-sn 2b06cb2u4g0 f?>
<para><?xxe-sn 2b06cb2u4g0 g?><link xlink:href="/w/syntax"><?xxe-sn 2b06cb2u4g0 o?>Brute</link>.
Lowest layer is called <emphasis><?xxe-sn 2b06cb2u4g0 p?>Brute</emphasis>—
this is code that is indented to be actually compiled. Code on this
level implements actual software functionality. It resembles the usual
imperative languages' apparatus and consists of executable instructions
such as arithmetic, branching, input/output, etc.</para>
</listitem>
<listitem>
<?xxe-sn 2b06cb2u4g0 i?>
<para><?xxe-sn 2b06cb2u4g0 j?><link xlink:href="/w/transcend"><?xxe-sn 2b06cb2u4g0 q?>Transcend</link>.
Brute level alone is not enough to constitute full fledged language
since a code requires various non executable metadata to express
developer's intents, check correctness, validity and perform other types
of analyses. In Xreate everything of this sort belongs to a layer called
<emphasis><?xxe-sn 2b06cb2u4g0 s?>Transcend</emphasis>. Transcend
features declarative nature that is appropriate to do management kind of
work — it analyzes, oversees and controls brute by guiding compilation
process. Everything that is on this level — logic or transcend facts and
rules are gathered and sent to an external logic solver to make
solutions that are brought back in order to guide compilation.</para>
</listitem>
<listitem>
<?xxe-sn 2b06cb2u4g0 l?>
<para><?xxe-sn 2b06cb2u4g0 m?><link
xlink:href="/w/concepts/interpretation/"><?xxe-sn 2b06cb2u4g0 r?>Interpretation</link>.
And there is also <emphasis><?xxe-sn 2b06cb2u4g0 t?>Interpretation</emphasis>
— intermediate level resembling features of dynamically typed languages
that is used as a contact point and interpreter between brute and
transcend and their low level and high level constructs and structures
respectively.</para>
</listitem>
</itemizedlist>
<para><?xxe-sn 2b06cb2u4g0 u?>On a syntactic level Xreate is procedural
language with extensive use of <emphasis><?xxe-sn 2b06cb2u4g0 v?><link
xlink:href="/w/transcend"><?xxe-sn 2b06cb2u4g0 w?>annotations</link></emphasis>
— arbitrary unconstrained metadata that software developer can attach to a
different language constructs, variables and code blocks. Annotations are
completely invisible for the compiler proper and used by transcend rather as
suggestions conveying additional information.</para>
<para xlink:href="w/virtualization/"><?xxe-sn 2b3f3osfk74 g?>Most severe and
hard to resolve problems in software development stem from interaction of
different components on a different levels. Each individual component often
is thoroughly tested and works reliably. But combining them with complex
interaction and extensive IO to build end-user software usually leads to a
range of runtime errors, security vulnerabilities and performance
degradation. Thus key emphasis of Xreate is on domain specific component
level improvements and joint use of external resources. This aspect is
covered in <link xlink:href="/w/exploitation/"><?xxe-sn 2b3f3osfk74 h?>exploitation</link>
and <link xlink:href="/w/concepts/containers/"><?xxe-sn 2b3f3osfk74 i?>containers</link>
chapters. Unlike academic languages, Xreate targets safe and reliable usage
of effectful computations, such as IO, covered in <link
xlink:href="/w/virtualization"><?xxe-sn 2b3f3osfk74 j?>virtualization</link>,
<link xlink:href="/w/exploitation/"><?xxe-sn 2b3f3osfk74 k?>exploitation</link>
chapters and mutable structures covered in <link
xlink:href="/w/communication/"><?xxe-sn 2b3f3osfk74 l?>communication</link>.</para>
<section>
<?xxe-sn 2b06cb2u4g0 3?>
<title><?xxe-sn 2b06cb2u4g0 4?>Basic Example</title>
<para><?xxe-sn 2b06cb2u4g0 5?>To demonstrate what Xreate is all about,
basic example is given below:</para>
<programlisting xml:id="Example_1"><?xxe-sn 2b06cb2u4g0 x?>name="tests/introduction.cpp: Introduction.Doc_Example_1", lines=15
guard:: iAmVeryFast
{
div = function(a:: float, b:: float):: float
{
a / b
}
}
guard:: iAmVerySafe
{
div = function(a:: float, b:: float):: float
{
if ( b == (0::float)):: float {0::float} else {a / b}
}
}
test = function:: float; entry; iAmVerySecure
{
div(10, 5)
}</programlisting>
<para><?xxe-sn 2b06cb2u4g0 y?>Here entry point of the program is a
function <code><?xxe-sn 2b06cb2u4g0 z?>test</code> recognized so by the
compiler because of annotation <code><?xxe-sn 2b06cb2u4g0 10?>entry</code>
in its signature. There are also two functions <code><?xxe-sn 2b06cb2u4g0 11?>div</code>
called <emphasis><?xxe-sn 2b06cb2u4g0 12?>specializations</emphasis>. Each
specialization has a guard that defines condition that has to be met in
order to invoke this particular specialization. In the example,
specializations of <code><?xxe-sn 2b06cb2u4g0 13?>div</code> have
<code><?xxe-sn 2b06cb2u4g0 14?>iAmVeryFast</code> and <code><?xxe-sn 2b06cb2u4g0 15?>iAmVerySafe</code>
guards respectively. Let's say, developer provides two specializations
where first is a very fast division implementation and second one is a
very safe since it checks division by zero but at the same time is
unbearably slow due to extra check instruction. This is a basis of <link
xlink:href="/w/concepts/polymorphism/"><?xxe-sn 2b3f3osfk74 2?>polymorphism</link>
— client's code <code><?xxe-sn 2b3f3osfk74 3?>test</code> is able to work
with any specialization, and compiler should decide which one to invoke
with the only hint it has — annotation <code><?xxe-sn 2b3f3osfk74 5?>iAmVerySecure</code>
- in the function <code><?xxe-sn 2b3f3osfk74 7?>test</code>'s signature.
- </para>
+ in the function <code><?xxe-sn 2b3f3osfk74 7?>test</code>'s
+ signature.</para>
<note>
<?xxe-sn 2b3f3osfk74 n?>
<para><?xxe-sn 2b3f3osfk74 o?>All annotations(except <code><?xxe-sn 2b3f3osfk74 m?>entry</code>)
are custom defined by developer itself.</para>
</note>
<para><?xxe-sn 2b3f3osfk74 6?>This is when transcend comes into play. By
adding transcend rule as shown below it is possible to associate
annotation <code><?xxe-sn 2b3f3osfk74 8?>iAmVerySecure</code> with
invocation of specialization guarded by <code><?xxe-sn 2b3f3osfk74 9?>iAmVerySafe:</code></para>
<programlisting xml:id="Transcend_Example_1"><?xxe-sn 2b3f3osfk74 a?>name="tests/introduction.cpp: Introduction.Doc_Example_1", lines=15
dfa_callguard(SiteInv, iAmVerySafe):-
dfa_callfn(SiteInv, div);
SiteInv = s(_, _, ScopeInv);
cfa_parent(ScopeInv, function(FnInv));
bind_func(FnInv, iAmVerySecure).</programlisting>
<para><?xxe-sn 2b3f3osfk74 b?>Transcend rules are written in ASP syntax —
common syntax to write logic programs. This particular rule reads that for
any function annotated with <code><?xxe-sn 2b3f3osfk74 c?>iAmVerySecure</code>,
certain specialization <code><?xxe-sn 2b3f3osfk74 d?>iAmVerySafe</code> is
- chosen for <code><?xxe-sn 2b3f3osfk74 e?>div</code> invocation. </para>
+ chosen for <code><?xxe-sn 2b3f3osfk74 e?>div</code> invocation.</para>
<note>
<?xxe-sn 2b3f3osfk74 p?>
<para><?xxe-sn 2b3f3osfk74 q?>In this example an appropriate
specialization is statically resolved, so other specialization isn't
- even compiled. </para>
+ even compiled.</para>
</note>
<para><?xxe-sn 2b3f3osfk74 f?>By providing custom rules it is possible to
implement any polymorphism strategy, be it statically performed or
dynamically. The example demonstrates basic workflow: transcend gathers
available information about a program, such as annotations and using
custom rules makes decisions to guide compilation process particularly by
- selecting appropriate specializations as in this example. </para>
+ selecting appropriate specializations as in this example.</para>
+ </section>
+
+ <section>
+ <?xxe-sn 2ba2e84701s 1?>
+
+ <title><?xxe-sn 2ba2e84701s 2?>Build and Run on Linux</title>
+
+ <para><?xxe-sn 2ba2e84701s 3?>Major dependencies: </para>
+
+ <itemizedlist>
+ <?xxe-sn 2ba2e84701s 4?>
+
+ <listitem>
+ <?xxe-sn 2ba2e84701s 5?>
+
+ <para><?xxe-sn 2ba2e84701s 6?>gcc 7</para>
+ </listitem>
+
+ <listitem>
+ <?xxe-sn 2ba2e84701s 7?>
+
+ <para><?xxe-sn 2ba2e84701s 8?>llvm 5, clang 5</para>
+ </listitem>
+
+ <listitem>
+ <?xxe-sn 2ba2e84701s 9?>
+
+ <para><?xxe-sn 2ba2e84701s a?>boost 1.66</para>
+ </listitem>
+
+ <listitem>
+ <?xxe-sn 2ba2e84701s b?>
+
+ <para><?xxe-sn 2ba2e84701s c?>coco</para>
+ </listitem>
+
+ <listitem>
+ <?xxe-sn 2ba2e84701s d?>
+
+ <para><?xxe-sn 2ba2e84701s e?>clingo</para>
+ </listitem>
+ </itemizedlist>
+
+ <para><?xxe-sn 2ba2e84701s f?>Building tested on <emphasis
+ role="bold"><?xxe-sn 2ba2e84701s o?>OpenSuse Leap 15</emphasis>. Change
+ commands accordingly if using another distribution. </para>
+
+ <para><?xxe-sn 2ba2e84701s p?>Pull sources directly from
+ repository:</para>
+
+ <literallayout><?xxe-sn 2ba2e84701s g?>git clone --recursive https://pgess@bitbucket.org/pgess/xreate.git</literallayout>
+
+ <para><?xxe-sn 2ba2e84701s q?>Enter into source directory and run
+ following script to prepare building environment. Script installs required
+ system packages as well as Coco and Clingo from sources:</para>
+
+ <note>
+ <?xxe-sn 2ba2e84701s 15?>
+
+ <para><?xxe-sn 2ba2e84701s 16?>Carefully inspect scripts before
+ run</para>
+ </note>
+
+ <para><?xxe-sn 2ba2e84701s 13?>On <emphasis role="bold"><?xxe-sn 2ba2e84701s 14?>OpenSuse
+ Leap 15</emphasis>:</para>
+
+ <literallayout><?xxe-sn 2ba2e84701s t?>./installation/prepare-opensuse-leap15</literallayout>
+
+ <para><?xxe-sn 2ba2e84701s u?>That was one time operation to prepare
+ environment. After that enter into <code><?xxe-sn 2ba2e84701s v?>build</code>
+ directory and start actual tests building:</para>
+
+ <literallayout><?xxe-sn 2ba2e84701s w?>cd build
+make</literallayout>
+
+ <para><?xxe-sn 2ba2e84701s x?>After successful build you can run xreate
+ tests:</para>
+
+ <literallayout><?xxe-sn 2ba2e84701s y?>cd ..
+./build/tests/xreate-tests</literallayout>
+
+ <note>
+ <?xxe-sn 2ba2e84701s 1h?>
+
+ <para><?xxe-sn 2ba2e84701s 1i?>Pay attention that working dir should be
+ repository root</para>
+ </note>
+
+ <para><?xxe-sn 2ba2e84701s 17?>For consequent rebuilds after updates. etc
+ invoke <code><?xxe-sn 2ba2e84701s 18?>cmake</code> as follows:</para>
+
+ <literallayout><?xxe-sn 2ba2e84701s 19?>#working dir build
+cmake -DCMAKE_BUILD_TYPE=Debug \
+ -DBUILD_XREATE_TESTS=1 \
+ -DCOCO_EXECUTABLE=<FILE> \
+ -DCLINGO_PATH=<DIR> \
+ -DCOCO_FRAMES_PATH=../vendors/coco/generator/ \
+ -DCMAKE_CXX_COMPILER=g++ ../cpp
+make</literallayout>
+
+ <para><?xxe-sn 2ba2e84701s 1j?>Cmake's selected parameters:</para>
+
+ <itemizedlist>
+ <?xxe-sn 2ba2e84701s 1a?>
+
+ <listitem>
+ <?xxe-sn 2ba2e84701s 1b?>
+
+ <para><?xxe-sn 2ba2e84701s 1c?>BUILD_XREATE_TESTS determines whether
+ to build tests</para>
+ </listitem>
+
+ <listitem>
+ <?xxe-sn 2ba2e84701s 1d?>
+
+ <para><?xxe-sn 2ba2e84701s 1e?>COCO_EXECUTABLE full filename of Coco
+ executable</para>
+ </listitem>
+
+ <listitem>
+ <?xxe-sn 2ba2e84701s 1f?>
+
+ <para><?xxe-sn 2ba2e84701s 1g?>CLINGO_PATH Directory of Clingo
+ installation</para>
+ </listitem>
+ </itemizedlist>
</section>
</chapter>
diff --git a/installation/prepare-opensuse-leap15 b/installation/prepare-opensuse-leap15
old mode 100644
new mode 100755
index 9100666..e17360a
--- a/installation/prepare-opensuse-leap15
+++ b/installation/prepare-opensuse-leap15
@@ -1,65 +1,67 @@
#!/bin/bash
# VERSIONS OF MAJOR DEPENDENCIES:
# OPENSUSE LEAP 15
# LLVM: 5.0.1
# CLANG: 5.0.1
# GCC: 7.3.1
CLINGO_PATH=/opt/potassco/clingo
COCO_PATH=/opt/coco
-XREATE_PATH=/opt/xreate
-
CLASP_VERSION=95cc1182f
+SCRIPT=`realpath $0`
+XREATE_PATH=`dirname $SCRIPT`/..
+
# PREREQUISITES
#
sudo zypper in \
git wget unzip make \
gcc7-c++ scons bison re2c\
llvm5-devel libboost_headers1_66_0-devel \
cmake gtest tbb-devel clang5-devel \
libxml2-devel libboost_system1_66_0-devel libboost_filesystem1_66_0-devel
# COCO CPP
# The Compiler Generator Coco/R
# http://www.ssw.uni-linz.ac.at/coco/#CPP
#
mkdir $COCO_PATH
cd $COCO_PATH
wget http://www.ssw.uni-linz.ac.at/coco/CPP/CocoSourcesCPP.zip
unzip ./CocoSourcesCPP.zip
make
# CLINGO
# A grounder and solver for logic programs.
# https://github.com/potassco/clingo
#
mkdir -p $CLINGO_PATH
cd $CLINGO_PATH
git clone https://github.com/potassco/clingo.git ./ &&\
git reset --hard $CLASP_VERSION
git apply $XREATE_PATH/installation/docker/patches/potassco-patch-95cc11
scons configure --build-dir=debug &&\
sed -i "s/, '-fvisibility=hidden'//" build/debug.py &&\
sed -i "s/CXXFLAGS = \[\(.*\)\]/CXXFLAGS = \['-fPIC', \1\]/" build/debug.py &&\
sed -i "s/WITH_LUA = 'auto'/WITH_LUA = None/" build/debug.py &&\
sed -i "s/WITH_PYTHON = 'auto'/WITH_PYTHON = None/" build/debug.py &&\
sed -i "s/'-std=c++11'/'-std=c++14'/" build/debug.py &&\
cat build/debug.py &&\
scons --build-dir=debug
# XREATE
#
cd $XREATE_PATH/vendors/jeayeson
+git pull
./configure
mkdir ../../build
cd ../../build
ln -s $COCO_PATH/Copyright.frame $XREATE_PATH/vendors/coco/generator/Copyright.frame
ln -s $COCO_PATH/Scanner.frame $XREATE_PATH/vendors/coco/generator/Scanner.frame
mkdir $XREATE_PATH/grammar/main $XREATE_PATH/grammar/modules
-cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_XREATE_TESTS=1 -DCOCO_EXECUTABLE=$COCO_PATH/Coco -DCOCO_FRAMES_PATH=$XREATE_PATH/vendors/coco/generator/ -DCMAKE_CXX_COMPILER=g++ ../cpp
+cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_XREATE_TESTS=1 -DCOCO_EXECUTABLE=$COCO_PATH/Coco -DCLINGO_PATH=$CLINGO_PATH -DCOCO_FRAMES_PATH=$XREATE_PATH/vendors/coco/generator/ -DCMAKE_CXX_COMPILER=g++ ../cpp
diff --git a/vendors/jeayeson b/vendors/jeayeson
index e277cb8..ecbed0b 160000
--- a/vendors/jeayeson
+++ b/vendors/jeayeson
@@ -1 +1 @@
-Subproject commit e277cb8677a0a1ba15c5bf53f448ac3c92c345d9
+Subproject commit ecbed0bc286c2e053c4b0cf7277c2892b8e49603
Event Timeline
Log In to Comment