Namespace funnyqt.coevo.tg

Co-Evolution transformations on TGraphs.

Other Namespaces

Show/Hide
funnyqt.bidi
Bidirectional transformations (BX).
funnyqt.edn
Printing/persisting and reading/loading query results and transformation traces as EDN.
funnyqt.emf
Core functions for accessing and manipulating EMF models.
funnyqt.extensional
Specify models extensionally.
funnyqt.generic
Generic protocols extended upon many different types, and generic functions.
funnyqt.in-place
In-place transformation stuff.
funnyqt.model2model
Rule-base out-place transformations similar to ATL or QVTo.
funnyqt.pmatch
Graph Pattern Matching on arbitrary models.
funnyqt.polyfns
Polymorphic functions dispatching on types of model elements.
funnyqt.query
Generic query functions like regular path expressions & quantified expressions.
funnyqt.query.emf
EMF-specific query functions
funnyqt.query.tg
TG-specific query functions
funnyqt.relational
Relational Model Querying.
funnyqt.tg
Core functions for accessing and manipulating TGraphs.
funnyqt.utils
Generic utility functions, e.g., for signaling errors, debugging, and profiling,
funnyqt.visualization
Model visualization functions.
funnyqt.xmltg
Convert XML to DOM-like TGraphs.
Index Page
Alphabetic Var Index

Public Vars

Usage Documentation

Show/Hide
Co-Evolution transformations on TGraphs.
  Those are transformations which simultaneously change the schema and the
  graph in-place.
Back to top

Details of Public Vars

Function: create-abstract-edge-class!

Arglists:
=========

  (create-abstract-edge-class! g qname from to)
  (create-abstract-edge-class!
   g
   qname
   from
   to
   {:keys [from-multis from-role from-kind to-multis to-role to-kind],
    :or
    {from-multis [0 Integer/MAX_VALUE],
     from-role "",
     from-kind AggregationKind/NONE,
     to-multis [0 Integer/MAX_VALUE],
     to-role "",
     to-kind AggregationKind/NONE},
    :as props})

Docstring:
==========

  Creates a new abstract EdgeClass with the qualified name `qname` starting at
  VertexClass `from` and ending at VertexClass `to` in the schema of graph `g`.
  Returns the newly created EdgeClass.  `props` is a map with additional
  properties for the edge class' incidence classes.  If omitted, the default
  is:

  {:from-multis [0, Integer/MAX_VALUE]
   :from-role ""
   :from-kind AggregationKind/NONE
   :to-multis [0, Integer/MAX_VALUE]
   :to-role ""
   :to-kind AggregationKind/NONE}
Back to top View Source

Function: create-abstract-vertex-class!

Arglists:
=========

  (create-abstract-vertex-class! g qname)

Docstring:
==========

  Creates a new abstract VertexClass with qualified name `qname` in the schema
  of graph `g`.
Back to top View Source

Function: create-attribute!

Arglists:
=========

  (create-attribute! g aec attr domain)
  (create-attribute! g aec attr domain default-or-valfn)
  (create-attribute! g aec attr domain default valfn)

Docstring:
==========

  Creates an new Attribute `attr` for AttributedElementClass `aec` in the
  schema of graph `g`.  Returns the newly created Attribute.  `aec` is a symbol
  denoting the qualified name of the attributed element class, `attr` is a
  keyword denoting the new attribute's name.  If a `valfn` is supplied, also
  sets the `attr` value of instances.  For details on `valfn`, see
  `funnyqt.extensional/set-avals!`.
Back to top View Source

Function: create-edge-class!

Arglists:
=========

  (create-edge-class! g qname from to)
  (create-edge-class! g qname from to props-or-archfn)
  (create-edge-class! g qname from to props archfn)

Docstring:
==========

  Creates a new EdgeClass with the qualified name `qname` starting at
  VertexClass `from` and ending at VertexClass `to` in the schema of graph `g`.
  Returns the newly created EdgeClass.  `props` is a map with additional
  properties for the edge class' incidence classes.  If omitted, the default
  is:

  {:from-multis [0, Integer/MAX_VALUE]
   :from-role ""
   :from-kind AggregationKind/NONE
   :to-multis [0, Integer/MAX_VALUE]
   :to-role ""
   :to-kind AggregationKind/NONE}

  If an `archfn` is supplied, also creates edges in `g`.  For the details of
  `archfn`, see function `funnyqt.extensional/create-relationships!`.
Back to top View Source

Function: create-enum-domain!

Arglists:
=========

  (create-enum-domain! g qname literals)

Docstring:
==========

  Creates an EnumDomain with the given `qname` and `literals` in `g`.
  `qname` is a symbol denoting the qualified name of the new EnumDomain.
  `literals` is a seq of literal names given as symbols.
Back to top View Source

Function: create-record-domain!

Arglists:
=========

  (create-record-domain! g qname comp-doms)

Docstring:
==========

  Creates a RecordDomain of the given `qname` and `comp-doms` in `g`.
  `qname` is a symbol denoting the qualified name of the new RecordDomain.
  `comp-doms` is a map from component name to domain name both given as
  symbols.
Back to top View Source

Function: create-specialization!

Arglists:
=========

  (create-specialization! g super sub)

