• No results found

Ontology Based Framework For Learning Algorithm

N/A
N/A
Protected

Academic year: 2020

Share "Ontology Based Framework For Learning Algorithm"

Copied!
5
0
0

Loading.... (view fulltext now)

Full text

(1)

3020

Ontology Based Framework For Learning

Algorithm

Gorgoumack Sambe, Adrien Basse

Abstract: Algorithms are finite sequences of actions to follow in order to solve problems. They are widely used throughout all domains of computer sciences. Before their first programming course, our first-year learners take algorithm course to learn how to elaborate algorithms to solve problems. In algorithmics as in many other fields, practice activities are crucial to facilitate skill acquisition. In that regard, we prop ose, in this paper, an ontology-based framework to facilitate practicing algorithmics and help learners to gradually acquire a meth odology for algorithm building.

Index Terms: Algorithm, Ontology, distance education, Top down method, Web and mobile platform, EIAH.

——————————  ——————————

1 INTRODUCTION

Algorithmics is, with programming, one of the basic domains of computer science. Practice, as in many other domains, is essential for the acquisition of algorithmic skills. Nevertheless, learners often focus more on practicing programming instead of algorithmics, which is the foundation for writing any program. Realizing a computer program requires a good conceptualization and planning of a solution. It is also necessary to implement it and to evaluate the results and performances. However, research shows that most students at the end of the introductory programming course have difficulties solving problems ([1], [2] and [3]); which is a skill developped through algorithm. Indeed, mastering algorithmics helps learners to design robust programs. In addition, it provides learners with techniques for solving complex problems. Among definitions in literature, [4] define informally an algorithm as ―any well-defined computational procedure that takes some value, or set of values, as input and produces some value, or set of values, as output. An algorithm is thus a sequence of computational steps that transform the input into the output.‖ To build the sequence of steps or actions to transform input data into output data, several algorithm design techniques follow top-down approach which basically involves three steps [4]:

- Break down the problem into simpler and smaller subproblems;

- Solve each subproblem following the same approach until

you find subproblem that can be solved with simple actions ;

- Combine all subproblem solutions to provide final solution.

Figure 1 illustrates algorithm and top-down method descriptions with sequence of actions to transform inputs into outputs and breaking down the problem into several subproblems. Finally, we can add that wrong inputs or outputs will inevitably lead to wrong algorithms. However, identification of inputs and outputs at the beginning of algorithm building process is crucial to produce right algorithms. The objective of this work is to propose a system to help learners to practice algorithm instead of a particular programming language. With our system, learners practice at first identifying exercise inputs and outputs. They can also practice top-down method by ordering previously shuffled algorithm statements in right part.

Section 2 of the paper contains related ontology-based work on programming language and algorithm learning. Section 3 describes pseudocode ontology update to mainly take into account top-down method and presents implementation. Section 4 is the conclusion.

2

RELATED

WORK

Among reasons to develop ontologies, [5] enumerate ―sharing common understanding of the structure of information among people or software agents and enabling reuse of domain knowledge‖. In the particular case of algorithm and programming fields, research proposed many ontologies to describe programming language elements and algorithm concepts. These ontologies are mainly used to facilitate algorithm and programming learning process for learners. Concerning object-oriented programming languages, Java, is the most represented. [6] proposed an ontology to represent object-oriented programming languages with the possibility to automatically analyse Java source codes and generate corresponding RDF triples. To facilitate Java language

learning, [7] proposed a bilingual ontology which

conceptualizes key programming language elements in English and Bulgarian. [8] also proposed an ontology which represent Java language elements. Ontology proposed by [9] captures general object-oriented programming concepts, algorithmic structures and reserved words of java language. The semantics of Java language elements are also captured by [10], through an ontology, to facilitate programming

learning. Other modeled object-oriented programming

language is C#. [11] used SCRO ontology ([12]) dedicated to java language as a model to propose CSCRO ontology which formally represent the domain of C# programming language. Apart from object-oriented programming languages, other programming languages such as Pascal and C have also been the subject of several studies. This is the case with PasOnto ontology proposed by [13] to represent programming

Fig. 1. Algorithm description

————————————————

• Gorgoumack Sambe, University Assane Seck, Ziguinchor,Senegal, E-mail: [email protected]

(2)

3021 IJSTR©2020

