aleph cookbook
TRANSCRIPT
8/11/2019 Aleph Cookbook
http://slidepdf.com/reader/full/aleph-cookbook 1/12
Aleph Library introduction and installation yPBL cookbook
by Angelica Amaya, Johanna Raimundo and Ronald Sulbaranlast update: 23!"2!#$
28
Table of contents
Abstract
Keywords
Contributors
Releases
Introduction
Definitions
Data Structures and AlgorithmsAleph-w Library
Clang
Recipes
Recipe1: Installing Aleph-w Library
Step1: Installing g-!"#
Step$: Installing the clang system
Step%: Installing the aleph library
Recipe$: Adding Aleph-w Library to a &t'ro(ect
Step1: )pen a *tcreator pro(ect
Step$: +dit the "pro file
Recommended documentation
,1 Aleph-w library
Feedback
1/12
yPBL methodology cookbook http :// homepages. laas . fr / eexposit / ypbl
8/11/2019 Aleph Cookbook
http://slidepdf.com/reader/full/aleph-cookbook 2/12
Aleph Library introduction and installation yPBL cookbook
by Angelica Amaya, Johanna Raimundo and Ronald Sulbaranlast update: 23!"2!#$
Abstract
.his coo/boo/ is intended to illustrate a Library that offers a solution for Data Structures and
Algorithms with high performance"
In this coo/boo/0 we proide two main recipes" .he first recipe aims at illustrating
how to install and configure Aleph-w Library" .he second one describes how
to add the Aleph-w Library to a &t'ro(ect"
Keywords
Aleph-w,C0 Data structures, Algorithms.
2/12
yPBL methodology cookbook http :// homepages. laas . fr / eexposit / ypbl
8/11/2019 Aleph Cookbook
http://slidepdf.com/reader/full/aleph-cookbook 3/12
Aleph Library introduction and installation yPBL cookbook
by Angelica Amaya, Johanna Raimundo and Ronald Sulbaranlast update: 23!"2!#$
Contributors
Authors ReviewersAngelica Aaya
!ohanna Raiundo
Ronald "ulbaran
Angelica Aaya
!ohanna Raiundo
Ronald "ulbaran
#/12
yPBL methodology cookbook http :// homepages. laas . fr / eexposit / ypbl
8/11/2019 Aleph Cookbook
http://slidepdf.com/reader/full/aleph-cookbook 4/12
Aleph Library introduction and installation yPBL cookbook
by Angelica Amaya, Johanna Raimundo and Ronald Sulbaranlast update: 23!"2!#$
Releases
Releases Date Author(s) Description Status*2"1 Angelica
Amaya03ohanna
Raimundo0Ronald
Sulbaan
Abstract and recipes proposal toreiewers
Reiewed
2"$ AngelicaAmaya03ohanna
Raimundo0Ronald
Sulbaan
Introduction and definitionsRecipe 1
Recipe $
ReiewedReiewed
Reiewed
1"2 Angelica
Amaya03ohanna
Raimundo0RonaldSulbaan
'ublic release of 4 1"2
5 Status: Started0 .oReiew0 Reiewed0 Reised0 'ublished
$/12
yPBL methodology cookbook http :// homepages. laas . fr / eexposit / ypbl
8/11/2019 Aleph Cookbook
http://slidepdf.com/reader/full/aleph-cookbook 5/12
Aleph Library introduction and installation yPBL cookbook
by Angelica Amaya, Johanna Raimundo and Ronald Sulbaranlast update: 23!"2!#$
Introduction
Software engineering is the study of ways in which to create large and comple6 computerapplications and that generally inole many programmers and designers" At the heart of
software engineering is with the oerall design of the applications and on the creation of a designthat is based on the needs and re*uirements of end users" 7hile software engineering inoles
the full life cycle of a software pro(ect0 is includes many different components - specification0
re*uirements gathering0 design0 erification0 coding0 testing0 *uality assurance0 user acceptancetesting0 production0 and ongoing maintenance"
8aing an in-depth understanding on eery component of software engineering is not mandatory0
howeer0 it is important to understand that the sub(ect of data structures and algorithms is
concerned with the coding phase" .he use of data structures and algorithms is the nuts-and-blotsused by programmers to store and manipulate data"
Aleph-w is a library of abstract data types and algorithms around a wide range of fundamental
data structures and computing issues
.he remainder of this coo/boo/ is organi9ed as follows" irst0 some definitions are intended to
proide a basic understanding of Data Structures0 Algorithms and the used tools" .hen0 seeral
recipes will show you how to implement and used Aleph-w library".his coo/boo/ is dedicated to Linu6 users"
Definitions
Data Structures and Algorithms
A data structure is an arrangement of data in a computer;s memory or een dis/ storage" An
e6ample of seeral common data structures are arrays0 lin/ed lists0 *ueues0 stac/s0 binary trees0
and hash tables" Algorithms0 on the other hand0 are used to manipulate the data contained in thesedata structures as in searching and sorting"
<any algorithms apply directly to a specific data structures" 7hen wor/ing with certain data
structures you need to /now how to insert new data0 search for a specified item0 and deleting a
specific item"
Commonly used algorithms include are useful for:
• Searching for a particular data item =or record>"
• Sorting the data" .here are many ways to sort data" Simple sorting0 Adanced sorting
• Iterating through all the items in a data structure" =4isiting each item in turn so as to
display it or perform some other action on these items>
%/12
yPBL methodology cookbook http :// homepages. laas . fr / eexposit / ypbl
8/11/2019 Aleph Cookbook
http://slidepdf.com/reader/full/aleph-cookbook 6/12
Aleph Library introduction and installation yPBL cookbook
by Angelica Amaya, Johanna Raimundo and Ronald Sulbaranlast update: 23!"2!#$
Aleph%& Library
Aleph-w is a library of data structures and algorithms implemented in and for C"
It contains the main data structures: single and double lists0 special arrays =dynamic and of bits>0many types of trees: multitrees0 binary search trees0 al0 red-blac/0 randomi9ed0 treaps0 splay
and other interesting types"
Seeral types of hash tables are implemented: separated chaining0 open adressing with linear
probing and double function hash? this last one has a garbage colector mechanism that allows tofree deleted entries" Dynamic linear hash tables are implemented too"
.he main algorithms on graphs are implemented in an easy way and with good performancefeatures" @etwor/ low =ma6imum and min cost>0 cut points0 topological sort0 spanning trees0
min paths" etc" .he graphs are generic in the sense that they can contain data independent of the
algorithm"
Seeral containers of the C S.L library are implemented with Aleph-w" .heir performance is
better than @B implementation
'lang
Clang is a compiler front end for the C0 C0 )b(ectie-C and )b(ectie-C programminglanguages" It uses LL4< as its bac/ end and has been part of the LL4< release cycle since
LL4< $""It is designed to offer a complete replacement to the @B Compiler Collection =CC>" It is
open-source0 deeloped by Apple? other companies such as oogle are inoled" Its source codeis aailable under the Bniersity of Illinois@CSA License"
.he Clang pro(ect includes the Clang front end and the Clang static analy9er and seeral code
analysis tools"
&/12
yPBL methodology cookbook http :// homepages. laas . fr / eexposit / ypbl
8/11/2019 Aleph Cookbook
http://slidepdf.com/reader/full/aleph-cookbook 7/12
Aleph Library introduction and installation yPBL cookbook
by Angelica Amaya, Johanna Raimundo and Ronald Sulbaranlast update: 23!"2!#$
Recipes
Recipe1: Installing Alephw !ibrary
In order to carry out this recipe you will need:
• .he g compiler EF !"#"
• .he clang system EF %"!"
• .he Aleph-w library EF 1"Ga"$ that can be downloaded from ,,1 Aleph-w library
Step1: Installing g""#$%
irstly0 you need to open a terminal and type:
sudo apt-get install g-!." and press enter /ey"
inally0 run g--ersion and to confirm that the g-!"# is
installed"
It;s important that you see the number !"# for the g ersion number"
Step&: Installing the clang system
#irst$ you need to open a terminal and type:
sudo gedit %etc%apt%sources.list (Hou can use gedit or any other te6t editor )
Second$ add the folowing lines to the sources"list file depending on your linu6 system:
#or Debian$
wheezy (Debian stable) - Last update : Sat, 28 Dec 2013 15:2:! "#$ % &e'isin: 1808* deb http://llvm.org/apt/wheezy/ llvm-toolchain-wheezy maindeb-src http://llvm.org/apt/wheezy/ llvm-toolchain-wheezy main
'/12
yPBL methodology cookbook http :// homepages. laas . fr / eexposit / ypbl
8/11/2019 Aleph Cookbook
http://slidepdf.com/reader/full/aleph-cookbook 8/12
Aleph Library introduction and installation yPBL cookbook
by Angelica Amaya, Johanna Raimundo and Ronald Sulbaranlast update: 23!"2!#$
sid (unstable) - Last update : +n, 23 un 201 11:3:1* "#$ % &e'isin: 2118
deb http://llvm.org/apt/unstable/ llvm-toolchain maindeb-src http://llvm.org/apt/unstable/ llvm-toolchain main# 3.4
deb http://llvm.org/apt/unstable/ llvm-toolchain-3.4 maindeb-src http://llvm.org/apt/unstable/ llvm-toolchain-3.4 main
#or &buntu$
.ecise (12/0) - Last update : #ue, 1! un 201 00:3:1! "#$ % &e'isin: 21105* deb http://llvm.org/apt/precise/ llvm-toolchain-precise maindeb-src http://llvm.org/apt/precise/ llvm-toolchain-precise main# 3.4deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.4 maindeb-src http://llvm.org/apt/precise/ llvm-toolchain-precise-3.4 main# Commondeb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu precise main
uantal (12/10) - Last update : +n, 1* un 201 13:2:0* "#$ % &e'isin: 180!!
deb http://llvm.org/apt/quantal/ llvm-toolchain-quantal maindeb-src http://llvm.org/apt/quantal/ llvm-toolchain-quantal main# 3.4deb http://llvm.org/apt/quantal/ llvm-toolchain-quantal-3.4 maindeb-src http://llvm.org/apt/quantal/ llvm-toolchain-quantal-3.4 main# Commondeb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu quantal main
&a.in (13/0) - Last update : #ue, 1! un 201 05:01:23 "#$ % &e'isin: 211088
deb http://llvm.org/apt/raring/ llvm-toolchain-raring maindeb-src http://llvm.org/apt/raring/ llvm-toolchain-raring main# 3.4deb http://llvm.org/apt/raring/ llvm-toolchain-raring-3.4 maindeb-src http://llvm.org/apt/raring/ llvm-toolchain-raring-3.4 main# Commondeb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu raring main
Saucy (13/10) - Last update : +n, 23 un 201 1!:5*:31 "#$ % &e'isin: 211
deb http://llvm.org/apt/saucy/ llvm-toolchain-saucy maindeb-src http://llvm.org/apt/saucy/ llvm-toolchain-saucy main# 3.4
deb http://llvm.org/apt/saucy/ llvm-toolchain-saucy-3.4 maindeb-src http://llvm.org/apt/saucy/ llvm-toolchain-saucy-3.4 main
#.usty (1/0) - Last update : +n, 23 un 201 1*:5:0* "#$ % &e'isin: 211
deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty maindeb-src http://llvm.org/apt/trusty/ llvm-toolchain-trusty main# 3.4deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.4 main
8/12
yPBL methodology cookbook http :// homepages. laas . fr / eexposit / ypbl
8/11/2019 Aleph Cookbook
http://slidepdf.com/reader/full/aleph-cookbook 9/12
Aleph Library introduction and installation yPBL cookbook
by Angelica Amaya, Johanna Raimundo and Ronald Sulbaranlast update: 23!"2!#$
deb-src http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.4 main
'hird$
nstall (stable branch)
• .o retriee the archie signature:
type in a terminal sudo wget - - http$%%llm.org%apt%llm-snapshot.gpg.+eysudo apt-
+ey add -
• .o install (ust clang0 lldb and llm =%"! release>:
type in a terminal sudo apt-get install clang-.! lldb-.! llm-.!
Step': Installing the aleph library
irstly0 you need to open the Ima/efile file that is inside the folder of the Aleph-w library and (ust delete or comment lines if you wish to use gnu or clang suite0 in this case we are going to useclang suite:
Second:
.ype in a terminal : sudo ind % -name /cconig.h/ -e0ec echo 12 34 and press enter"
(/12
yPBL methodology cookbook http :// homepages. laas . fr / eexposit / ypbl
8/11/2019 Aleph Cookbook
http://slidepdf.com/reader/full/aleph-cookbook 10/12
Aleph Library introduction and installation yPBL cookbook
by Angelica Amaya, Johanna Raimundo and Ronald Sulbaranlast update: 23!"2!#$
Select the path that contains c%!."
5%usr%include%i"6-linu0-gnu%c%!."7
.hird:
loo/ for the line that contains 589L&D:S ; -.%7 in the Ima/efile file and change it by89L&D:S ; -.% -%usr%include%i"6-linu0-gnu%c%!."7 obtained before"
ourth:
)pen a terminal cd to aleph directory and run: 0m+m
run ma+e libAleph.a and wait for the compilation"
Recipe&: Adding Alephw !ibrary to a (t)ro*ect
In order to carry out this recipe you will need:
• .he &tCreator and &tLibraries"
1)/12
yPBL methodology cookbook http :// homepages. laas . fr / eexposit / ypbl
8/11/2019 Aleph Cookbook
http://slidepdf.com/reader/full/aleph-cookbook 11/12
Aleph Library introduction and installation yPBL cookbook
by Angelica Amaya, Johanna Raimundo and Ronald Sulbaranlast update: 23!"2!#$
• .he Aleph-w library EF1"Ga"$"
Step1: +pen a ,tcreator pro*ect
)pen *tcreator0 go to ile and create or open a new pro(ect"
Step&: -dit the $pro file
)pen the 5"pro file and add the following lines:
!"$%C&&'(")* +, -std,c++C'0) +, c++0C(12$"5+,$(AlephPath)
(06* ,-($(AlephPath)7
-lnana -lc -lm -lgsl -lgslcblas -lgmp -lmp8r -lasprint8
Recommended documentation
.1/ Alephw library
http://sourceforge.net/projects/aleph-w/
11/12
yPBL methodology cookbook http :// homepages. laas . fr / eexposit / ypbl
8/11/2019 Aleph Cookbook
http://slidepdf.com/reader/full/aleph-cookbook 12/12
Aleph Library introduction and installation yPBL cookbook
by Angelica Amaya, Johanna Raimundo and Ronald Sulbaranlast update: 23!"2!#$
0eedbac
Comments and suggestions: [email protected] [email protected]
ronalanto2%Jhotmail"com
12/12
yPBL methodology cookbook http :// homepages. laas . fr / eexposit / ypbl