using frames to encapsulate building blocks, e.g., like macros or functions in
a programming language. Since measurements only know about the frame containing
a vector but not the frames containing that frame, invocations of this frame
from different places can only be distinguished within the min/next/max scheme.
(See the example in README.)
To eliminate this limitation, one needs a way to tell fped to consider a point
only if it has been instantiated through a certain path, e.g., by requiring
some other frames to be visited in its instantiation. This increases the number
of distinct points available for measurements.
The mechanism chosen is to qualify a measurement point with frames that lead to
it. This list of outer frames does not have to include all frames. Without
qualifying, the old behaviour results.
Note that this doesn't cover all possible ways in which a point can appear in
different roles. Multiple frame references can also result from repeating the
same frame reference in the same parent frame. The current qualification
mechanism does not allow such paths to be distinguished. However, one can
always introduce intermediate frames for this purpose.
Furthermore, repetitions create multiple instances of a point, although in what
should be considered the same role.
- fpd.l: make scanner support free-format a little better by switching back to
keyword mode after frame braces. This way, one can write a simple frame in a
single line, which is useful for regression tests.
- fpd.l, fpd.y, README, test/dbg_meas: added %meas directive to print the
result of a measurement
- fpd.y, README: measurements can now be labeled. Note that, due to limitations
of the grammar, the first measurement cannot be labeled.
- error.h, error.c (yywarn): new function for non-fatal diagnostics that always
get reported to standard error
- bitset.h, bitset.c: functions to manipulate variable-size bit sets
- meas.h, fpd.y, README, test/meas_qual: added the means to specify qualifiers
for points used in measurements
- dump.c (print_meas_base, print_meas): dump qualifiers
- delete.c (delete_references, test/del_frame): delete measurements that
reference a frame being deleted in their qualifiers
- obj.h, obj.c (enumerate_frames, instantiate): enumerate all frames so that we
have an index into the bit vector of visited frames
- meas.h, meas.c (reset_samples, meas_post), obj.c (generate_vecs,
generate_frame, instantiate): record the set of frames visited for each
sample
- meas.c (meas_post): only treat two instances of a point as equivalent if the
set of frames visited of one of them is a superset of set of the other. In
this case, keep the union of the two sets.
- meas.h, meas.c (meas_find_min, meas_find_next, meas_find_max),
test/meas_qual: instantiate_meas_pkg only select points for which all frames
in the qualification have been visited
- gui_meas.c (is_min, is_next, is_max, is_a_next): updated for above change
- inst.h, inst.c (curr_frame, propagate_bbox, add_inst, inst_begin_frame,
inst_end_frame, inst_start): renamed curr_frame to frame_instantiating to
avoid clash with curr_frame in fpd.y
- inst.h, inst.c (find_meas_hint): make global
- test/structure, test/del_vec, test/del_frame: fped now warns if a measurement
is in an unlinked frame. Changed regressions tests to avoid this warning.
- test/Common: new function expect_grep to compare only part of the output
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5967 99fdad57-331a-0410-800a-d7fa5415bdb3
to also delete frames and items in other frames than the current one, and added
the corresponding regression tests.
- fpd.y, README: %del can now also delete frames
- test/del_frame: regression test for frame deletion
- fpd.y: moved all debug items into debug_item, so that they can be invoked
after defining measurements
- README: clarified that object labels aren't entirely hidden in the GUI
- delete.c (delete_references): also delete measurements referencing the frame
(test/del_frame)
- fpd.y (dbg_link_frame): described why we need base_frame in addition to
base_vec
- fpd.y, README: %del can now also reach into frames other than the current one
- delete.c (do_delete_vec): also delete references in the root frame, i.e.,
measurements (tests/del_vec)
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5947 99fdad57-331a-0410-800a-d7fa5415bdb3
fine. Anyway, here's a new debug construct (%frame) and a bunch of new
regression tests.
- fpd.y, fpd.l, README: added new directive %frame to link frames also to other
frames than the current one (like in the GUI)
- gui_tool.h, gui_tool.c: export is_parent_of
- test/frame_ref: regression tests to ensure that frame order remains valid,
even if we reference late from early frames
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5945 99fdad57-331a-0410-800a-d7fa5415bdb3
found in the process. Also taught the regression test system a new trick: the
path to "fped" can be passed in the environment variable FPED. E.g.,
FPED=fped.r5943 make test
- fped.c (usage, main): duplicating the -T option produces a dump to stdout
before exiting (like %dump would)
- test/Common: new command fped_dump to invoked fped with a second -T option
- test/Common: if the environment variable FPED is set, use its content to
invoke fped (default is ../fped)
- test/Common: if the environment variable CWD_PREFIX is set, prepend it to
$FPED if the latter is a relative path
- Makefile (test, tests): set CWD_PREFIX to .., so that the path given in FPED
is valid at the point of invocation
- fpd.y: revised grammar to make "package" optional
- fpd.y: measurements were syntactically allowed inside non-root frame
(test/structure)
- test/structure: test various combinations of the grammatical file structure
- test/tsort: removed all the now unnecessary "package" directives
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5944 99fdad57-331a-0410-800a-d7fa5415bdb3
the topological sort. "make test" or "make tests" invokes the regression tests,
"make valgrind" runs them under valgrind's watchful eyes.
- fped.c (usage, main): added option -T to force batch mode (for regression
testing)
- Makefile, test/Common: added regression test infrastructure
- test/tsort: test cases for the topological sort
- README: added pointer to test/tsort
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5943 99fdad57-331a-0410-800a-d7fa5415bdb3
- overlap.c (inside, test_overlap): check for instance type
- overlap.c (inside, test_overlap): support hole instances
- README: put a pointer to the GUI description at the beginning
- README, gui.html: documented role and creation of holes
- inst.h: holes can now link to pads and vice versa
- hole.c, obj.c (instantiate): connect holes with pads and apply consistency
checks
- postscript.c: added output for holes
- icons/hole.fig: make hatched surroundings of hole look more round
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5940 99fdad57-331a-0410-800a-d7fa5415bdb3
of README.
- fpd.l, fpd.y, README: added debugging directives %del, %move, %print, %dump,
and %exit
- obj.h, fpd.y (find_obj, find_label, new_obj): objects can now be labeled
- obj.c (obj_anchors), inst.c (inst_anchors): gathering the list of anchors is
now a per-object function, not an instance "method". inst_anchors implements
the vector vs. object switch.
- inst.h, inst.c: removed all *_op_anchors functions
- expr.c (str_unit): in the past, we returned a malloc'ed string, but these
times are long gone. Thus, don't stralloc("").
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5919 99fdad57-331a-0410-800a-d7fa5415bdb3
This often caused accidental builds without proper dependencies.
- Makefile: include .depend also if it doesn't exist yet. This way, GNU make
will build it and all is fine.
- Makefile: use "-include" instead of "include" to avoid unnecessary nagging
- Makefile: make .depend depend on *.h and *.c, so that we catch all changes
that _might_ affect the dependencies (this is a little inefficient but better
safe than sorry)
- README: "make dep" is no longer needed
- TODO: added thoughts for more improvements
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5774 99fdad57-331a-0410-800a-d7fa5415bdb3
- moved all examples to examples/
- README: updated and corrected example invocation
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5748 99fdad57-331a-0410-800a-d7fa5415bdb3
- .fpd file format: new directive "unit" to set the default unit
- new selection was too aggressive - make it only rearrange settings if we also
fail the second vector search
- gui_draw_pad_text: calculation of height vs. width lost too much precision,
causing pad text to be rotated arbitrarily
- drag_new_vec: display distance in mil if unit is mil
- end_new_raw_vec: store distance in mil if unit is mil
- gridify: use a 10 mil grid if unit is mil
- ps_hline: corrected gsave/grestore mismatch
- Makefile: made "all" a prerequisite of "install"
- Postscript output now mentions the default unit (if set)
- ps_package: height and width were swapped, oopsie !
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5525 99fdad57-331a-0410-800a-d7fa5415bdb3
- postscript.c: generate a page for each package
- gui_style.h: changed monospaced font to Liberation Mono, to alleviate "l" vs.
"1" problem
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5519 99fdad57-331a-0410-800a-d7fa5415bdb3
- Makefile: use PIPESTATUS to catch errors in the icon conversion pipe
- Makefile: whitespace and comment cleanup
- gui_style.c: removed no longer needed definition of INVALID
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5487 99fdad57-331a-0410-800a-d7fa5415bdb3
- README: added build prerequisites
- "part name" is now more correctly called "package name"
- changed keyword "part" to "package"
- removed inst_debug and struct inst_ops.debug functions - never really used
them anyway
- we can now generate multiple packages from a single file
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5478 99fdad57-331a-0410-800a-d7fa5415bdb3
- having variables and items on the screen at the same time was too much. We
can now toggle with "/" while the canvas has the focus. (This needs better
controls.)
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5425 99fdad57-331a-0410-800a-d7fa5415bdb3
- removed support for old-style measurements
- new-style measurements are now embedded in "struct obj", so we can dump and
delete them
- "measxy" is now called "meas"
- updated examples to use new-style measurements
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5412 99fdad57-331a-0410-800a-d7fa5415bdb3
- moved measurement operations from gui_tools.c to new file gui_meas.c
- added support for creating new-style measurements through the GUI
- the offset is optional in new-style expressions
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5407 99fdad57-331a-0410-800a-d7fa5415bdb3
For the new measurements, we need more flexible canvas markup options. This
includes the thicker circle for hovering.
To generalize hovering, we can't rely on redrawing alone but need to use a
pixmap to store the background as well. This creates a complex interaction
with dragging, which the existing code cannot handle cleanly.
Therefore, ...
This commit changes:
- README: documented use of label in new-style measurements
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5406 99fdad57-331a-0410-800a-d7fa5415bdb3
- increased default window size for make room for new icons
- switch the canvas to dark blue when instantiation fails
- modularized point lookup logic of instantiate_meas
- added highlight mode (on-going)
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5404 99fdad57-331a-0410-800a-d7fa5415bdb3
- we didn't dehover before deleting, which could cause a crash
- added delete tool to canvas. Thus ...
- we no longer need the Delete key on the canvas, so we can ...
- always focus the (first) entry field, and ...
- removed "focus" parameter to edit functions
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5403 99fdad57-331a-0410-800a-d7fa5415bdb3
- added temporary solution for having a part name
- added part name to FPD example files
- reduced area in which the frame delete button responds
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5393 99fdad57-331a-0410-800a-d7fa5415bdb3
operation, not just one object at a time
- vector reference counting is not needed now that we have recursive delete.
Removed it.
- completed recursive delete of vectors
- gridify: give new vectors a minimum length, so that we don't get a weird
display when starting a new footprint.
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5391 99fdad57-331a-0410-800a-d7fa5415bdb3
remove them as well. (In progress.)
- added frame deletion
- gui_status.c:add_label added vertical padding to keep the input area from
bouncing (by Alvaro Lopes)
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5390 99fdad57-331a-0410-800a-d7fa5415bdb3
- when moving a point, we no longer restrict the area around the original
position once the drag radius has been left
- objects can now be deleted by selecting them and pressing Delete
- deleted objects can be restored by pressing "u"
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5387 99fdad57-331a-0410-800a-d7fa5415bdb3
- README: added that loops can also execute zero times
- accept labels only at the beginning of a line
- rectangles and lines no longer use the bounding box for drawing (caused
offset problems since we now correct for the line width)
- dist_rect and inside_rect no longer require their input pre-sorted
- pad instances now have their own structure and no longer abuse the bounding
box to know the pad coordinates
- Makefile: use $(GEN) for fig2dev, to reduce chattiness
- when dragging a point, the symbol is now adjusted accordingly
- added moving of rects, pads, circles, and arcs
- added creation of pads
- moved rotate_r from gui_inst.c to coord.c
- new function "theta" that combines most of the angle calculations
- save_pix_buf: y < 0 clipping changed width, not height
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5386 99fdad57-331a-0410-800a-d7fa5415bdb3
- made xpm name manipulation compatible with older versions of ImageMagick
(reported by Alvaro Lopes)
- corrected all lines beginning with five or more spaces
- Makefile
- README: fixed loop example (reported by Joerg Reisenweber)
- moved draw_arc and draw_circle from gui_inst.c to gui_util.c
- added dragging and hovering
- added creation of lines, rectangles, and arcs via GUI
- removed arc tool (use circle instead)
- fixed reference counting in vectors
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5384 99fdad57-331a-0410-800a-d7fa5415bdb3
- bounding boxes of silk objects now include the width
- # zooms and centers to currently active frame instance
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5378 99fdad57-331a-0410-800a-d7fa5415bdb3
* zoom and center to extents
- variables in tables weren't properly initialized, causing stray recursive
evaluation errors
- replaced table->active index with table->active_row pointer
- added row selection
- for fun, added tab.fpd row selection example
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5375 99fdad57-331a-0410-800a-d7fa5415bdb3