www.ijstr.org exercices and solutions in Pascal programming language. PasOnto is dedicated to facilitate Pascal language learning with the possibility for learners to compare their solutions with the one in the exercise database. For C programming language, [14] represent through an ontology, language syntax (variable, program structure, …), programming techniques (loop patterns, function patterns, naming style, code structuring style, …), integrated development platforms and compilers for mac, linux and windows. [8], in addition to ontology for java language, proposed an ontology to represent C language elements. To write down a program, learners need at least to know how to use a specific programming language. Syntax is therefore very important. Beside the fact that programming languages and so syntax are varied and can change, learners need at first algorithm skills to know the method they should follow to solve a problem. For these reasons, [15] and [16] proposed to represent algorithm concepts instead of specific programming language elements. [15] describe algorithm skills, exercises organization and

description whereas codOnto ontology conceptualizes

pseudocode exercise solutions and contains exercise description and all pseudocode concepts to describe algorithms. Even though they are dedicated to algorithms, algoSkill and codOnto ontologies are dedicated to algorithmic syntax not to algorithmic design techniques.

3 PROPOSITION

Our objective is to support learner in algorithmics, not in syntax but rather in design techniques. We aim to propose a system to support learners in algorithm design instead of a particular programming language in order to help them to improve their algorithm skills. Proposed system also offer automatic feedbacks in order to enable learners to correct themselves more easily. We mainly go through two stages to build this system. The first stage consists in updating codOnto ontology to take into account the top-down method. To do this, we mainly divide each exercise into parts following top-down method and link them with corresponding statements. The second stage consists in developing our system. We browse codOnto ontology and automatically generate two groups of tasks for each exercise in the ontology. The first group of tasks consists in identifying exercise inputs and outputs. At first, this ensures that learners have a good understanding of the algorithm to write down, which is just the sequence of actions to transform inputs into outputs. Then, identifying clearly inputs and outputs help to write some basics algorithm statements like asking users to give inputs or displaying outputs. The second group of tasks consists in proposing parts resulting from top-down method and asking learner to order previously shuffled algorithm statements and drag and drop each of them in right part. More difficult tasks would be to ask advanced learners to propose their own parts resulting from top-down method and/or to create statements from scratch for each part. Nevertheless, this first version can help beginners to adopt right strategies to solve a problem by (i) identifying inputs and outputs, (ii) breaking down the problem into smaller problems easier to solve and (iii) solving each sub-problem in the same way.

3.1 Pseudocode ontology update

[16] proposed codOnto ontology to conceptualize pseudocode exercise solution. CodOnto contains exercise description and pseudocode constructs used to write an algorithm. We use the

Protégéeditor to update codOnto ontology.

Main updates made are as follow:

• Adding of Part Class. This class describes each part

obtained from top-down method;

• Adding of hasPart and isPartOf object properties. These

properties link Exercise class with Part class and define which Part belongs to which Exercice. The two object

properties are inverse of each other. Figure 2 shows description of hasPart object properties in Protégé.

• Update of hasStatement object property and its inverse

(isStatementOf). hasStatement property linked a function (main or user functions) to statements it contains. We add the same kind of relation between Part class and Statements class. Figure 3 shows description of hasStatement object property after the update.

• Update of title data property. This property was used to describe exercise title. We use it to also describe Part title.

• Figure 4 shows description of title data property.

• Update of hasText data property. This property was used to describe exercise text. We use it to represent a help text for learners. For example, if a learner does not understand a title Part, he can display, through hasText property, a more detailed description. Figure 5 shows description of hasText

Fig. 4. Title property description

Fig. 2. hasPart description

(3)

3022 data property after the update.

3.2 Implementation

At the end of Pseudocode ontology update, we were interested in setting up a mobile and web platform to help learners to practice algorithm design, thus improving their knowledge in problem solving. To set up our platform we used several tools and technologies. To build web interface for storing and querying RDF data, we used Owlready [17] module with Python programming language. Owlready helps to load and manipulate owl ontologies as Python objects. It also helps to perform SPARQL [18] query through integrated HermiT reasoned [19]. Bootstrap [20] with its ―Mobile First‖ approach and JQuery [21] are also used to facilitate the development of our responsive interface for mobile and desktop devices. Learner’s home page provides a

