Git Product home page Git Product logo

ampla's Introduction

The program was designed to compare pairs of .AAX .AA .BA or .BAX files, using other formats may result in runtime errors. Possible combinations: AAX<->AAX; AAX<->AA; AA<->AA; BAX<->BAX; BA<->BAX; BA<->BA

Code files can be from different source, i.e. can have one extracted from FCB and the other from ONB.

program automatically detects BA/BAX/AA/AAX files

if database or code is splitted in several files they will be combined together.

Comparison performed by blocks to block, not line to line

The program try to read and compare numeric constants as numbers, i.e. D=2.3e-3 and D=0.0023 are the same and will not be detected as differnce

If xls report file name ends with _DIF it means, descrepancies has found. XLS reports generated by GenXLSreport(code_before,code_after)


Requirements for people who are using source code instead of compiled version

  • use Python3.
  • ampla.py is a core file contains all functions for parsing and code compare.
  • External packages requirements: tkinter, xlwt, datetime

ampla.py are Python 3 functions set for AMPL code compare/analysis

python example to compare .AA and .AAX files shown below:

from ampla import *

aa_before = AA('source_code_before.aa')

aa_after = AAX('source_code_after.aax')

print(aa_before.compare(aa_after))

GenXLSreport('source_code_before.aa','source_code_after.aax')


block Constructor, create logic block instance,parent for dbinst Pins: contain logic block pins (dictionary keys) and values Name: logic block name: MOVE,OR,AND,.. in case of BAX element used to keep instance type: DIC,AIC.. Address (unique): logic block address: PC12.1.1.2 in case of BAX element used to keep instance name: Extra: the logic block parameters: MOVE(B,16) in case of BAX element can keep type of DAT: DAT4 (I) AAX Constructor, create AAX file instance, parse AMPL logic Blocks: contains all logic blocks from AAX file fName: full path to AMPL aax file including file name Lines: text lines from AMPL file Header: AMPL code header Labels: all labels with addresses in the AMPL code AA inherit from AAX read (decode) AA file to self.Lines parse AMPL logic BAX inherit from AAX read (decode) BAX file to self.Lines parse AMPL logic BA inherit from BAX read (decode) BA file to self.Lines parse AMPL logic

ampla's People

Contributors

alimyusifzada avatar

Watchers

 avatar

ampla's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.