The term object slicing refers to problem cases in which an object assignment by value appears to be to a superclass instance but is actually to an instance of the same class. From the perspective of object memory layout, the member variables of the source instance can be thought of as having been "sliced off". This often surprises programmers and leads to unintended consequences. Unexpected object slicing can happen in languages such as C++ in which assignment by value is not polymorphic.
| Property | Value |
| dbpprop:abstract
|
- The term object slicing refers to problem cases in which an object assignment by value appears to be to a superclass instance but is actually to an instance of the same class. From the perspective of object memory layout, the member variables of the source instance can be thought of as having been "sliced off". This often surprises programmers and leads to unintended consequences. Unexpected object slicing can happen in languages such as C++ in which assignment by value is not polymorphic. It is not possible in Java, which allows object assignment only by reference, or the D programming language, which allows object inheritance only through reference types. Or|date=July 2009}} For example, in C++: class A int a_var; class B : public A int b_var; B b; A a = b; // expected: b. b_var is not copied to a B b2; A &a = b2; a = b; // unexpected: b. b_var is not copied to b2. b_var.
- Unter Slicing (genauer Program Slicing) versteht man die Analyse eines Computerprogramms mit dem Ziel herauszufinden, welche Anweisungen eines Programms eine bestimmte Anweisung in einem bestimmten Programmpunkt beeinflussen bzw. von ihr beeinflusst werden. In der neueren Fachliteratur findet sich der Begriff Scheibung (bzw. Programmscheibung), der synonym zu Slicing verwendet wird. Bei Static Slicing erfolgt diese Analyse unabhängig von einer bestimmten Startkonfiguration, während sie bei Dynamic Slicing für eine bestimmte Startkonfiguration erfolgt. Unter Approximate Dynamic Slicing ist zu verstehen, dass für die Methode des Static Slicing nicht das gesamte Programm herangezogen wird, sondern nur diejenigen Teile des Programms, welche bei einer speziellen Startkonfiguration durchlaufen wurden. Slicing ist auch eine Operation beim Online Analytical Processing (OLAP), hat aber nichts mit Program Slicing gemeinsam. Siehe dazu OLAP-Würfel. Diese Operation bedeutet die Einschränkung aller Ausprägungen einer Dimension auf einen fixen Wert. Dadurch wird bildlich gesehen beispielsweise ein dreidimensionaler Raum geschnitten und somit eine Fläche erzeugt.
|
| dbpprop:hasPhotoCollection
| |
| dbpprop:otheruses4Property
|
- Slicing
- object-oriented programming
- other uses of slicing
|
| dbpprop:wikiPageUsesTemplate
| |
| rdfs:comment
|
- The term object slicing refers to problem cases in which an object assignment by value appears to be to a superclass instance but is actually to an instance of the same class. From the perspective of object memory layout, the member variables of the source instance can be thought of as having been "sliced off". This often surprises programmers and leads to unintended consequences. Unexpected object slicing can happen in languages such as C++ in which assignment by value is not polymorphic.
- Unter Slicing (genauer Program Slicing) versteht man die Analyse eines Computerprogramms mit dem Ziel herauszufinden, welche Anweisungen eines Programms eine bestimmte Anweisung in einem bestimmten Programmpunkt beeinflussen bzw. von ihr beeinflusst werden. In der neueren Fachliteratur findet sich der Begriff Scheibung (bzw. Programmscheibung), der synonym zu Slicing verwendet wird.
|
| rdfs:label
| |
| owl:sameAs
| |
| skos:subject
| |
| foaf:page
| |
| is dbpprop:disambiguates
of | |