user-friendly interface to retrieve available exercises to choose from. For each exercise, its title and description are given. Figure 6 shows a list of exercises with a ―solve‖ button to propose a solution. To help learners to browse the exercises we also categorize them by difficulty level (1 to 5). Difficulty level is automatically generated from exercise solution information. For example, exercise solutions just containing simple variables and/or simple statements like input, output, assignment statements are categorized easily (1). Level 2 exercises has solutions containing for example conditional statements. Level 5 exercises has solution containing, among other statements, multidimensional arrays, arrays of pointers.

The first stage to solve an exercise consists in giving its inputs and outputs. This task helps to know if learners have a minimum understanding of the exercise. For each input or output, learners give its type (mandatory) and a name based on the exercice description. Learners have the possibility to add inputs and output using plus (+) buttons. They can also delete inputs and outputs using minus (-) buttons. A drop down-list containing basic (number, char, string) and structured (array, record, …) types helps learners to choose input or output type. After submitting their answers, the system verifies

if they are correct and gives appropriate feedback. Verification concerns number and types of inputs and outputs. Figure 7 shows, for example, displayed error messages when they do not provide the correct number of data (one input is missing) or the right type (one of the output is declared as a string instead of a number). If the number of inputs and outputs is correct with right types then the system proposes to go to the next step. Figure 8 shows message sent by the system in such a case. After giving correct inputs and outputs, the system proposes top down division of the exercise and pseudocode statements in a random order. Learners’ task consists in ordering statements by dragging and dropping each of them in the corresponding part of the top down division. Figure 9 shows the four-part division of the exercise (enter inputs, calculate perimeter, calculate area, display outputs) and the unordered statements to drag and drop.

Figure 10 shows an example of the drag and drop process with five statements dropped in the right part. The goal is not Fig. 5. hasText property description

Fig. 9. Title property description

Fig. 8. Correct Inputs and outputs

(4)

3023 IJSTR©2020

www.ijstr.org only to put each statement in the right part but also to order

statements in each part. For example, the four statements in input part in figure 10 are well ordered. ―Calculate perimeter‖ and ―Calculate area‖ parts contain only one statement and are therefore ordered by default. Figure 10 also shows three remaining statements to drag and drop to finish the exercise.

4 CONCLUSION

Algorithmics is one of the most important domains in computer science. Indeed, it is a cross-cutting discipline used in many areas. Its mastery is therefore fundamental to enable computer learners to provide robust programs but also to have a proven problem-solving methodology. It is thus important to propose mechanisms to facilitate learning. It is for this reason that we have proposed in this paper, an ontology-based system to learn algorithms. We mainly go through two stages to build this system. The first phase ensures that the learner has a good understanding of the problem. During this phase the learner is responsible for identifying the problem's inputs and outputs. Our system has a feedback part that automatically guides the learner to correct errors. Errors relate

to the number of inputs/outputs and their types. The second

learning phase consists in proposing parts resulting from a top-down method and asking learner to order previously shuffled algorithm statements and drag and drop each of

them in right part.Our system encourages learners faced with

a problem to first identify inputs and outputs, then to break the problem down into sub-problems and finally to find the actions to be taken to solve each sub-problem.In the short term, we plan to evaluate learning effectiveness of our system with first-year students. To improve the system proposed here, exercises for more advanced learners can be proposed. For example, this type of learner could be asked to break down the problem into sub-problems and create from scratch a solution for each sub-problem.

5

REFERENCES

[1] R. P. Medeiros, G. L. Ramalho, and T. P. Falcão, ―A systematic literature review on teaching and learning introductory programming in higher education,‖ IEEE Transactions on Education, vol. 62, no. 2, pp. 77–90, 2018.

A. Luxton-Reilly et al., ―Introductory

programming: a systematic literature review,‖ in Proceedings Companion of the 23rd

Annual ACM Conference on Innovation and Technology in Computer Science Education, 2018, pp. 55–106.

[2] R. Lister et al., ―A multi-national study of reading and

tracing skills in novice programmers,‖ in ACM SIGCSE Bulletin, 2004, vol. 36, pp. 119–150.

[3] T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein, Introduction to algorithms. MIT press, 2009.

[4] N. F. Noy and D. L. McGuinness, Ontology

development 101: A guide to creating your first ontology. Stanford knowledge systems laboratory technical report KSL-01-05 and …, 2001.

[5] M. Atzeni and M. Atzori, ―CodeOntology: RDF-ization

