Abstract class 2026-10-24
An abstract class cannot be instantiated directly and may combine concrete state or behavior with abstract operations that subclasses implement. Concrete object methods can depend on a representation convention that every subclass must maintain. An abstract declaration still has a result type: omitted result types in Scala 2 procedure syntax mean Unit, not an unspecified Boolean query.
Bernard Sufrin Created 2026-10-31 Updated 2026-11-05
Bernard Sufrin is a computer scientist whose work includes formal methods, programming language design and tools for mathematical reasoning about programs. His Oxford profile identifies computer support for refinement and proof among his research interests.[ref]
His Communicating Scala Objects by Bernard Sufrin describes a Scala library for concurrent computing through communicating components. Channels and process composition make communication structure explicit; closure and alternation then require specified semantics so that a component can respond coherently to several possible interactions.[ref]
For a nonempty string, assign a character its occurrence count divided by the string length. Counts partition the character positions, proving normalization. Empty input has no total count to normalize and needs an explicit alternative contract or rejection. A Scala Char implementation counts UTF-16 code units unless a separate code-point representation is introduced.
Communicating Scala Objects Created 2026-10-31 Updated 2026-11-05
A Scala library for constructing communicating concurrent processes with typed message-passing channels, parallel composition and guarded alternation.[ref]
Companion class 2026-10-24
In Scala, a class paired with a same-named companion object in the appropriate source context. They can access each other's private members. This permits a companion object to hide implementation-node definitions while the corresponding class creates and manipulates those nodes.[ref]
Companion object 2026-10-31
In Scala, a singleton object associated with a same-named companion class in the required source context. Object members and instance members are distinct: B.g(x) invokes a member of object B, while b.g(x) invokes an instance member through b. Both can use method overloading, but the instance's members are not automatically part of the companion's overload set.[ref]
A parameter position for which implies . In Scala, it is annotated -. A consumer capable of accepting every broad-type value can safely serve a context that supplies only narrower values. Returning a value of that parameter type would generally break this guarantee.
Covariant type parameter 2026-10-24
A parameter position for which implies . In Scala, it is annotated +. An immutable producer can return narrower values where broader values are expected. A method consuming that parameter directly would generally make covariance unsafe, since a widened reference could then receive unsupported inputs.
Dynamic dispatch 2026-10-24
Selection of an instance method implementation using the receiver's runtime type. It operates on the method signature already determined by the language's call typing and overload rules. It does not imply dispatch on every argument's runtime type; in particular, method overloading in Scala normally uses static argument types.
F-bounded polymorphism 2026-10-31
A type parameter can be bounded using a type expression containing that same parameter. In Scala, [T <: Ordered[T]] requires each admissible T to provide comparison with another T. This gives a generic minimum scan access to x < y for two elements of type T. An arbitrary unrelated upper bound would not establish the needed argument type.
Generic method 2026-10-31
An object method with its own type parameters, instantiated or inferred at each call. In Scala, def identity[T](x: T): T = x is a generic method. A method def accept(x: T) inside class Box[T] instead uses a class type parameter fixed by the receiver's type argument; it is not itself a generic method with a separately chosen T on every call. This distinction matters in method overloading.
The 12 June 2013 preliminary examination paper, released as member 4216-1.pdf of Fakour Zip Final 1.zip. Questions 1–4 concern imperative programming and data structures; Questions 5–8 concern Scala object-oriented programming.
Implicit conversion Created 2026-10-31 Updated 2026-11-05
A conversion inserted by the language's typing rules rather than an explicit conversion call in source code. Its availability depends on scope and the conversion rules; converting a method receiver and converting an argument are distinct uses. In Scala, an imported implicit conversion can supply a rational-number receiver for an integer expression lacking an applicable multiplication overload.
Lower type bound 2026-10-31
A lower bound requires an admissible type argument to be a supertype of a specified type. In Scala, [V >: U] means . For an immutable software class covariant in U, a method accepting a new output value cannot consume U directly in a contravariant method-parameter position. Instead, add[V >: U](x: V) accepts a possibly wider value and returns a fresh instance parameterized by V. The original narrower instance remains unchanged. The variance-position rule and subtyping justify this widening; a bound alone does not authorize mutating an existing instance through a widened reference.[ref]
Memento pattern 2026-10-24
A design in which an originator creates an opaque snapshot of its state, a caretaker retains it, and the originator can later restore it. Encapsulation prevents the caretaker from depending on internal state representation. A memento must freeze the relevant state: references to mutable objects can require a deep copy, while immutable values can safely be shared. Scala's access controls and path-dependent types can restrict snapshot construction and associate it with its originating instance.
Method overloading 2026-10-24
Several callable methods share one name but differ in parameter signatures. In ordinary Scala calls, the compiler chooses among applicable alternatives using the receiver and arguments' static types, preferring a uniquely most-specific applicable alternative. Overloading is therefore a different step from method overriding and receiver-based dynamic dispatch.
Method overriding 2026-10-24
A subclass or composed trait supplies an implementation of an inherited method signature. Ordinary instance calls use dynamic dispatch to choose the effective implementation for the receiver, after any overload selection. In Scala, overriding a concrete inherited member requires the override modifier; a qualified super invocation selects the corresponding inherited implementation.
Mixin 2026-10-24
Reusable behavior composed into a host class in object-oriented programming, often through a trait. Scala allows one superclass and several mixed-in traits. Required abstract members let a mixin depend on host capabilities without fixing one concrete superclass; member conflicts and super calls are resolved using the language's linearization rules.
Numeric widening 2026-10-31
A language-defined conversion from a numeric type to another admitted numeric type, such as Scala's conversion of an Int argument to Double. It can make an overloaded method applicable even when the argument's static type differs from the parameter type. It does not imply a subtyping relationship between every pair of numeric types or exact representation of every source value; sufficiently large integers can lose precision in a floating-point target. [ref]
Solutions to all three questions of the paper dated 2 June 2015.[ref] The Scala fragments use Communicating Scala Objects notation: proc constructs a process, p() runs it, and || runs its components concurrently and waits for all of them. Inputs and outputs below are reliable and ordered; timing and scheduling assumptions are stated where needed.