Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/epiqc/ScaffCC
13 May 2025, 12:21:09 UTC
  • Code
  • Branches (10)
  • Releases (1)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/ScaffCC_OSX
    • refs/heads/master
    • refs/tags/2.2
    • refs/tags/5.0
    • refs/tags/v1.0
    • refs/tags/v1.0-beta.2
    • refs/tags/v2.0
    • refs/tags/v2.1
    • refs/tags/v3.0
    • refs/tags/v4.0
    • v3.1
  • 6bbaf7c
  • /
  • rkqc
  • /
  • tools
  • /
  • line_reduction.py
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge Iframe embedding
swh:1:cnt:1044a86bf185e5fd4f39174c7192e0c6b5a41d90
origin badgedirectory badge Iframe embedding
swh:1:dir:d2781244341315ce1c226095194032c25cc3a61c
origin badgerevision badge
swh:1:rev:66a79944ee4cd116b27bc1a69137276885461db8
origin badgesnapshot badge
swh:1:snp:7eb50f12cf990a0030724453139e994df238639f
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 66a79944ee4cd116b27bc1a69137276885461db8 authored by Andrew Litteken on 28 September 2021, 15:30:02 UTC
Merge pull request #49 from AndrewLitteken/master
Tip revision: 66a7994
line_reduction.py
#!/home/adam/Desktop/EPiQC_Releases/Full_Install_Testing/July10_ScaffCC/rkqc/python
#!/home/adam/Desktop/EPiQC_Releases/Full_Install_Testing/EPiQC_Scaffold/rkqc/python
#!/home/adam/Desktop/EPiQC_Releases/Full_Install_Testing/EPiQC_Scaffold/rkqc/python
#!/home/adam/Desktop/Development/RKQC/python
#!/home/adam/New_Installs/Scaffold_New/rkqc/python
#!/home/adam/Documents/revkit-1.3/python
#!/usr/bin/python

# RevKit: A Toolkit for Reversible Circuit Design (www.revkit.org)
# Copyright (C) 2009-2011  The RevKit Developers <revkit@informatik.uni-bremen.de>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

import sys , os
sys.path.append(os.path.dirname(sys.path[0]))
from revkit import *

opts = program_options()
opts.add_read_realization_option()
opts.add_write_realization_option()
opts.add_option( "synthesis", 0, "Synthesis Approach:\n 0: Transformation Based Synthesis\n 1: Exact Synthesis" ) \
    .add_option( "max_window_lines", 6, "Initial maximum size for windows to be considered" ) \
    .add_option( "max_grow_up_window_lines", 9, "If no valid truth table can be found for max_window_lines size windows, they can grow up to this size" ) \
    .add_option( "window_variables_threshold", 17, "Number of primary inputs for pre-window-simulation which still allow the use of simple simulation. Afterwards, SMT - based simulation is used." ) \
    .add_option( "timeout", 0, "Timeout for window synthesis") 

opts.parse( sys.argv )

if not opts.good():
    print opts
    exit( 1 )

circ = circuit()
read_realization( circ, opts.read_realization_filename() ) or sys.exit ("Cannot read " + opts.read_realization_filename())

newcirc = circuit()

if opts["synthesis"] == 0:
    synthesis = embed_and_synthesize( synthesis = transformation_based_synthesis_func(), timeout = opts["timeout"] )
else:
    synthesis = embed_and_synthesize( synthesis = exact_synthesis_func(), timeout = opts["timeout"] )

r = line_reduction( newcirc, circ, \
                        max_window_lines = opts["max_window_lines"], \
                        max_grow_up_window_lines = opts["max_grow_up_window_lines"], \
                        window_variables_threshold = opts["window_variables_threshold"], \
                        window_synthesis = synthesis )

if opts.is_write_realization_filename_set():
    header = "This file has been generated using RevKit %s (www.revkit.org)\nCommand Line:\n%s\nBased on the approach proposed in R. Wille, M. Soeken, and R. Drechsler, Reducing the Number of Lines in Reversible Circuits, Design Automation Conference, pages 647-652, 2010." % ( revkit_version(), " ".join( sys.argv ) ) 
    write_realization( newcirc, opts.write_realization_filename(), header = header )

print "Original Circuit:"
print_statistics( circ )

print
print "Optimized Circuit:"
print_statistics( newcirc, runtime = r['runtime'], main_template = print_statistics_settings().main_template \
                           + "\nConsidered Windows:               " + str( r['num_considered_windows'] ) \
                           + "\nNo suiteable constant line found: " + str( r['skipped_no_constant_line'] ) \
                           + "\nSkipped due to ambiguous lines:   " + str( r['skipped_ambiguous_line'] ) \
                           + "\nSkipped due to max window lines:  " + str( r['skipped_max_window_lines'] ) \
                           + "\nSkipped due to synthesis fail:    " + str( r['skipped_synthesis_failed'] ) + "\n")

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API

back to top