FScript, short for FScript, was created in 2001 by Stephane Ducasse and colleagues as part of the Moose project at the University of Savoie. FScript is a scripting language designed for exploring, querying, and manipulating object-oriented systems, particularly Smalltalk and model-driven engineering environments. It is used in software analysis, reverse engineering, and interactive object inspection. Developers can access FScript through the official repository: FScript Downloads, which provides the interpreter, libraries, and documentation for platforms that support Smalltalk environments such as Squeak and Pharo.

FScript exists to enable dynamic inspection and manipulation of live object-oriented systems. Its design philosophy emphasizes simplicity, introspection, and ease of experimentation. By providing a concise, interactive syntax for querying object graphs and modifying object behavior at runtime, FScript solves the problem of navigating complex object hierarchies and testing software models without recompilation.

FScript: Objects and References

FScript allows users to navigate and manipulate objects, their attributes, and references within a Smalltalk or model-driven system.

| person address |
person := Person new.
person name: 'Alice'.
address := Address new.
address city: 'Paris'.
person address: address.
Transcript show: person name; nl.

Objects are dynamically created and linked via references. This enables inspection and modification of live data, conceptually similar to runtime object manipulation in Smalltalk or reflective programming in JavaScript.

FScript: Querying Object Graphs

FScript provides concise expressions for querying object hierarchies and filtering data based on attributes or relationships.

persons := (System allInstancesOf: Person) select: [:p | p address city = 'Paris'].
Transcript show: persons size; nl.

Queries allow developers to extract meaningful subsets of objects efficiently. This declarative style is conceptually similar to collection operations in Smalltalk or LINQ in C#.

FScript: Modifying Objects and Attributes

FScript allows direct modification of object attributes and connections at runtime.

person name: 'Bob'.
(person address) city: 'London'.
Transcript show: person name; nl.

This runtime flexibility enables experimentation and debugging without restarting the system. It is conceptually similar to reflective object manipulation in Smalltalk or dynamic property assignment in JavaScript.

FScript: Integration and Exploration

FScript integrates tightly with Smalltalk-based IDEs and modeling frameworks, providing interactive consoles and scripts for exploring live systems.

workspace := FScriptWorkspace new.
workspace open.

The integration allows users to browse, query, and modify objects visually or through code. This environment is conceptually similar to live object inspection in Pharo or development consoles in Smalltalk.

FScript is used in software analysis, reverse engineering, and model-driven engineering research. Its lightweight syntax, live object inspection, and integration with Smalltalk-based platforms make it ideal for developers and researchers who need to explore and manipulate object-oriented systems interactively. When used alongside Smalltalk, Pharo, and JavaScript, FScript provides a flexible and powerful environment for understanding, testing, and experimenting with object-oriented software systems.