Skip to content

avoidance of inconsistent states in case of errors #31

@GoogleCodeExporter

Description

@GoogleCodeExporter

Many sanity checks ar performed at runtime. Examples are:

  • When constructing ASTs the respective specification must be compiled
  • When compiling a specification, its consistency is checked
  • When querying AST information, the respective information must exists (querying the parent of a root throws an exception, likewise querying a bud-node for its type etc.)
  • When rewriting, its is ensured that rewrites satisfy the AST scheme

Many of these actions are accompanied by respective internal state changes of
the specification, AST, dependency graphs, evaluator etc. If internal state
changes are intertwined with sanity checks that throw exceptions, the system
can end in an inconsistent state. It is desirable however, that RACR exceptions
are continuable, such that users have a chance to fix their request and try
again. In consequence, sanity checks should be performed before any state
change, such that respective exceptions are thrown before atomic state changes
are preformed.

The objective of this issue is to refactor all state changing functions such
that they become continuable in case of errors thrown by RACR sanity checks.
Note, that ordinary Scheme exceptions are not subject of this issue; Only RACR
exceptions as introduced by issue #8.

This issue replaces issue #9.

Original issue reported on code.google.com by Christoff.Buerger on 13 Mar 2015 at 1:43

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions