Generator of sequence editions for sets of modules

Author(s): Isabel Garcia-Contreras.

This module generates sequences of states sets, i.e., having present their elements or not, (represented as lists).

To specify the configuration of the sets a list must be created of the form [NameSet1-NObjects1, NameSet2-NObjects2 ...]. Each step of the sequence is composed of an atom present(Name, List), with the List of length NObjects of the set.

Example

This is an example to create a sequence in which elements are added 1 by 1 until the sets have all their elements present. In this case we are using the number 1 to mark that an element is present:

“` ?- generate_edit_sequence_mods([m3-1, m2-1, m1-2], 4, 4, 1, 1, S).

S =[[present(m3,[1]),present(m2,[_]),present(m1,[_,_])], [present(m3,[1]),present(m2,[1]),present(m1,[_,_])], [present(m3,[1]),present(m2,[1]),present(m1,[1,_])], [present(m3,[1]),present(m2,[1]),present(m1,[1,1])]] ?

yes ?- “`

An example to get a sequence in which elements are added 2 by 2 and randomly: “` ?- generate_random_edit_sequence([set1-3, set2-1, set3-2], 6, 3, 2, 1, S).

S = [[present(set1,[_,_,_]),present(set2,[_]),present(set3,[_,_])], [present(set1,[_,1,_]),present(set2,[1]),present(set3,[_,_])], [present(set1,[_,1,_]),present(set2,[1]),present(set3,[1,1])], [present(set1,[1,1,1]),present(set2,[1]),present(set3,[1,1])]] ?

yes ?- “`


Usage and interface

Documentation on exports

Usage:generate_random_edit_sequence(Mods,NCls,NSteps,NEdits,EditType,Seq)

Generates in Seq a sequence NSteps steps of statuses of predicate editions for Mods with a difference of NEdits of type EditType.

    No further documentation available for this predicate.

    No further documentation available for this predicate.

    Documentation on imports

    This module has the following direct dependencies: