Commit graph

4108 commits

Author SHA1 Message Date
67b5df0d1d WIP: start factoring out the virtual copy support 2015-04-20 00:49:49 +02:00
5a4290d4a7 TICKET #738: re-implemented Variant functionality complete - unit test pass 2015-04-19 03:18:24 +02:00
7686122354 implementation complete -- kindof works
there is a problem with the virtual assignment,
seems the default policy was picked.

Beyond that, the rest of the unit test passes
2015-04-19 02:02:54 +02:00
93ced30770 Format-Utils: switch to demangled type names
TODO: might break some unit-tests...

Explanation: our wrapper around boost::format has special
built-in support for custom operator string(). Any type,
which is neiter standard, or printable through such a
custom string conversion, is represented as a type-string.
For this fallback case, we now use our recently added
demangling call (which actually relies on a rather obscure
but standard compiler API)
2015-04-19 01:02:34 +02:00
7a6d352ef5 code up the full virtual copy support policty decision logic
still passes compilation, but not actually tested.
The visitor-style accees needs to be implemented, and the
whole virtual copy support mechanism extracted into a separate
header and covered by unit test
2015-04-18 18:08:48 +02:00
5e95a4e31d adjust to pass compilation
now the solution with the copy policy class is in place,
I prefer to return to the more verbose yet clearer notion
of distinct constructors for each case on the outer and
the inner capsule likewise.

The idea with the separate builder class would be significant
only if this class would also provide the copy support. This
turns out to be difficult, due to the access restrictions
and the necessary passing of type parameters.
2015-04-18 16:53:39 +02:00
40a9df666f WIP: draft towards a solution of the copy policy problem
turns out to be quite a tough challenge....
since obviously we want to support usage of types with
partially disabled copy/assignment operations within Variant.
As long as the corresponding operations on the container aren't
invoked, we expect those types to be usable just fine.

The problem arises at the interaction with type erasure;
to support corret copy / assignement in such a situation, we need
virtual copy / assignment operators. And, since these are to be installed
into a VTable, the templated functions will be instantiated allways,
which might cause invocation of inhibited copy / assignement functions
and thus compilation failure, in spite of never actually invoking such
an illegal operation.

The drafted solution is to mix in a specifically configured copy support policy,
which at least raises a runtime error, instead of invoking the incriminating operation(s)
2015-04-18 02:49:09 +02:00
c32685ada8 WIP: first round of implementation
finally got all those copy / assgnment flavours straight.

Still unsolved: unable to instantiate the Variant template
for a type with private assignment operator (like e.g. Time )
The problem is our virtual assignement operator, which forces
instantiation of the implementation (for the VTable), even if
the actual assignment is never invoked.
2015-04-17 19:33:25 +02:00
8794aec35a fix a warning after C++11 transition (#898)
it is still questionable why GCC emits the warning
"enumeral and non enumeral constant in comparison"
since both arguments of the comparison are enum constants.


I've asked that question on stackoverflow....
http://stackoverflow.com/questions/29685367/reasoning-behind-enumeral-and-non-enumeral-type-in-conditional-expression
2015-04-17 03:12:08 +02:00
413a6a5d48 outline and stub the API functions. 2015-04-16 23:04:36 +02:00
eb263d44d7 TICKET #738: design API of a new variant implementation
- we do not want type mutations
- we do not want "empty" records ever
- we do not support "probing" for contents
- visitor style access for generic value handling
2015-04-16 20:29:03 +02:00
4092feb3c8 TICKET #738: move asside existing variant implementation
this was an immature first desgin attempt; we need a lightweight
Variant (typesafe union) implementation, so now is the time for
a second attempt. The existing Variant is used only once, and this
usage as such is in a questionable context, likely to be reworked
when we actually start coding up the builder. So I'll just move
it away and mark it @deprecated for the time being.
2015-04-16 18:38:35 +02:00
8a13a5092c switch to static_assert (C++11) 2015-04-16 02:27:03 +02:00
f20e07647c Website organisation: consolidate the GUI Discussion section
- improved overview pages
- move the proposals into subfolder
- incorporate the Interface Design by Clay Barnes
- fix various links
2015-04-15 17:48:48 +02:00
Clay Barnes
ecb99514bd Lumiera Timeline Interface Draft
Remarks: this contribution was originally published on Clay Barne's Blog
https://www.hci-matters.com/blog/2008/05/21/archives/41/
2015-04-15 17:41:52 +02:00
841b1b8e3f Website organisation: move the GUI proposals in a subfolder 2015-04-15 17:18:09 +02:00
6db3f270cf Include the conrtibution of Christoph Varga into the Workflow design section 2015-04-15 16:43:52 +02:00
51cdc85e58 back from LAC2015: re-read and simplify the code draft 2015-04-13 15:49:38 +02:00
Christoph Varga
b50bf82728 Lumiera Gui Concept -- introductory page 2015-04-11 12:00:00 +02:00
2e1df16bdc settle on a concrete implementation approach based on inheritance chain
After some reconsideration, I decide to stick to the approach with the closures,
but to use a metaprotramming technique to build an inheritance chain.
While I can not decide on the real world impact of storing all those closures,
in theory this approach should enable the compiler to remove all of the
storage overhead. Since, when storing the result into an auto variable
right within scope (as demonstrated in the test), the compiler
sees the concrete type and might be able to boil down the actual
generated virtual function implementations, thereby inlining the
given closures.

Whereas, on the other hand, if we'd go the obvious conventional route
and place the closures into a Map allocated on the stack, I wouldn't
expect the compiler to do data flow analysis to prove this allocation
is not necessary and inline it away.


NOTE: there is now guarantee this inlining trick will ever work.
And, moreover, we don't know anything regarding the runtime effect.
The whole picture is way more involved as it might seem at first sight.
Even if we go the completely conventional route and require every
participating object to supply an implementation of some kind of
"Serializable" interface, we'll end up with a (hand written!)
implementation class for each participating setup, which takes
up space in the code segment of the executable. While the closure
based approach chosen here, consumes data segment (or heap) space
per instance for the functors (or function pointers) representing
the closures, plus code segment space for the closures, but the
latter with a way higher potential for inlining, since the closure
code and the generated virtual functions are necessarily emitted
within the same compilation unit and within a local (inline, not
publickly exposed) scope.
2015-04-05 18:26:49 +02:00
723d1e0164 settle architectural considerations regarding the TreeMuator concept
so yes, it is complicated, and inevitably involves three layers
of indirection. The alternative seems to bind the GUI direcly to
the Session interface -- is there a middle gound?

For the messages from GUI to Proc, we have our commands, based
on PlacementRef entities. But for feeding model updates to the
GUI, whatever I consider, I end up either with diff messages or
an synchronised access to Session attributes, which ties the
responsiveness of the GUI to the Builder operation.
2015-04-03 20:10:22 +02:00
e4a1261849 initial syntax draft
the envisioned DSL syntax for installing the binding closures
into a generic tree mutator object seems to work out
2015-04-02 03:30:20 +02:00
e490fe0263 expand that draft to cover some of the technicalities
- how to deal with children
- how to integrate typing of children
2015-04-01 02:45:22 +02:00
513c02d767 design breakthrough? concept how to implement tree mutations
this is an attempt to resolve the "impedance mismatch" between
a generic metadata model and heterogeneous GUI implementation code
2015-03-30 00:25:37 +02:00
7742d78ba7 investigating use cases of state update notification
the scope is to find out what is relevant for the diff representation,
to be able do design the GenNode element accordingly
2015-03-22 17:39:47 +01:00
f90e9c7bbd adjust the related RfC "SystematicMetadata"
There is a long-standing RfC which basically describes the
same idea on a much wider, conceptual scope. Indeed I consider
this approach used here for solving the problem with GUI uptades
also as a proof of concept, to be expanded to a much wider scope
in case it works out well.

The new insight here is, that, by transferring a diff in pull mode,
we can circumvent the architectural problems with typing, which
showed up quite clearly in earlier design studies towards this
concept. The change from push to pull is by far not so fundamental
as it looks, since the sender still may initiate the exchange
by sending a message offering the diff iterator for the receiver
to pull. This way, we get a handshake and still sustain the
crucial part, which is to decouple the data representation
and give the receiver full control over the interpretation
of the exchanged data.
2015-03-22 01:37:16 +01:00
b051845835 identify and decide on some of the insidious questions of design
- how to deal with typing
- how to relate equality and mutations
2015-03-21 19:23:41 +01:00
f5ddfa0dbe decide on the foundations of tree diff representation
- we use a GenNode element
- this holds a polymorphic value known as DataCap
- besides simple attribute values, this may hold collections of GenNode sub elements
- a special kind of GenNode collection, the Record, is used to represent objects

The purpose of this setup is to enable an external model representation
which is only loosely coupled to the interndal data representation
through the exchange of (tree)diff messages
2015-03-21 02:00:55 +01:00
9a9e17578c extended planning to define the operation of UI-Bus and model update
this includes a decision about the tree diff representation and handling format
2015-01-17 16:08:56 +01:00
28d18a7326 refactoring: better name for the query focus shifting operation
previously this operation was named 'attach', which an be confused
with attching an object to this location. Indeed, the session interface
even offers such an attach function. By renaming the focus moving
operation into QueryFocus::shift(Scope), this ambiguity is resolved
2015-01-08 15:13:27 +01:00
7bd3eafd46 adjust gui code indentation 2015-01-07 00:53:03 +01:00
8b6177a1c5 Design: Backbone of the GUI
This is the first step towards a generic backbone to connect
any GUI elements to the session within Proc-Layer.

It is based on a spefic understanding of Model-View-Controller,
which turns the Model-Controller interactions into messages.
2015-01-06 23:44:58 +01:00
371c13f790 add TODO markers regarding #959
Some parts of the GUI model will be remoulded
2015-01-05 15:47:23 +01:00
1a5e5eaa10 DOC: Wiki / UML clean-up
Remove some orphaned diagrams and PNG images not actually used
in the TiddlyWiki. Add a page with some hints regarding Bouml

See also #960 -- Bouml has been discontinued and is closed source now
not sure how to proceed with this
2015-01-05 15:44:17 +01:00
55b2c79aad Implementation of List Diff detection finished. Unit Test PASS 2015-01-04 15:13:16 +01:00
a12a739f05 allow for iterative access to the snapshot data in the lookup table 2015-01-04 14:23:12 +01:00
a8d1cd9c8b trivial implementation of index / snapshot table
lots of room for improvement here :)
2015-01-04 14:01:07 +01:00
80eec4132b factor out index table helper and define its contract 2015-01-04 13:23:57 +01:00
d0dcccbd1b move and split drafted code to the acutal library headers 2015-01-04 12:36:13 +01:00
eb8ad8ed11 code up the actual list diff generator algorithm
sans the implementation of the index lookup table(s)

