{"id":19297274,"url":"https://github.com/CodethinkLabs/ofc","last_synced_at":"2025-04-22T09:30:34.740Z","repository":{"id":73366033,"uuid":"47773515","full_name":"CodethinkLabs/ofc","owner":"CodethinkLabs","description":"Open Fortran Compiler","archived":false,"fork":false,"pushed_at":"2023-11-29T11:56:54.000Z","size":2056,"stargazers_count":46,"open_issues_count":4,"forks_count":18,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-11-09T23:02:27.578Z","etag":null,"topics":["compiler","fortran","fortran77","static-code-analyzer","transpiler"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodethinkLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-10T16:22:16.000Z","updated_at":"2024-09-10T10:15:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"8c2fad3b-e133-448a-8afd-1ad9af48f787","html_url":"https://github.com/CodethinkLabs/ofc","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodethinkLabs%2Fofc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodethinkLabs%2Fofc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodethinkLabs%2Fofc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodethinkLabs%2Fofc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodethinkLabs","download_url":"https://codeload.github.com/CodethinkLabs/ofc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250214957,"owners_count":21393704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compiler","fortran","fortran77","static-code-analyzer","transpiler"],"created_at":"2024-11-09T23:01:50.094Z","updated_at":"2025-04-22T09:30:34.081Z","avatar_url":"https://github.com/CodethinkLabs.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# OFC - Open Fortran Compiler\n\n[![Build Status](https://travis-ci.org/CodethinkLabs/ofc.svg?branch=master)](https://travis-ci.org/CodethinkLabs/ofc)\n\n## Overview\n\nCurrently OFC is a FORTRAN front-end capable of parsing and performing semantic\nanalysis on Fortran. We're targeting legacy FORTRAN first, and can currently\nparse and semantically analyse most F77 and earlier, providing syntax and\nsemantic warnings and errors.\n\n### Goals\n\n1. Produce a FORTRAN static code analysis tool.\n2. Produce a FORTRAN modernizer which can reprint legacy FORTRAN as F90 where possible.\n3. Produce an alternative FORTRAN front-end for open-source compilers.\n\n### Features\n\n- Parse, semantically analyse and re-print ALL NIST F77 tests.\n- Safe translation from F77 to F90 syntax where possible.\n\n\n## Usage\n### Cloning\nIt's recommended that you clone ofc recursively, as it has a submodule:\n\n    git clone https://github.com/CodethinkLabs/ofc.git --recurse-submodules\n\nFor git 2.12 or earlier use `--recursive` instead\n\n### Installation\nTo install ofc, do:\n\n    make install\n\nNote that the ofc binary can be invoked locally without an install,\nand the tests will run using the locally built binary.\n\n### Execution\nTo invoke ofc currently, simply run it over a fortran file:\n\n    ofc tests/programs/nist/FM001.FOR\n\nThe compiler options will be automatically detected from the file name, but\nthis can be overridden using commandline flags which are printed by invoking\nofc with no source file.\n\nTo print the parse and semantic trees, use the --parse-tree and --sema-tree flags.\n\n\n## Testing\n\n### Dependencies\n\nTest Suite:\n    gfortran\n    valgrind\n\nStatic Code Analysis:\n\tcppcheck\n\tclang, scanbuild\n\n### Test Suite\nWe run a test suite including the NIST F77 tests using:\n\n    make test\n\nTo make a html report (tests/out/report.html) use:\n\n    make test-report\n\nThe full report takes a long time to build as it runs valgrind over both the debug and optimized binaries.\nTo make a quick report which does every step except valgrind, use:\n\n    make test-report-lite\n\nNote: Tests run from the build directory will use the built ofc rather than the installed one.\n\n### CPPCheck\nWe run cppcheck over the tree using:\n\n    make cppcheck\n\n### scanbuild\nWe run scanbuild over the tree using:\n\n    make scan-build\n\n### Other\nWe also have a rule to compile all files at once to produce more warnings using:\n\n    make scan\n\n\n## Contact\n\nYou can contact us at #open-fortran-compiler on irc.freenode.net or via the e-mails used in our git commits.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCodethinkLabs%2Fofc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCodethinkLabs%2Fofc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCodethinkLabs%2Fofc/lists"}