Docstring:
==========

  Creates a specialization between Vertex- or EdgeClasses `super` and `sub`.
  Returns `super` again.
Back to top View Source

Function: create-vertex-class!

Arglists:
=========

  (create-vertex-class! g qname)
  (create-vertex-class! g qname archfn)

Docstring:
==========

  Creates a new VertexClass with qualified name `qname` in the graph `g`s schema.
  Returns the newly created VertexClass.  If `archfn` is supplied, also creates
  vertices of the new VertexClass in `g`.  For more details on `archfn`, see
  `funnyqt.extensional/create-elements!`.
Back to top View Source

Function: delete-attribute!

Arglists:
=========

  (delete-attribute! g aec attr)

Docstring:
==========

  Deletes AttributedElementClass `aec`s `attr` Attribute.
Back to top View Source

Function: delete-domain!

Arglists:
=========

  (delete-domain! g qname)

Docstring:
==========

  Deletes the Enum- or RecordDomain with the given `qname` from `g`s schema.
  Throws an exception if the domain is still in use by some attribute.
Back to top View Source

Function: delete-graph-element-class!

Arglists:
=========

  (delete-graph-element-class! g qname)

Docstring:
==========

  Deletes the GraphElementClass with qualified name `qname` in the schema of
  graph `g`.  VertexClasses can only be deleted if there are no incident
  EdgeClasses anymore.  All its subclasses will be deleted, too, and likewise
  all instances in the graph.  Additionally, the traceability information
  wrt. class and its subclasses is purged from `funnyqt.extensional/*arch*` and
  `funnyqt.extensional/*img*`.
Back to top View Source

Function: delete-specialization!

Arglists:
=========

  (delete-specialization! g super sub)

Docstring:
==========

  Deletes the specialization between Vertex/EdgeClasses `super` and `sub`.
  The values of properties inherited from `super` to `sub` and its subclasses
  are removed on the instance level.
Back to top View Source

Function: downtype!

Arglists:
=========

  (downtype! g super sub predicate)

Docstring:
==========

  Retypes direct instances of super-graph element class `super` for which
  `predicate` holds to instances of subclass `sub`.  Concretely, for each
  `super` instance a corresponding `sub` instance is created, and all attribute
  values are copied over.  When retyping between a vertex classes, also the
  edges incident to the selected `super` instances are relinked to the new
  `sub` instance.

  Also the traceability mappings are adapted accordingly, i.e., archetypes of
  `super` instances become instances of `sub` instances.
Back to top View Source

Function: empty-graph

Arglists:
=========

  (empty-graph sqname gcname)

Docstring:
==========

  Creates an empty graph conforming to an empty schema.
The schema's qualified name is `sqname`, and it just contains the graph class
with name `gcname`.
Back to top View Source

Function: pull-up-attribute!

Arglists:
=========

  (pull-up-attribute! g super attr)

Docstring:
==========

  Pulls up `attr` into `super` from all subclasses of `super`.
  Throws if not all subclasses declare `attr` or the declarations have no
  unique domain and default value.
Back to top View Source

Function: rename-attribute!

Arglists:
=========

  (rename-attribute! g aec-qname oldname newname)

Docstring:
==========

  Renames attribute `oldname` declared for AttributedElementClass `aec` to
  `newname` in the schema of graph `g`.  `aec` is a symbol denoting the
  qualified name of the attributed element class, `oldname` and `newname` are
  keywords denoting the attribute names.
Back to top View Source

Function: rename-attributed-element-class!

Arglists:
=========

  (rename-attributed-element-class! g old-qname new-qname)

Docstring:
==========

  Renames the AttributedElementClass denoted by `old-qname` in the schema of
  `g` to `new-qname`.  Both `old-qname` and `new-qname` are qualified names
  given as symbols thus renaming a class foo.Bar to quux.Bar is essentially a
  package move.
Back to top View Source

Function: rename-domain!

Arglists:
=========

  (rename-domain! g old-qname new-qname)

Docstring:
==========

  Renames the custem EnumDomain or RecordDomain `old-qname` in the schema of
  graph `g` to `new-qname`.  `old-qname` and `new-qname` are qualified names
  given as symbols.  A rename from 'MyEnum to 'pkg.MyEnum is a effectively a
  package move.
Back to top View Source

Function: set-abstract!

Arglists:
=========

  (set-abstract! g gec-qname val)

Docstring:
==========

  Sets the abstract property of the GraphElementClass `gec-qname` to `val` in
  the schema of graph `g`.  If `val` is true, no direct instances of the graph
  element class may exist in the graph or an exception is thrown.
Back to top View Source

Function: set-incidence-class-props!

Arglists:
=========

  (set-incidence-class-props! g ec-qname props)

Docstring:
==========

  In the schema of graph `g`, sets the properties of the IncidenceClasses of
  the EdgeClass `ec-qname` according to `props`.  `props` is a map with the
  properties for the edge class' incidence classes.  It has the form:

  {:from-multis [0, Integer/MAX_VALUE]
   :from-role ""
   :from-kind AggregationKind/NONE
   :to-multis [0, Integer/MAX_VALUE]
   :to-role ""
   :to-kind AggregationKind/NONE}
Back to top View Source