The design and implementation of a programming environment including an editor, a debugger and an interpreter engine for Lograph, a general-purpose visual logic programming language, is discussed. The rationale for user-interface design decisions is presented, the goal of which is to increase cognitive support for the creation, exploration and debugging of Lograph programs. The design of the interpreter engine allows for animation of execution in the debugger. The engine takes full advantage of an efficient implementation of Prolog, and operates on a Prolog translation of Lograph programs and queries. The translated Lograph programs are probed with instrumentation code at appropriate places so that applications of Lograph rules are reported to the visual interface of the Lograph debugger as a side effect of the execution of a program.
Computer Aided Design systems provide tools for building and manipulating models of solid objects. Some also provide access to programming languages so that parametrised designs can be expressed. There is a sharp distinction, therefore, between building models, a concrete graphical editing activity, and programming, an abstract, textual, algorithm-construction activity. The recently proposed Language for Structured Design ( LSD ) was motivated by a desire to combine the design and programming activities in one language. LSD achieves this by extending a visual logic programming language to incorporate the notions of solids and operations on solids.Here we investigate another aspect of the LSD approach; namely, that by using visual logic programming as the engine to drive the parametrised assembly of objects, we also gain the powerful symbolic problem-solving capability that is the forté of logic programming languages. This allows the designer/programmer to work at a higher level, giving declarative specifications of a design in order to obtain the design descriptions. Hence LSD integrates problem solving, design synthesis, and prototype assembly in a single homogeneous programming/design environment. We demonstrate this specification-to-final-assembly capability using the masterkeying problem for designing systems of locks and keys.
We present a layout algorithm for the Lograph debugger which automatically rearranges a Lograph query graph at run time in response to the application of Lograph rules by the interpreter. The algorithm addresses certain cognitive issues, aiming to make the execution of query graphs more comprehensible. It incorporates a foresighted graph adjustment technique that improves the layout of a query by searching for data structure patterns and looking ahead in the execution. The look-ahead attempts to decrease the expected future changes in the layout by leaning the current layout towards one that would require less modifications in the next few execution steps. The execution of a program in the debugger can be observed as a smooth transformation to a solution graph from a query graph, the layout of which is created by the user.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.