The algorithm is KISS, a variant of insertion sort, i.e.
worst time quadratic, but known to perform well on small data sets.
The mere generation of the diff description is O(n log n), since
we do not verify that we can "find" out of order elements. We leave
this to the consumer of the diff, which at this point has to scan
into the rest of the data sequence (leading to quadratic complexity)
2015-01-04 12:02:41 +01:00
5427d659d7 definition reordering and comments 2015-01-04 09:26:25 +01:00
97c63e0472 solution how to place and use the diff token constructors
finally....
The problem is that the C++ "dependent types" defeat the typical
DSL usage, where you define some helper function in a generic
language setup class and mix this language in as superclass.
This is, C++ requires us to refer explicitly to any dependent type,
since, due to possible template specialisations, the parser
can't know if a given symbol is a inherited type or a field.

As a solution, we place the token constructor functors into a
static struct "token", which allows to write e.g. token.insert(xyz)
2015-01-04 09:08:36 +01:00
5c818aff69 better typename 2015-01-03 12:52:09 +01:00
6d5f86423c sharpening the concept of structured data exchange through diff 2015-01-03 12:36:10 +01:00
5bae84392a implementation of demand-driven diff generating iterator
TODO: actual decision tree
2015-01-03 02:37:33 +01:00
25646337cd change list diff language to rely on 'find' instead of 'push'
As decided in beb57cde
this changeset switches our basic list diff language to work
in the style of an insertion sort. Rather than 'pushing back'
out-of-order elements, we scan and bring forward missing elements.

Later, when passing the original location of the elements
fetched this way, a 'skip' verb will help to clean up
possible leftowers, so implementation is possible
(and indeed acomplished) without shifting any other elements.
2015-01-02 13:18:25 +01:00
e06bb27be4 stub complete implementation framework for diff detection
without implementation; but it is clear now where snapshots are
taken and how the implementation will be hooked up: as iterator
based on a state core.
2015-01-02 12:25:55 +01:00
a3d89e304f minor style fix 2015-01-02 11:48:02 +01:00
ee941996c4 DSL tokens need to be equality comparable
and this adds a twist: conceptually, we identify the token
with the abstract handler function it represents. But C++
does not allow us to compare member pointers to virtual functions,
for good reason: even two pointers with the "same offset" into
the VTable might end up referring to different implementations,
when bound to instances of different subclasses. This is what
polymorphism is all about.

At this point it seems reasonably, albeit a bit uggly, to use the
diagnostic ID as placeholder instead, and just compare these IDs
instead. We assume that in practice tokens will be defined through
the provided helper macro, which ensures unique identifiers.
2015-01-02 11:31:29 +01:00
cd85b3425e fix: neat a dedicated translation unit for definitions
...yes, sometimes we even want to emit code ;-)
2015-01-02 11:26:27 +01:00