Program Comprehension Technique in Teaching and Leaning: A Cognitive Perspective nts in Student Education During Covid-19

2021, Pg. 1241 - 1253 Abstract In studying about programming languages, the important part is to understand the language itself. Learners need to be able to comprehend a program that is completed with syntax, semantic and program flow. Most learners especially the novices face a lot of problems when trying to learn a program. Many studies have been conducted to observe the process on how learners understand the program source code. Usually, the study of program comprehension focuses on the combination of two important characteristics: theories and tools. The theories that provide how to improve program comprehension and tools that can implement the theories. These two characteristics will change the way programmers understand the program codes. Many researchers review some of the key theories of program comprehension and discusses on how these theories are related to tools that support it. Thus, the aim of this study is to explore the evolution of the three predominant approaches of program comprehension in the aspect of cognitive theory which are: bottom-up, top-down and the integrated approach. This study also considers the important of cognitive model to make the effective learning process. Therefore, this paper can provide the intuitive environment for the process of learning especially for novice learners.


Introduction
Program comprehension is "the process of taking source code and understanding it" (Deimel and Naveda 1990) or the process of using the existing knowledge to acquire new knowledge (Aljunid, Zin, & Shukur, 2012;Xia et al., 2017). The understanding on program is related to execution behaviour and relationship of variables involved in the program (Hu et al., 2018;Sasirekha and Hemalatha, 2011). The study of program comprehension can be explained as the process occurs in the learners' mind when they understand a program (Feigenspan and Siegmund, 2012).
Source code is a more trusted source of data compared to composed documentation primarily since documentation is regularly non-existed or obsolete (Maalej et al., 2014). However, the problems still exist if the source code is used as reference to a system. The activity in reviewing and understanding a source code is not the same as reviewing ordinary documents and many problems in program comprehension arise due to the use of textual representation as the primary source of information. In fact, programs are often in the form of a hierarchical structure, but the actual behaviour of a program cannot be reflected as it is represented in textual forms. Although many methods and tools have been proposed to represent source code, experience have shown that textual presentation is the most suitable to represent the software system (Krinke, 2004). Despite many studies carried out in finding the different strategies and techniques to overcome program comprehension problems, most researchers have yet to discuss on how to help the software maintainers to comprehend a program.
The remaining paper is divided into the following main sections: section 2 describes the methodology of the study (plan, conduct, and analysis), followed by section 3 discusses the findings to research questions. In the end, conclusions are made in Section 4.

Methodology
This section explains the methodology conducting in this study by examining, exploring and classifying the present literature according to the cognitive domain. According to Kitchenham (Kitchenham et al., 2009) conducting the literature review are classified into three levels (i) Planning, (ii) Conducting and (iii) reporting the review. We followed methodology in this paper. In figure 1, we have shown the overall process in conducting this study.

Research Objective
The objective of this research is as below 1. To identify the types of knowledge, involve in program comprehension process. 2. To explore the approaches implementing in program comprehension.
3. To present the different existing models for program comprehension.

Research Question
Through this work, we answer those following three research questions (RQs) as shown in Table 1: Table 1 Research Questions

RQ1
What types of knowledge are applying in program comprehension process?

RQ2
What approaches are used to improve the performance of learning a program?

RQ3
What are the existing cognitive models in the fields of program comprehension?
To understand the different types of knowledge in cognitive domain.
To study the different types of existing approaches to improve learning process of a program.
To identify the existing cognitive models of program comprehension.

Knowledge Representation in Program Comprehension Process
Frequently, most of the studies on program comprehension consider three basic elements that complement to the comprehension process. These elements are knowledge based that appear in a programmer's mind; external representation and; the assimilation process (in Figure 2). The process flow explains how developers understand a program using their existing knowledge through the assimilation process supported by external representation to obtain new knowledge.

Knowledge Based
Assimilation Process

Knowledge-based
Knowledge based is an experience or existing knowledge on a program contained by a programmer. It can determine the programmers' ability to comprehend a program. Table 2 shows the types of knowledge and researchers discovering the ideas.

Authors
Types of knowledge Brooks, 1983;Carvalho, 2013;Rugaber, 2000; Domain Knowledge von Mayrhauser & Vans, 1997Soloway & Ehrlich, 1984Wiedenbeck, 1986 Plans and Rules of discourse Brooks, 1983;Rist, 1986;Weiss & Mockus, 2013 Beacons and Chunks Gellenbeck & Cook, 1991;Shneiderman & Mayer, 1979;Syntactic andSemantic Soloway &Ehrlich, 1984 Busjahn et al., 2014;Détienne, 2002;El-sheikh et al., 2013; Schemas and Abstraction Letovsky, 1987;Piaget, 2013) Domain knowledge consists of three domains, which are task/problem domains, intermediate domain and program domain (Brooks, 1983). During the comprehension process, the task domain is mapped to the intermediate domain and produces the program domain. Moreover, hypotheses can be constructed using domain knowledge by predicting the program with reference to the existing knowledge. Another types of knowledge is the plan and rules of discourse, which is used for developing and validating expectations, interpretations and inferences, includes causal knowledge on information flow and the relationships among parts of a program (Soloway and Ehrlich, 1984;Wiedenbeck, 1986).
Beacons are the familiar feature in the source code serving as a cue indexed into existing knowledge to present certain structure of plans (Brooks, 1983;Rist, 1986). On top of that, beacons are utilised to predict hypotheses. Another type of knowledge is schema. According to Piaget's theory, schemas are the way of organising knowledge to become as a unit. Each knowledge is related to aspects including the object, action and abstract concepts (Piaget, 2013).

