repo_name
stringlengths
6
97
path
stringlengths
3
341
text
stringlengths
8
1.02M
josehu07/hux-kernel
user/lib/types.h
/** * Type identification functions on characters. */ #ifndef TYPES_H #define TYPES_H #include <stdbool.h> bool isdigit(char c); bool isxdigit(char c); bool isalpha(char c); bool islower(char c); bool isupper(char c); bool isspace(char c); #endif
josehu07/hux-kernel
src/boot/multiboot.h
/** * Multiboot1 related structures. * See https://www.gnu.org/software/grub/manual/multiboot/multiboot.html * See https://www.gnu.org/software/grub/manual/multiboot/html_node/Example-OS-code.html */ #ifndef MULTIBOOT_H #define MULTIBOOT_H #include <stdint.h> #define MULTIBOOT_HEADER_MAGIC 0x1BADB002 #def...
josehu07/hux-kernel
src/common/debug.c
<gh_stars>10-100 /** * Common debugging utilities. */ #include <stdint.h> #include <stddef.h> #include "debug.h" #include "printf.h" #include "../boot/multiboot.h" #include "../boot/elf.h" #include "../common/string.h" #include "../process/layout.h" /** Initialized at 'debug_init'. */ static elf_symbol_t *elf...
josehu07/hux-kernel
src/filesys/block.c
<filename>src/filesys/block.c /** * Block-level I/O general request layer. */ #include <stdint.h> #include <stdbool.h> #include "block.h" #include "vsfs.h" #include "../common/debug.h" #include "../common/string.h" #include "../device/idedisk.h" /** * Helper function for reading blocks of data from disk into ...
josehu07/hux-kernel
src/interrupt/syscall.c
<filename>src/interrupt/syscall.c /** * System call-related definitions and handler wrappers. */ #include <stdint.h> #include <stddef.h> #include "syscall.h" #include "../common/debug.h" #include "../display/sysdisp.h" #include "../device/sysdev.h" #include "../interrupt/isr.h" #include "../memory/sysmem.h" ...
josehu07/hux-kernel
src/interrupt/isr.c
<gh_stars>10-100 /** * Interrupt service routines (ISR) handler implementation. */ #include <stdint.h> #include "isr.h" #include "idt.h" #include "syscall.h" #include "../common/port.h" #include "../common/printf.h" #include "../common/debug.h" #include "../display/vga.h" #include "../interrupt/syscall.h" #inc...
josehu07/hux-kernel
user/init.c
/** * The init user program to be embedded. Runs in user mode. */ #include <stdint.h> #include <stddef.h> #include "lib/syscall.h" #include "lib/debug.h" void main(void) { // info("init: starting the shell process..."); int8_t shell_pid = fork(0); if (shell_pid < 0) { error("init: failed to ...
josehu07/hux-kernel
src/common/printf.h
<gh_stars>10-100 /** * Common formatted printing utilities. * * Format specifier := %[special][width][.precision][length]<type>. Only * limited features are provided (documented in the wiki page). */ #ifndef PRINTF_H #define PRINTF_H #include <stdbool.h> #include "../display/vga.h" #include "../display/termin...
josehu07/hux-kernel
src/filesys/vsfs.h
/** * Very simple file system (VSFS) data structures & Layout. * * This part borrows code heavily from xv6. */ #ifndef VSFS_H #define VSFS_H #include <stdint.h> #include <stdbool.h> #include <stddef.h> #include "sysfile.h" #include "../common/bitmap.h" /** Root directory must be the 0-th inode. */ #define R...
josehu07/hux-kernel
src/common/debug.h
<gh_stars>10-100 /** * Common debugging utilities. */ #ifndef DEBUG_H #define DEBUG_H #include <stdbool.h> #include "printf.h" #include "../display/vga.h" #include "../display/terminal.h" #include "../boot/multiboot.h" /** For marking the begin of kernel heap. */ extern uint32_t elf_sections_end; void debu...
josehu07/hux-kernel
src/filesys/file.h
<gh_stars>10-100 /** * In-memory structures and operations on open files. */ #ifndef FILE_H #define FILE_H #include <stdint.h> #include <stdbool.h> #include <stddef.h> #include "vsfs.h" #include "sysfile.h" #include "../common/spinlock.h" #include "../common/parklock.h" /** In-memory copy of open inode, be su...
josehu07/hux-kernel
src/memory/kheap.c
<filename>src/memory/kheap.c<gh_stars>10-100 /** * Kernel Heap Memory "Next-Fit" Allocator. */ #include <stdint.h> #include <stddef.h> #include <stdbool.h> #include "kheap.h" #include "paging.h" #include "../common/printf.h" #include "../common/string.h" #include "../common/debug.h" #include "../common/spinlock.h...
gastonfeng/bootloader_stm32
firmata_client.h
<filename>firmata_client.h #ifndef RTE_KB1277_REMOTE #define RTE_KB1277_REMOTE #include "mFirmata.h" #include "rtos.h" using u8 = unsigned char; using namespace firmata; class firmata_client : public mFirmata { public: int begin(Stream *s) { stream = s; rtos::create_thread_run("fc", 512, Priori...
gastonfeng/bootloader_stm32
socketFirmata.h
<reponame>gastonfeng/bootloader_stm32<gh_stars>1-10 #ifndef SOCKETFIRMATA_H #define SOCKETFIRMATA_H #if defined(USE_LWIP) || defined(windows_x86) || defined(SYLIXOS) #include <vector> #ifdef RTE_APP #include "smodule.h" #include "logger_rte.h" #include "plc_rte.h" #include "rtos.h" #endif #include "mFirmata.h" #...
gastonfeng/bootloader_stm32
mFirmata.h
<reponame>gastonfeng/bootloader_stm32<filename>mFirmata.h #ifndef RTE_KT1269_MFIRMATA_H #define RTE_KT1269_MFIRMATA_H #undef write #undef read #include <smodule.h> #include "Firmata.h" #include "../firmata/Firmata.h" #if defined(RTE_APP) || defined(PLC) #include "plc_rte.h" #include <smodule.h> #endif using u8 = uns...
Guenael/tinybeacon-1300
config.h
/* * FreeBSD License * Copyright (c) 2016, Guenael * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * ...
Guenael/tinybeacon-1300
pll.c
<gh_stars>1-10 /* * FreeBSD License * Copyright (c) 2016, Guenael * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyri...
cosmo0920/ioext_c
ext/ioext/ioext.h
/* ioext */ /* Copyright 2020- <NAME>*/ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ /* You may obtain a copy of the License at */ /* http://www.apache.org/licenses/LICENSE-2.0 */ /* Unless required by applicable l...
cosmo0920/ioext_c
ext/ioext/ioext.c
<filename>ext/ioext/ioext.c /* ioext */ /* Copyright 2020- <NAME>*/ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ /* You may obtain a copy of the License at */ /* http://www.apache.org/licenses/LICENSE-2.0 */ /* Unl...
UTS-CAS/ouster_example
ouster_client/include/ouster/types.h
<reponame>UTS-CAS/ouster_example /** * Copyright (c) 2018, Ouster, Inc. * All rights reserved. * * @file * @brief Ouster client datatypes and constants */ #pragma once #include <Eigen/Core> #include <array> #include <cstdint> #include <map> #include <memory> #include <set> #include <string> #include <type_trait...
UTS-CAS/ouster_example
ouster_client/include/ouster/image_processing.h
<filename>ouster_client/include/ouster/image_processing.h<gh_stars>0 /** * Copyright (c) 2018, Ouster, Inc. * All rights reserved. * * @file * @brief Utilities for post-processing image data */ #pragma once #include <Eigen/Core> #include "ouster/types.h" namespace ouster { namespace viz { /** Adjusts brightn...
UTS-CAS/ouster_example
ouster_viz/src/camera.h
<filename>ouster_viz/src/camera.h /** * Copyright (c) 2021, Ouster, Inc. * All rights reserved. */ #pragma once #include <Eigen/Core> #include "ouster/point_viz.h" namespace ouster { namespace viz { namespace impl { inline double window_aspect(const WindowCtx& ctx) { return ctx.viewport_width / static_cast<...
UTS-CAS/ouster_example
examples/helpers.h
<gh_stars>0 /** * Copyright (c) 2022, Ouster, Inc. * All rights reserved. */ #include "ouster/lidar_scan.h" #include "ouster/os_pcap.h" #include "ouster/types.h" // Fill scan with data from the 2nd scan in the pcap // If there is no 2nd scan, scan will remain unchanged void get_complete_scan( std::shared_ptr<o...
UTS-CAS/ouster_example
ouster_viz/src/cloud.h
<filename>ouster_viz/src/cloud.h /** * Copyright (c) 2021, Ouster, Inc. * All rights reserved. */ #pragma once #include <Eigen/Core> #include "camera.h" #include "glfw.h" #include "ouster/point_viz.h" namespace ouster { namespace viz { namespace impl { /* * Contains handles to variables in GLSL shader program ...
UTS-CAS/ouster_example
ouster_viz/src/colormaps.h
/** * Copyright (c) 2018, Ouster, Inc. * All rights reserved. */ #pragma once #include <cstddef> namespace ouster { namespace viz { inline float** genPalette(const int n, const float from[3], const float to[3]) { float** palette = new float*[n]; for (int i = 0; i < n; i++) { palette[i] = new floa...
UTS-CAS/ouster_example
ouster_viz/include/ouster/point_viz.h
/** * Copyright (c) 2020, Ouster, Inc. * All rights reserved. * * @file * @brief Point cloud and image visualizer for Ouster Lidar using OpenGL */ #pragma once #include <array> #include <cstddef> #include <functional> #include <memory> #include <mutex> #include <string> #include <vector> namespace ouster { name...
UTS-CAS/ouster_example
ouster_viz/src/common.h
/** * Copyright (c) 2021, Ouster, Inc. * All rights reserved. */ #pragma once #include <atomic> #include <iostream> #include <memory> #include <string> #include <vector> #include "glfw.h" namespace ouster { namespace viz { namespace impl { /** * load and compile GLSL shaders * * @param vertex_shader_code cod...
UTS-CAS/ouster_example
ouster_client/include/ouster/impl/lidar_scan_impl.h
<reponame>UTS-CAS/ouster_example<gh_stars>0 /** * Copyright (c) 2021, Ouster, Inc. * All rights reserved. */ #pragma once #include <Eigen/Core> #include <cstdint> #include <stdexcept> #include "ouster/lidar_scan.h" #include "ouster/types.h" namespace ouster { namespace impl { using sensor::ChanFieldType; templ...
UTS-CAS/ouster_example
ouster_client/include/ouster/version.h
/** * Copyright (c) 2018, Ouster, Inc. * All rights reserved. * * @file * @brief Simple version struct */ #include <cstdint> #include <string> #pragma once namespace ouster { namespace util { struct version { uint16_t major; ///< Major version number uint16_t minor; ///< Minor version number uin...
UTS-CAS/ouster_example
ouster_viz/src/image.h
/** * Copyright (c) 2021, Ouster, Inc. * All rights reserved. */ #pragma once #include <array> #include "camera.h" #include "glfw.h" #include "ouster/point_viz.h" namespace ouster { namespace viz { namespace impl { /* * Manages opengl state for drawing a point cloud * * The image is auto-scaled to be positio...
UTS-CAS/ouster_example
ouster_viz/src/glfw.h
/** * Copyright (c) 2022, Ouster, Inc. * All rights reserved. */ #pragma once #ifdef OUSTER_VIZ_GLEW #include <GL/glew.h> #else #include <glad/glad.h> #endif #include <GLFW/glfw3.h> #include <functional> #include <string> #include "ouster/point_viz.h" namespace ouster { namespace viz { struct GLFWContext { ...
UTS-CAS/ouster_example
ouster_viz/src/gltext.h
// Repository: https://github.com/vallentin/glText // License: https://github.com/vallentin/glText/blob/master/LICENSE.md // // Date Created: September 24, 2013 // Last Modified: December, 2022 // // Modified from the original for use in ouster_viz: // - inline api functions to avoid unused warnings // - hacked to alwa...
UTS-CAS/ouster_example
ouster_viz/src/misc.h
/** * Copyright (c) 2021, Ouster, Inc. * All rights reserved. */ #pragma once #include <Eigen/Core> #include <array> #include <cstddef> #include "camera.h" #include "glfw.h" #include "gltext.h" #include "ouster/point_viz.h" namespace ouster { namespace viz { namespace impl { /* * Render a set of rings on the g...
chengfzy/SLAM
Sphere/Sphere06_CeresPoseParameterization/PoseParameterization.h
<filename>Sphere/Sphere06_CeresPoseParameterization/PoseParameterization.h #pragma once #include "ceres/local_parameterization.h" #include "types.h" class PoseParameterization : public ceres::LocalParameterization { public: // x: [q, p], delta: [delta phi, delta p] // q = q0 * dq; p = p0 + R(q0) * dp bo...
chengfzy/SLAM
Sphere/Sphere06_CeresPoseParameterization/G2OReader.h
<filename>Sphere/Sphere06_CeresPoseParameterization/G2OReader.h #pragma once #include <fstream> #include <map> #include <string> #include <vector> #include "glog/logging.h" // read a single pose from the input and inserts it into the map, return false if there is a duplicate entry template <typename Pose, typename All...
chengfzy/SLAM
Sphere/Sphere06_CeresPoseParameterization/PoseGraph3DErrorTerm.h
#pragma once #include "Eigen/Core" #include "ceres/ceres.h" #include "types.h" class PoseGraph3DErrorTerm { public: EIGEN_MAKE_ALIGNED_OPERATOR_NEW PoseGraph3DErrorTerm(const Pose& t_ab, const Eigen::Matrix<double, 6, 6>& sqrtInformation) : t_ab_(t_ab), sqrtInfo_(sqrtInformation) {} template <...
chengfzy/SLAM
Sphere/Sphere01_CeresQuaternion/PoseGraph3DErrorTerm.h
<reponame>chengfzy/SLAM #pragma once #include "Eigen/Core" #include "ceres/ceres.h" #include "types.h" // Compute the error term for two poses that have a relative pose measurement between them. // Let the hat variables be the measurement, we have two poses x_a and x_b, and through sensor measurements we can // measur...
chengfzy/SLAM
Sphere/Sphere04_CeresSO3/SO3Parameterization.h
#pragma once #include "ceres/local_parameterization.h" #include "sophus/so3.hpp" class SO3Parameterization : public ceres::LocalParameterization { public: virtual bool Plus(const double* x, const double* delta, double* x_plus_delta) const { Eigen::Map<const Sophus::SO3d> R0(x); Eigen::Map<const ...
chengfzy/SLAM
Sphere/Sphere06_CeresPoseParameterization/types.h
<reponame>chengfzy/SLAM<filename>Sphere/Sphere06_CeresPoseParameterization/types.h #pragma once #include <iostream> #include <map> #include <string> #include "Eigen/Core" #include "Eigen/Geometry" // the state for each vertex in the pose graph struct Pose { EIGEN_MAKE_ALIGNED_OPERATOR_NEW inline const double*...
chengfzy/SLAM
Sphere/Sphere04_CeresSO3/PoseGraph3DErrorTerm.h
<gh_stars>10-100 #pragma once #include "Eigen/Core" #include "ceres/ceres.h" #include "types.h" class PoseGraph3DErrorTerm { public: EIGEN_MAKE_ALIGNED_OPERATOR_NEW PoseGraph3DErrorTerm(const Pose& t_ab, const Eigen::Matrix<double, 6, 6>& sqrtInformation) : t_ab_(t_ab), sqrtInfo_(sqrtInformation) {...
chengfzy/SLAM
Sphere/Sphere05_CeresSE3/PoseGraph3DErrorTerm.h
<filename>Sphere/Sphere05_CeresSE3/PoseGraph3DErrorTerm.h #pragma once #include "Eigen/Core" #include "ceres/ceres.h" #include "types.h" class PoseGraph3DErrorTerm { public: EIGEN_MAKE_ALIGNED_OPERATOR_NEW PoseGraph3DErrorTerm(const Pose& t_ab, const Eigen::Matrix<double, 6, 6>& sqrtInformation) : ...
chengfzy/SLAM
Sphere/Sphere05_CeresSE3/SE3Parameterization.h
#pragma once #include "ceres/local_parameterization.h" #include "sophus/se3.hpp" class SE3Parameterization : public ceres::LocalParameterization { public: virtual bool Plus(const double* x, const double* delta, double* x_plus_delta) const { Eigen::Map<const Sophus::SE3d> T0(x); Eigen::Map<const ...
mesgu002/visitorPattern
Lab7/src/command.h
<reponame>mesgu002/visitorPattern #ifndef __COMMAND_CLASS__ #define __COMMAND_CLASS__ #include "composite.h" class Command { protected: Base* root; public: Command() { }; double execute() { return root->evaluate(); }; Base* get_root() { return root; }; }; class OpCommand : public Command { p...
mesgu002/visitorPattern
Lab7/src/composite.h
<gh_stars>0 #ifndef __COMPOSITE_CLASS__ #define __COMPOSITE_CLASS__ #include <iostream> #include <sstream> #include <math.h> #include <string> #include <stack> using namespace std; class Iterator; class NullIterator; class UnaryIterator; //Abstract Base Class class Base { public: Base(){}; //vi...
mesgu002/visitorPattern
visitor.h
#ifndef VISITOR_H #define VISITOR_H #include <string> using namespace std; class Visitor { }; class PrintVisitor : public Visitor { private: string output; public: PrintVisitor(); void rootNode(); //For visiting a root node (do nothing) void sqrNode(); //For visiting a s...
mesgu002/visitorPattern
Lab7/src/menu.h
<gh_stars>0 #ifndef __MENU_CLASS__ #define __MENU_CLASS__ #include <iostream> #include "command.h" using namespace std; class Menu { private: int history_index; vector<Command*> history; public: Menu() { history_index = -1; }; void execute() { if(history_index == -1) ...
SmallRoomLabs/espbtc
network.h
#ifndef _NETWORK_H_ #define _NETWORK_H_ extern ip_addr_t hostIp; void StartNetwork(char *_ssid,char *_pw); void ResolveHost(char *hostName); void HttpRequest(ip_addr_t hostIp, char *host, char *url); #endif
SmallRoomLabs/espbtc
4bittube.h
#ifndef _4BITTUBE_H_ #define _4BITTUBE_H_ extern const uint8_t font4bit[]; uint8_t *Init_4bittube( uint8_t _displayCount, uint8_t _data, uint8_t _clock, uint8_t _latch); // Functions added specifically for this project void DisplayNumber(uint32_t num); void Display(uint8_t d0,uint8_t ...
SmallRoomLabs/espbtc
jsonutils.h
#ifndef _JSONUTILS_H_ #define _JSONUTILS_H_ uint8_t ICACHE_FLASH_ATTR ExtractFromJson( char *json, char *searchKey, char *result, uint16_t resultLen); #endif
SmallRoomLabs/espbtc
4bittube.c
// // Code to drive the cheap 4-digit LED display modules from QIFEI. // labelled 4-Bit LED Digital Tube Module // // Project is available at https://github.com/SmallRoomLabs/4bittube // // Copyright 2017 <NAME>, Released under the MIT licence // #include "osapi.h" #include "os_type.h" #include "mem.h" #include "gpio....
SmallRoomLabs/espbtc
main.c
// // A small project that fetces the current BTC excange rate from // the coindesk API and displays it on a 4-digit LED display // // The code is available at https://github.com/SmallRoomLabs/espbtc // #include "c_types.h" #include "os_type.h" #include "osapi.h" #include "user_interface.h" #include "espconn.h" #incl...
SmallRoomLabs/espbtc
network.c
<reponame>SmallRoomLabs/espbtc #include "c_types.h" #include "os_type.h" #include "osapi.h" #include "user_interface.h" #include "espconn.h" #include "4bittube.h" #include "jsonutils.h" #include "network.h" // Functions missing in SDK declarations :-( int atoi(const char *nptr); char *ets_strstr(const char *haystack...
Blinky0815/MyLittleGuiLibrary
MyLittleGuiLibrary/Points.h
/* * Copyright [2014] Olaf - blinky0815 - christ ] * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requi...
Blinky0815/MyLittleGuiLibrary
MyLittleGuiLibrary/appStateAnimation.h
<reponame>Blinky0815/MyLittleGuiLibrary /* * Copyright [2012] Olaf - blinky0815 - christ ] * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/lic...
Blinky0815/MyLittleGuiLibrary
MyLittleGuiLibrary/Point.h
<reponame>Blinky0815/MyLittleGuiLibrary /* * Copyright [2014] Olaf - blinky0815 - christ ] * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/lic...
Blinky0815/MyLittleGuiLibrary
MyLittleGuiLibrary/DiskSpace.h
<gh_stars>0 /* * Copyright [2012] Olaf - blinky0815 - christ ] * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * ...
Blinky0815/MyLittleGuiLibrary
MyLittleGuiLibrary/mouseEventHandler.h
<gh_stars>0 /* * Copyright [2012] Olaf - blinky0815 - christ ] * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * ...
Blinky0815/MyLittleGuiLibrary
MyLittleGuiLibrary/sliderbutton.h
<reponame>Blinky0815/MyLittleGuiLibrary /* * Copyright [2012] Olaf - blinky0815 - christ ] * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/lic...
Blinky0815/MyLittleGuiLibrary
MyLittleGuiLibrary/ProgressBar.h
<gh_stars>0 /* * Copyright [2014] Olaf - blinky0815 - christ ] * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * ...
Blinky0815/MyLittleGuiLibrary
MyLittleGuiLibrary/observable.h
<filename>MyLittleGuiLibrary/observable.h /* * Copyright [2013] Olaf - blinky0815 - christ ] * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/l...
Blinky0815/MyLittleGuiLibrary
MyLittleGuiLibrary/Stopwatch.h
/* * Copyright [2014] Olaf - blinky0815 - christ ] * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requi...
Blinky0815/MyLittleGuiLibrary
MyLittleGuiLibrary/FileInfo.h
<reponame>Blinky0815/MyLittleGuiLibrary /* * Copyright [2014] Olaf - blinky0815 - christ ] * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/lic...
Blinky0815/MyLittleGuiLibrary
MyLittleGuiLibrary/Slider.h
<reponame>Blinky0815/MyLittleGuiLibrary<filename>MyLittleGuiLibrary/Slider.h /* * Copyright [2014] Olaf - blinky0815 - christ ] * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at ...
Blinky0815/MyLittleGuiLibrary
MyLittleGuiLibrary/button.h
/* * Copyright [2012] Olaf - blinky0815 - christ ] * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requi...
ftsrg/gazer
include/gazer/Trace/VerificationResult.h
<gh_stars>1-10 //==-------------------------------------------------------------*- C++ -*--==// // // Copyright 2019 Contributors to the Gazer project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the...
ftsrg/gazer
include/gazer/LLVM/Memory/MemoryInstructionHandler.h
//==-------------------------------------------------------------*- C++ -*--==// // // Copyright 2019 Contributors to the Gazer project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // ...
ftsrg/gazer
include/gazer/Automaton/CfaTransforms.h
<gh_stars>1-10 //==- CfaTransforms.h - Cfa transformation utilities ------------*- C++ -*--==// // // Copyright 2019 Contributors to the Gazer project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the...
ftsrg/gazer
test/verif/base/loops4_fail.c
// RUN: %bmc -bound 10 "%s" | FileCheck "%s" // CHECK: Verification FAILED #include <assert.h> unsigned __VERIFIER_nondet_uint(void); int main(void) { unsigned i = 0; unsigned c = __VERIFIER_nondet_uint(); unsigned x = 1; while (i < c) { unsigned y = __VERIFIER_nondet_uint(); x = x +...
ftsrg/gazer
test/theta/verif/memory/globals3.c
// RUN: %theta "%s" | FileCheck "%s" // CHECK: Verification SUCCESSFUL #include <limits.h> int __VERIFIER_nondet_int(void); void __VERIFIER_error(void) __attribute__((__noreturn__)); void __VERIFIER_assume(int expression); int b = 1; int c = 2; int main(void) { int a = __VERIFIER_nondet_int(); int d = 3; ...
ftsrg/gazer
test/verif/regression/flat_memory_params.c
// RUN: %bmc -bound 1 -memory=flat -checks="assertion-fail" "%s" | FileCheck "%s" // CHECK: Verification SUCCESSFUL // This test failed because the SSA-based memory model inserted all memory objects // as loop procedure inputs instead of just inserting the ones which were actually // used by the loop. Furthermore, th...
ftsrg/gazer
include/gazer/Core/LiteralExpr.h
//==- LiteralExpr.h - Literal expression subclasses -------------*- C++ -*--==// // // Copyright 2019 Contributors to the Gazer project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // ...
ftsrg/gazer
include/gazer/Verifier/VerificationAlgorithm.h
//==-------------------------------------------------------------*- C++ -*--==// // // Copyright 2019 Contributors to the Gazer project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // ...
ftsrg/gazer
include/gazer/LLVM/Automaton/ModuleToAutomata.h
//==- ModuleToAutomata.h ----------------------------------------*- C++ -*--==// // // Copyright 2019 Contributors to the Gazer project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // ...
ftsrg/gazer
test/theta/verif/base/loops2_fail.c
// RUN: %theta -memory=havoc "%s" | FileCheck "%s" // CHECK: Verification FAILED #include <assert.h> extern int __VERIFIER_nondet_int(void); int main(void) { int i = 0; int n = __VERIFIER_nondet_int(); int sum = 0; while (i < n) { int j = 0; int x = 0; while (j < n) { ...
ftsrg/gazer
test/verif/regression/inline_globals_error_fail.c
// RUN: %bmc -bound 1 -inline=all -trace "%s" | FileCheck "%s" // CHECK: Verification FAILED // Invalid handling of removed global variables caused this test to crash during trace generation. int b; void __VERIFIER_error(); int a(); int main() { int c = a(); b = 0; if (c) b = 1; __VERIFIER_error(); }
ftsrg/gazer
test/verif/regression/memoryssa_one_def_multiple_uses.c
// RUN: %bmc -memory=flat "%s" | FileCheck "%s" // CHECK: Verification {{(SUCCESSFUL|BOUND REACHED)}} int a() { return 0; } int main() { while (1) { a(); a(); } }
ftsrg/gazer
test/verif/base/separate_assert.c
// RUN: %bmc "%s" | FileCheck "%s" // CHECK: Verification {{(SUCCESSFUL|BOUND REACHED)}} void a(b) { if (!b) __VERIFIER_error(); } main() { a(70789); }
ftsrg/gazer
test/verif/floats/double_mul_fail.c
// RUN: %bmc -bound 1 "%s" | FileCheck "%s" // CHECK: Verification FAILED extern void __VERIFIER_error(void); extern double __VERIFIER_nondet_double(void); int main(void) { double x = __VERIFIER_nondet_double(); double y = __VERIFIER_nondet_double(); double mul1 = x * x * y; double mul2 = x * (x * y...
ftsrg/gazer
include/gazer/Trace/WitnessWriter.h
<reponame>ftsrg/gazer //==-------------------------------------------------------------*- C++ -*--==// // // Copyright 2019 Contributors to the Gazer project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy...
ftsrg/gazer
include/gazer/Support/SExpr.h
<reponame>ftsrg/gazer //==-------------------------------------------------------------*- C++ -*--==// // // Copyright 2019 Contributors to the Gazer project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy...
ftsrg/gazer
tools/gazer-theta/lib/ThetaVerifier.h
//==-------------------------------------------------------------*- C++ -*--==// // // Copyright 2019 Contributors to the Gazer project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // ...
ftsrg/gazer
include/gazer/Core/Expr/ExprEvaluator.h
//==- ExprEvaluator.h - Expression evaluation -------------------*- C++ -*--==// // // Copyright 2019 Contributors to the Gazer project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // ...
ftsrg/gazer
test/portfolio/zerodiv_example_finish_all.c
<reponame>ftsrg/gazer // RUN: %portfolio -c "%S"/SVComp_finish_all_configuration.yml -l minimal -t "%s" -o /tmp | FileCheck "%s" // CHECK: Result of bmc-inline: Verification FAILED. // CHECK-NEXT: Result of bmc-inline-test-harness: Test harness SUCCESSFUL WITNESS // CHECK: Result of theta-expl: Verification FAILED. //...
ftsrg/gazer
include/gazer/Support/Stopwatch.h
//==-------------------------------------------------------------*- C++ -*--==// // // Copyright 2019 Contributors to the Gazer project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // ...
ftsrg/gazer
test/theta/verif/memory/pointers1.c
// RUN: %theta "%s" | FileCheck "%s" // CHECK: Verification SUCCESSFUL int __VERIFIER_nondet_int(void); void __VERIFIER_error(void) __attribute__((__noreturn__)); void make_symbolic(void* ptr); int a, b; int main(void) { int* pA = &a; int* pB = &b; a = __VERIFIER_nondet_int(); b = a; if (*pA ...
ftsrg/gazer
include/gazer/LLVM/LLVMFrontendSettings.h
<reponame>ftsrg/gazer //==-------------------------------------------------------------*- C++ -*--==// // // Copyright 2019 Contributors to the Gazer project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy...
ftsrg/gazer
test/theta/verif/base/separate_assert.c
<gh_stars>1-10 // RUN: %theta -memory=havoc "%s" | FileCheck "%s" // CHECK: Verification SUCCESSFUL void a(b) { if (!b) __VERIFIER_error(); } main() { a(70789); }
ftsrg/gazer
scripts/portfolio/test-tasks/overflow_example.c
#include <stdio.h> int main(void) { int k = 2147483643; k+=5; printf("%d\n", k); return 0; }
ftsrg/gazer
test/verif/floats/float_cast_fail.c
// RUN: %bmc -bound 1 "%s" | FileCheck "%s" // CHECK: Verification FAILED #include <assert.h> #include <stdint.h> float __VERIFIER_nondet_float(void); uint32_t __VERIFIER_nondet_uint32(void); int main(void) { double x = __VERIFIER_nondet_float(); uint32_t t = __VERIFIER_nondet_uint32(); double f = x * (...
ftsrg/gazer
test/theta/verif/memory/globals4.c
<reponame>ftsrg/gazer // RUN: %theta "%s" | FileCheck "%s" // CHECK: Verification SUCCESSFUL int __VERIFIER_nondet_int(void); void __VERIFIER_error(void) __attribute__((__noreturn__)); int a = 1; int b = 1; int c = 3; int main(void) { int input = 1; while (input != 0) { input = __VERIFIER_nondet_int...
ftsrg/gazer
include/gazer/LLVM/Analysis/PDG.h
//==-------------------------------------------------------------*- C++ -*--==// // // Copyright 2019 Contributors to the Gazer project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // ...
ftsrg/gazer
include/gazer/LLVM/Transform/BackwardSlicer.h
<gh_stars>1-10 //==-------------------------------------------------------------*- C++ -*--==// // // Copyright 2019 Contributors to the Gazer project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the...
ftsrg/gazer
include/gazer/Core/Expr/ConstantFolder.h
<reponame>ftsrg/gazer //==- ConstantFolder.h - Expression constant folding ------------*- C++ -*--==// // // Copyright 2019 Contributors to the Gazer project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy...
ftsrg/gazer
test/verif/regression/abort_after_error_with_impl.c
<filename>test/verif/regression/abort_after_error_with_impl.c // RUN: %bmc "%s" | FileCheck "%s" // CHECK: Verification FAILED extern void abort(void); void __VERIFIER_error() { // empty } extern int __VERIFIER_nondet_int(); int main() { int x = __VERIFIER_nondet_int(); if (x) { __VERIFIER_error...
ftsrg/gazer
include/gazer/Support/Compiler.h
<reponame>ftsrg/gazer //==-------------------------------------------------------------*- C++ -*--==// // // Copyright 2019 Contributors to the Gazer project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy...
ftsrg/gazer
test/verif/memory/globals2.c
// RUN: %bmc -bound 1 -no-inline-globals "%s" | FileCheck "%s" // CHECK: Verification {{(SUCCESSFUL|BOUND REACHED)}} #include <limits.h> int __VERIFIER_nondet_int(void); void __VERIFIER_error(void) __attribute__((__noreturn__)); void __VERIFIER_assume(int expression); int b = 1; int main(void) { int a = __VERIF...
ftsrg/gazer
include/gazer/Automaton/Cfa.h
//==- Cfa.h - Control flow automaton interface ------------------*- C++ -*--==// // // Copyright 2019 Contributors to the Gazer project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // ...
ftsrg/gazer
test/theta/verif/memory/passbyref3_fail.c
// REQUIRES: memory.burstall // RUN: %theta "%s" | FileCheck "%s" // CHECK: Verification FAILED int __VERIFIER_nondet_int(void); void __VERIFIER_error(void) __attribute__((__noreturn__)); void make_symbolic(void* ptr); int main(void) { int a = __VERIFIER_nondet_int(); make_symbolic(&a); if (a == 0) { ...
ftsrg/gazer
include/gazer/Verifier/BoundedModelChecker.h
//==- BoundedModelChecker.h - BMC engine interface --------------*- C++ -*--==// // // Copyright 2019 Contributors to the Gazer project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // ...
ftsrg/gazer
test/verif/regression/constant_gv_fail.c
// RUN: %bmc "%s" | FileCheck "%s" // CHECK: Verification FAILED #include <assert.h> int main(void) { assert(0); }