Preferencje help
Widoczny [Schowaj] Abstrakt
Liczba wyników

Znaleziono wyników: 2

Liczba wyników na stronie
first rewind previous Strona / 1 next fast forward last
Wyniki wyszukiwania
Wyszukiwano:
w słowach kluczowych:  iterator
help Sortuj według:

help Ogranicz wyniki do:
first rewind previous Strona / 1 next fast forward last
1
Content available remote Comparing the understandability of iteration mechanisms over Collections in Java
EN
Source code understandability is a desirable quality factor affecting long-term code maintenance. Understandability of source code can be assessed in a variety of ways, including subjective evaluation of code fragments (perceived understandability), correctness, and response time to tasks performed. It can also be assessed using various source code metrics, such as cyclomatic complexity or cognitive complexity. Programming languages are evolving, giving programmers new ways to do the same things, e.g., iterating over collections. Functional solutions (lambda expressions and streams) are added to typical imperative constructs like iterators or for-each statements. This research aims to check if there is a correlation between perceived understandability, understandability measured by task correctness, and predicted by source code metrics for typical tasks that require iteration over collections implemented in Java. The answer is based on the results of an experiment. The experiment involved 99 participants of varying ages, declared Java knowledge and seniority measured in years. Functional code was perceived as the most understandable, but only in one case, the subjective assessment was confirmed by the correctness of answers. In two examples with the highest perceived understandability, streams received the worst correctness scores. Cognitive complexity and McCabe's complexity had the lowest values in all tasks for the functional approach, but - unfortunately - they did not correlate with answer correctness. The main finding is that the functional approach to collection manipulation is the best choice for the filter-map-reduce idiom and its alternatives (e.g., filter-only). It should not be used in more complex tasks, especially those with higher complexity metrics.
2
Content available remote Idea for symbolic iterator in BDD environment
EN
In the paper the concept of symbolic iterator has been presented. The iterator has a task to proceed through a set of states symbolically represented by logic function. The whole is implemented in C/C++ language in CUDD BDD package. Every state from the set corresponds to minterm from the function which is subsequently generated by the iterator. Minterm generation consists in searching BDD tree and producing cube terms covering function minterms. Next, for each cube, the iterator algorithm generates full function minterm. Apart from minterm iterator class declaration, in the paper has been also presented a piece of C++ code demonstrating usage of the symbolic.
PL
W artykule przedstawiono koncepcję iteratora symbolicznego, którego zadaniem jest poruszanie się po zbiorze stanów, symbolicznie zapisanym funkcją logiczną. Całość zaimplementowana jest diagramami BDD z pakietu CUDD, który udostępnia zestaw funkcji i klas w języku C/C++. Zadaniem iteratora jest generowanie mintermów funkcji, co polega na przeglądaniu drzewa BDD funkcji i produkowaniu kostek. Dla każdej kostki algorytm buduje term składający się z brakujących zmiennych, tworząc w ten sposób pełny minterm. W pracy również przedstawiono klasę obiektu iteratora oraz przykładowe wykorzystanie iteratora.
first rewind previous Strona / 1 next fast forward last
JavaScript jest wyłączony w Twojej przeglądarce internetowej. Włącz go, a następnie odśwież stronę, aby móc w pełni z niej korzystać.