External Representations
External representations are any materials available as an aid to support programmers while comprehending a program. The materials can be represented in different ways and formats. The external support may be in a form of system documentation, source code, manual, book or expert advises as well as techniques and tools.

Assimilation Process
Assimilation is a process comprehending a program and considering incorporated and constructed with existing knowledge. In particular sign, the characteristics of programmers while comprehending a program is important since they use all their senses and capabilities to understand a program.
Previous studies on cognitive model provide explanations on the short-, long-,and workingmemories used (Brooks 1983;von Mayrhauser and Vans 1997;Pennington 1987;Soloway and Ehrlich 1984). Other authors theorised that cognitive internal representation of knowledge is produced through the concept of frames, plans, and chunks (Minsky,1974;Rich & Waters, 1990;Soloway, 1984). Gagne (1985) also proposed cognitive strategies and believed that environment can influence the comprehension process. He stated that to stabilise the cognitive strategies, people must have certain techniques of thinking, ways of analysing problems and having approaches in solving a problem. People use cognitive strategies in thinking about the things they learnt and in solving problems. These are the ways in managing the processes of learning, remembering and thinking. Bloom (1956) discovered the ideas of learning domain called Bloom's Taxonomy and adjusted by Anderson et al. (2001). The taxonomy focuses on three domains with one of them devoted on cognitive domain that emphasises things that learners to know during learning. It involves knowledge and the ability to develop intellectual skills. Bandura (1994) argued that people can gain new knowledge through viewing or observing. He stated the steps involved in learning process, which are attention, retention, reproduction and motivation. The first learning step proposed is to pay attention to new things. Learners have to pay full attention to grasp a new knowledge. Then, they must have the ability to store the information (retention) they obtained. This internal mental state is important as an essential part in the learning process. The next step is the reproduction where learners are able to use the knowledge they grasp and to be successful in their learning, they have to be motivated to apply the new knowledge modelled.
The next is the discussion on the three predominant approaches of program comprehensions, which are top-down, bottom-up and integrated meta-model. These models are the foundation in creating the new model of program comprehension (Meng et al., 2006;O'brien, 2003).

Top-down
Typically, top-down approach is adopted when the developers become familiar with the source code (Soloway and Ehrlich 1984). This approach is goal-oriented and hypothesis-driven contains a hierarchy of goals and plans. It is the dynamic process strategy of reconstructing knowledge to formulate hypotheses regarding the domain of the program and mapping this knowledge to the source code and use the strategic plan to implementation plan (Brooks 1983;Von Mayrhauser and Vans 1995;Storey 2005). However, the limitation of this approach is that it does not consider

Program Comprehension Cognitive Models
This section discusses the existing models supporting program comprehension. The discussion is based on selected papers focusing on the strategies, approaches and the process taken to assimilate the existing knowledge to yield new knowledge. Figure 3 shows the evolution of program comprehension discussed by Schulte et al. (2010). In previous studies, most of the researchers used the cognitive model as a strategy to propose a program comprehension model. They believe that this is the way of managing the processes of learning, remembering, and thinking.
The first model proposed by Shneiderman & Mayer (1979) uses the bottom-up approach focusing on novice users. The model involves the short-term memory and long-term memory as well as the internal semantic knowledge to develop mental model. It involves a process of chunking in which users are mentally making a chunk out of a program guided by the beacons. Pennington (1987) proposed a model with bottom-up approach guided by beacons, plans and text structure to perform chunking process. The work integrated the domain and program model to depict situation model. Burkhardt et al (2002) in their study use bottom-up approach to comprehend Object-Oriented Program compared to Shneiderman & Mayer (1979); Pennington (1987) that focuses on structured program.
Instead of cognitive models, the combination of other models were applied in the studies such as text comprehension model (Pennington 1987), constructivist model (Exton, 2002;Václav et al., 2002), vision model (Ali et al., 2011 and problem solving model (Douce, 2008). Learning Model proposed by Rajlich & Wilde (2002) interprets programmes based on constructivist theory where the developer divides program comprehension process into assimilation and adaptation. From his perspective, assimilation is the process of adding new facts to mental model, otherwise adaptation is the process of organising the existing knowledge to absorb new knowledge. Xu (2005) extends the Learning Model, namely Multi-Dimensional Model integrating the Bloom's Taxonomy, cognitive model and learning model. This study looks at the activities of assimilation and accommodation in the learning process. Although this study focuses on experts to make a hypothesis, it is also suitable for novices as it combines top-down and the bottom-up approaches. Meng et al. (2006) introduced the Comprehension Process Model that utilises ontology and the description logic to constitute the content of mental model. The ontology based on story-drive is used to model the sources of information that describes the behaviour of a program. Store Model proposed by Douce (2008) is the heuristic model combining the elements in the working memory model and other knowledge such as strategic, semantic and plan. Frey et al (2011) worked on categorisation and separation of concern to build a mental model. Their study took an element in programmers' knowledge to understand the program of concern. The process makes use of prediction or hypothesis using prior knowledge and verification on the prediction will update the knowledge about the concern. The classification of the models was made as shown in Table 3.  Vans, 1997;Xu, 2005) beacons

Conclusion and Future Work
This study is important in order to help novice learners to improve their comprehension in their learning process. Besides, this study can be seen as a form of guideline for researchers who is interested in developing tools that focus on improving comprehension. Besides, this study can contribute as an introduction in learning programming language for the novices. Future work will focus on the development of new technique in order to improve understanding in program comprehension activity. As well as to produce effective tool that can be used as an aid among novice learners when they learn a programming language; and to measure the significance of the proposed technique and its tool in improving comprehension if it is used among novices.