of source code,‖ in International Semantic Web Conference, 2017, pp. 20–28.

[6] T. Ivanova and R. Romansky, ―Bilingual ontologies for

teaching programming in java,‖ in Proceedings of the International Conference on Information Technologies, 2014, pp. 182–195.

[7] C. Pierrakeas, G. Solomou, and A. Kameas, ―An

ontology-based approach in learning programming languages,‖ in 2012 16th Panhellenic Conference on Informatics, 2012, pp. 393–398.

A. Kouneli, G. Solomou, C. Pierrakeas, and A.

Kameas, ―Modeling the knowledge domain of the java programming language as an ontology,‖ in International Conference on Web-Based Learning, 2012, pp. 152–159.

[8] G. Ganapathi, R. Lourdusamy, and V. Rajaram,

―Towards ontology development for teaching programming language,‖ in World Congress on Engineering, 2011.

[9] C. Epure and A. Iftene, ―Semantic analysis of source

code in object oriented programming. A case study for

C,‖ Romanian Journal of Human-Computer

Interaction, vol. 9, no. 2, p. 103, 2016.

A. Alnusair and T. Zhao, ―Component search

and reuse: An ontology-based approach,‖ in 2010 IEEE International Conference on Information Reuse & Integration, 2010, pp. 258–261.

B. Diatta, A. Basse, and S. Ouya, ―PasOnto:

Ontology for Learning Pascal Programming Language,‖ in 2019 IEEE Global Engineering Education Conference (EDUCON), 2019, pp. 749–754.

[10]S. Sosnovsky and T. Gavrilova, ―Development of

educational ontology for C-programming,‖ in XI-th International Conference, 2005, vol. 1, p.127.

[11]T. Belhaoues, T. Bensebaa, M. Abdessemed, and A.

Bey, ―AlgoSkills: an ontology of Algorithmic Skills for exercises description and organization,‖ Journal of e-Learning and Knowledge Society, vol. 12, no. 1, 2016.

[12]B. Diatta, A. Basse, and N. M. Ndiaye, ―Framework

and Ontology for Modeling and Querying Algorithms,‖

in International Conference on Interactive

Collaborative Learning, 2018, pp. 536–544.

[13]J.-B. Lamy, ―Owlready: Ontology-oriented

programming in Python with automatic classification and high level constructs for biomedical ontologies,‖ Artificial intelligence in medicine, vol. 80, pp. 11–28, 2017.

[14]―SPARQL Query Language for RDF.‖ [Online].

(5)

3024

Available: https://www.w3.org/TR/rdf-sparql-query/.

[Accessed: 19-Nov-2019].

[15]B. Glimm, I. Horrocks, B. Motik, G. Stoilos, and Z. Wang, ―HermiT: an OWL 2 reasoner,‖ Journal of Automated Reasoning, vol. 53, no. 3, pp. 245–269, 2014.

[16]J. Krause, ―Introduction to Bootstrap,‖ in Introducing Bootstrap 4, Springer, 2016, pp. 23–32.

Figure

Fig. 1. Algorithm description
Fig. 4. Title property description
Figure 10 shows an example of the drag and drop process with five statements dropped in the right part
Fig. 10. Drag and drop process

References

Related documents

Planned for the races and illegal modifications below, street race tracks for illegal to be accepted on the start the drivers will also adversely affect the benton a number.. Methods

The resulting need for resource-efficient and sustainable solutions requires a new planning mindset: Integrated planning approaches leading to a smart organization and operation of

The average value of this difference was 1.5 m and 5.5 m in the case of the SRTM and the GDEM respectively, and in both cases the models showed heights lower than those on the

This assertion would provide an explanation for why conspiracy theories emerge in societal crisis situations: People often experience such situations as uncontrollable, and hence,

The authors found that a significantly higher proportion of respondents in the high cost split sample chose the ‘more expensive’ options in the subsequent choice

Web Services testing includes unit testing, functional testing, performance testing, Load/Stress testing, security testing and authorization testing. We give detailed

Stanbic IBTC Bank is a subsidiary of Stanbic IBTC Holdings PLC and a member of Standard Bank Group, Africa’s largest banking group ranked by assets and earnings, employing

Silhouette method implemented in K -means clustering algorithm helps to determine the best number of cluster by calculating the distance between each data point